Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.24 KB | None | 0 0
  1. <?php
  2. /**
  3. * Simple Machines Forum (SMF)
  4. *
  5. * @package SMF
  6. * @author Simple Machines
  7. * @copyright 2011 Simple Machines
  8. * @license http://www.simplemachines.org/about/smf/license.php BSD
  9. *
  10. * @version 2.0
  11. */
  12. //$conectar=require("conectar_db.php");
  13. $sql_host="mysql.hostinger.es";
  14. $sql_user="u347117697_arupa";
  15. $slq_pass="b0krdLws2Qwz";
  16. $slq_basededatos="u347117697_ehyve";
  17. $conectate=mysqli_connect($sql_host, $sql_user, $slq_pass, $slq_basededatos);
  18. if (mysqli_connect_errno()) {
  19. printf("Conexión fallida: %s\n", mysqli_connect_error());
  20. exit();
  21. }
  22. //=========================
  23. function template_main()
  24. {
  25.  
  26. global $context, $settings, $options, $txt, $scripturl, $modSettings;
  27.  
  28. // Let them know, if their report was a success!
  29. if ($context['report_sent'])
  30. {
  31. echo '
  32. <div class="windowbg" id="profile_success">
  33. ', $txt['report_sent'], '
  34. </div>';
  35. }
  36.  
  37. // Show the anchor for the top and for the first message. If the first message is new, say so.
  38. echo '
  39. <a id="top"></a>
  40. <a id="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a id="new"></a>' : '';
  41.  
  42. // Is this topic also a poll?
  43. if ($context['is_poll'])
  44. {
  45. echo '
  46. <div id="poll">
  47. <div class="cat_bar">
  48. <h3 class="catbg">
  49. <span class="ie6_header floatleft"><img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.gif" alt="" class="icon" /> ', $txt['poll'], '</span>
  50. </h3>
  51. </div>
  52. <div class="windowbg">
  53. <span class="topslice"><span></span></span>
  54. <div class="content" id="poll_options">
  55. <h4 id="pollquestion">
  56. ', $context['poll']['question'], '
  57. </h4>';
  58.  
  59. // Are they not allowed to vote but allowed to view the options?
  60. if ($context['poll']['show_results'] || !$context['allow_vote'])
  61. {
  62. echo '
  63. <dl class="options">';
  64.  
  65. // Show each option with its corresponding percentage bar.
  66. foreach ($context['poll']['options'] as $option)
  67. {
  68. echo '
  69. <dt class="middletext', $option['voted_this'] ? ' voted' : '', '">', $option['option'], '</dt>
  70. <dd class="middletext statsbar', $option['voted_this'] ? ' voted' : '', '">';
  71.  
  72. if ($context['allow_poll_view'])
  73. echo '
  74. ', $option['bar_ndt'], '
  75. <span class="percentage">', $option['votes'], ' (', $option['percent'], '%)</span>';
  76.  
  77. echo '
  78. </dd>';
  79. }
  80.  
  81. echo '
  82. </dl>';
  83.  
  84. if ($context['allow_poll_view'])
  85. echo '
  86. <p><strong>', $txt['poll_total_voters'], ':</strong> ', $context['poll']['total_votes'], '</p>';
  87. }
  88. // They are allowed to vote! Go to it!
  89. else
  90. {
  91. echo '
  92. <form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '">';
  93.  
  94. // Show a warning if they are allowed more than one option.
  95. if ($context['poll']['allowed_warning'])
  96. echo '
  97. <p class="smallpadding">', $context['poll']['allowed_warning'], '</p>';
  98.  
  99. echo '
  100. <ul class="reset options">';
  101.  
  102. // Show each option with its button - a radio likely.
  103. foreach ($context['poll']['options'] as $option)
  104. echo '
  105. <li class="middletext">', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
  106.  
  107. echo '
  108. </ul>
  109. <div class="submitbutton">
  110. <input type="submit" value="', $txt['poll_vote'], '" class="button_submit" />
  111. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  112. </div>
  113. </form>';
  114. }
  115.  
  116. // Is the clock ticking?
  117. if (!empty($context['poll']['expire_time']))
  118. echo '
  119. <p><strong>', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ':</strong> ', $context['poll']['expire_time'], '</p>';
  120.  
  121. echo '
  122. </div>
  123. <span class="botslice"><span></span></span>
  124. </div>
  125. </div>
  126. <div id="pollmoderation">';
  127.  
  128. // Build the poll moderation button array.
  129. $poll_buttons = array(
  130. 'vote' => array('test' => 'allow_return_vote', 'text' => 'poll_return_vote', 'image' => 'poll_options.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start']),
  131. 'results' => array('test' => 'show_view_results_button', 'text' => 'poll_results', 'image' => 'poll_results.gif', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.' . $context['start'] . ';viewresults'),
  132. 'change_vote' => array('test' => 'allow_change_vote', 'text' => 'poll_change_vote', 'image' => 'poll_change_vote.gif', 'lang' => true, 'url' => $scripturl . '?action=vote;topic=' . $context['current_topic'] . '.' . $context['start'] . ';poll=' . $context['poll']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  133. 'lock' => array('test' => 'allow_lock_poll', 'text' => (!$context['poll']['is_locked'] ? 'poll_lock' : 'poll_unlock'), 'image' => 'poll_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lockvoting;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  134. 'edit' => array('test' => 'allow_edit_poll', 'text' => 'poll_edit', 'image' => 'poll_edit.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;topic=' . $context['current_topic'] . '.' . $context['start']),
  135. 'remove_poll' => array('test' => 'can_remove_poll', 'text' => 'poll_remove', 'image' => 'admin_remove_poll.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');"', 'url' => $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  136. );
  137.  
  138. template_button_strip($poll_buttons);
  139.  
  140. echo '
  141. </div>';
  142. }
  143.  
  144. // Does this topic have some events linked to it?
  145. if (!empty($context['linked_calendar_events']))
  146. {
  147. echo '
  148. <div class="linked_events">
  149. <div class="title_bar">
  150. <h3 class="titlebg headerpadding">', $txt['calendar_linked_events'], '</h3>
  151. </div>
  152. <div class="windowbg">
  153. <span class="topslice"><span></span></span>
  154. <div class="content">
  155. <ul class="reset">';
  156.  
  157. foreach ($context['linked_calendar_events'] as $event)
  158. echo '
  159. <li>
  160. ', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '"> <img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="" title="' . $txt['modify'] . '" class="edit_event" /></a> ' : ''), '<strong>', $event['title'], '</strong>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
  161. </li>';
  162.  
  163. echo '
  164. </ul>
  165. </div>
  166. <span class="botslice"><span></span></span>
  167. </div>
  168. </div>';
  169. }
  170.  
  171. // Build the normal button array.
  172. $normal_buttons = array(
  173. 'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], 'active' => true),
  174. 'add_poll' => array('test' => 'can_add_poll', 'text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start']),
  175. 'notify' => array('test' => 'can_mark_notify', 'text' => $context['is_marked_notify'] ? 'unnotify' : 'notify', 'image' => ($context['is_marked_notify'] ? 'un' : '') . 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  176. 'mark_unread' => array('test' => 'can_mark_unread', 'text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  177. 'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
  178. 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
  179. );
  180.  
  181. // Allow adding new buttons easily.
  182. call_integration_hook('integrate_display_buttons', array(&$normal_buttons));
  183.  
  184. // Show the page index... "Pages: [1]".
  185. echo '
  186. <div class="pagesection">
  187. <div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($normal_buttons, 'right'), '
  188. <div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#lastPost"><strong>' . $txt['go_down'] . '</strong></a>' : '', '</div>
  189. </div>';
  190.  
  191. // Show the topic information - icon, subject, etc.
  192. echo '
  193. <div id="forumposts">
  194. <div class="display-info">
  195. <h1>
  196. ', $context['subject'], '
  197. </h1>
  198. <ul class="reset info navbar-right">
  199. <li class="replies">'. $context['real_num_replies'] .' '. $txt['replies'] .' - </li>
  200. <li class="views">', $context['num_views'], ' '. $txt['views'] .'</li>
  201. </ul>
  202. </div>';
  203.  
  204. if (!empty($settings['display_who_viewing']))
  205. {
  206. echo '
  207. <p id="whoisviewing" class="smalltext">';
  208.  
  209. // Show just numbers...?
  210. if ($settings['display_who_viewing'] == 1)
  211. echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt['members'];
  212. // Or show the actual people viewing the topic?
  213. else
  214. echo empty($context['view_members_list']) ? '0 ' . $txt['members'] : implode(', ', $context['view_members_list']) . ((empty($context['view_num_hidden']) || $context['can_moderate_forum']) ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
  215.  
  216. // Now show how many guests are here too.
  217. echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '
  218. </p>';
  219. }
  220.  
  221. echo '
  222. <form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\') : false">';
  223.  
  224. $ignoredMsgs = array();
  225. $removableMessageIDs = array();
  226. $alternate = false;
  227.  
  228. // Get all the messages...
  229. while ($message = $context['get_message']())
  230. {
  231. $ignoring = false;
  232. $alternate = !$alternate;
  233. if ($message['can_remove'])
  234. $removableMessageIDs[] = $message['id'];
  235.  
  236. // Are we ignoring this message?
  237. if (!empty($message['is_ignored']))
  238. {
  239. $ignoring = true;
  240. $ignoredMsgs[] = $message['id'];
  241. }
  242.  
  243. // Show the message anchor and a "new" anchor if this message is new.
  244. if ($message['id'] != $context['first_message'])
  245. echo '
  246. <a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
  247.  
  248. echo '
  249. <div class="body_message">
  250. <div class="post_wrapper">';
  251.  
  252. // Show information about the poster of this message.
  253. echo '
  254. <div class="poster col-md-2">
  255. ';
  256.  
  257. // Show avatars, images, etc.?
  258.  
  259. if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
  260. {
  261.  
  262.  
  263. echo '
  264. <li class="avatar">
  265.  
  266. <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
  267. ', $message['member']['avatar']['image'], '
  268. </a>
  269. </li>';
  270. }
  271. else
  272. {
  273. echo'
  274. <li class="avatar">
  275. <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
  276. <img src="',$settings['images_url'] ,'/noavatar.png" />
  277. </a>
  278. </li>';
  279. }
  280.  
  281. // Show online and offline buttons?
  282. if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest'])
  283. echo '
  284. <h4> ', $context['can_send_pm'] ? '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">' : '', '<img src="', $message['member']['online']['image_href'], '"> </img>', $context['can_send_pm'] ? '</a>' : '';
  285.  
  286. // Show a link to the member's profile.
  287. echo '
  288. ', $message['member']['link'], '
  289. </h4>
  290. <ul class="reset smalltext" id="msg_', $message['id'], '_extra_info">';
  291.  
  292. // Show the member's custom title, if they have one.
  293. if (!empty($message['member']['title']))
  294. echo '
  295. <li class="title">', $message['member']['title'], '</li>';
  296.  
  297. // Don't show these things for guests.
  298. if (!$message['member']['is_guest'])
  299. {
  300.  
  301. // Show the stars if they are not in a group.
  302. echo '
  303. <li class="stars">', $message['member']['group_stars'], '</li>';
  304.  
  305. //Show additional groups, if the user has some attributed
  306. if (!empty($message['member']['additional_groups_full'])) {
  307. foreach($message['member']['additional_groups_full'] as $temp) {
  308. if (!empty($modSettings['show_additional_groups_name']))
  309. echo '
  310. <li class="stars">', $temp['group'], '</li>';
  311. echo '
  312. <li class="stars">', $temp['stars_img'], '</li>';
  313. }
  314. }
  315.  
  316. //Multiple Stars Mod
  317. if (!empty($modSettings['msmod_boardenabled']))
  318. {
  319. $msmod_board = explode(',', $modSettings['msmod_boardenabled']);
  320. if (in_array($context['current_board'], $msmod_board))
  321. {
  322. if (!empty($message['member']['additional_groups']['id']))
  323. for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
  324. echo '<li>', $message['member']['additional_groups']['stars'][$i], '</li>';
  325.  
  326. if(!empty($modSettings['msmod_add_groups_count_based']) && !empty($message['member']['group']) && !empty($message['member']['additional_groups']['count_based_stars']))
  327. echo '<li>', $message['member']['additional_groups']['count_based_stars'], '</li>';
  328. }
  329. }
  330. //Multiple Stars Mod END
  331.  
  332. // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
  333. if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
  334. echo '
  335. <li class="postgroup"style="padding:0px; padding-left:5px;">', $message['member']['post_group'], '</li>';
  336.  
  337.  
  338.  
  339. // Is karma display enabled? Total or +/-?
  340. if ($modSettings['karmaMode'] == '1')
  341. echo '
  342. <li class="karma">
  343. <strong>Ingreso:</strong> ', $message['member']['registered'], '
  344. <br>
  345. <strong>Ubicación:</strong> ', $message['member']['location'],'
  346. <br>
  347. <strong>Mensajes:</strong> ', $message['member']['posts'], '
  348. <br>
  349. <strong>Reputación:</strong> ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '
  350. </li>';
  351. elseif ($modSettings['karmaMode'] == '2')
  352. echo '
  353. <li class="karma"><img src="',$settings['images_url'] ,'/karma.png" /> +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '</li>';
  354.  
  355. // Show how many posts they have made.
  356. if (!isset($context['disabled_fields']['posts']))
  357. //echo '
  358. //<li class="postcount">Mensajes: ', $message['member']['posts'], '</li>';
  359.  
  360. $buscar8=mysqli_query($conectate, "SELECT * FROM smf_members WHERE id_member = ",$message['member']['id'],"");
  361. while($row8=mysqli_fetch_array($buscar8))
  362. {
  363. echo '<li>Ubicacion: ',$row8['location'],'</li>';
  364. }
  365.  
  366. mysqli_free_result($buscar8);
  367.  
  368. // Is this user allowed to modify this member's karma?
  369. if ($message['member']['karma']['allow'])
  370. echo '
  371. <li class="karma_allow">
  372. <a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
  373. <a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a>
  374. </li>';
  375.  
  376. // Show the member's gender icon?
  377. if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
  378. echo '
  379. <li class="gender">', $txt['gender'], ': ', $message['member']['gender']['image'], '</li>';
  380.  
  381. // Show their personal text?
  382. /*if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
  383. echo '
  384. <li class="blurb">', $message['member']['blurb'], '</li>';*/
  385.  
  386. // Any custom fields to show as icons?
  387. if (!empty($message['member']['custom_fields']))
  388. {
  389. $shown = false;
  390. foreach ($message['member']['custom_fields'] as $custom)
  391. {
  392. if ($custom['placement'] != 1 || empty($custom['value']))
  393. continue;
  394. if (empty($shown))
  395. {
  396. $shown = true;
  397. echo '
  398. <li class="im_icons">
  399. <ul>';
  400. }
  401. echo '
  402. <li>', $custom['value'], '</li>';
  403. }
  404. if ($shown)
  405. echo '
  406. </ul>
  407. </li>';
  408. }
  409.  
  410. // This shows the popular messaging icons.
  411. if ($message['member']['has_messenger'] && $message['member']['can_view_profile'])
  412. echo '
  413. <li class="im_icons">
  414. <ul>
  415. ', !empty($message['member']['icq']['link']) ? '<li>' . $message['member']['icq']['link'] . '</li>' : '', '
  416. ', !empty($message['member']['msn']['link']) ? '<li>' . $message['member']['msn']['link'] . '</li>' : '', '
  417. ', !empty($message['member']['aim']['link']) ? '<li>' . $message['member']['aim']['link'] . '</li>' : '', '
  418. ', !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
  419. </ul>
  420. </li>';
  421.  
  422. // Show the profile, website, email address, and personal message buttons.
  423. /*if ($settings['show_profile_buttons'])
  424. {
  425. echo '
  426. <li class="profile">
  427.  
  428. </li>';
  429. }*/
  430.  
  431.  
  432. // Any custom fields for standard placement?
  433. if (!empty($message['member']['custom_fields']))
  434. {
  435. foreach ($message['member']['custom_fields'] as $custom)
  436. if (empty($custom['placement']) || empty($custom['value']))
  437. echo '
  438. <li class="custom"><strong>', $custom['title'], ':</strong> ', $custom['value'], '</li>';
  439. }
  440. echo '<li class="custom1"></li>';
  441.  
  442. // Are we showing the warning status?
  443. if ($message['member']['can_see_warning'])
  444. echo '
  445. <li class="warning">', $context['can_issue_warning'] ? '<a href="' . $scripturl . '?action=profile;area=issuewarning;u=' . $message['member']['id'] . '">' : '', '<img src="', $settings['images_url'], '/warning_', $message['member']['warning_status'], '.gif" alt="', $txt['user_warn_' . $message['member']['warning_status']], '" />', $context['can_issue_warning'] ? '</a>' : '', '<span class="warn_', $message['member']['warning_status'], '">', $txt['warn_' . $message['member']['warning_status']], '</span></li>';
  446. }
  447. // Otherwise, show the guest's email.
  448. elseif (!empty($message['member']['email']) && in_array($message['member']['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
  449. echo '
  450. <li class="email"><a href="', $scripturl, '?action=emailuser;sa=email;msg=', $message['id'], '" rel="nofollow">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . '" />' : $txt['email']), '</a></li>';
  451.  
  452. // Done with the information about the poster... on to the post itself.
  453. echo '
  454. </ul>
  455. </div>
  456. <div class="col-md-10">
  457. <div class="body_content">
  458. <div class="postarea">';
  459.  
  460. // If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
  461. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  462. echo '
  463. <div class="btn-group navbar-right">
  464. <button type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown">Actions <span class="caret"></span></button>
  465. <ul class="dropdown-menu" role="menu"">';
  466.  
  467. // Maybe we can approve it, maybe we should?
  468. if ($message['can_approve'])
  469. echo '
  470. <li class="approve_button"><a href="', $scripturl, '?action=moderate;area=postmod;sa=approve;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a></li>';
  471.  
  472. // Can they reply? Have they turned on quick reply?
  473. if ($context['can_quote'] && !empty($options['display_quick_reply']))
  474. echo '
  475. <li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';
  476.  
  477. // So... quick reply is off, but they *can* reply?
  478. elseif ($context['can_quote'])
  479. echo '
  480. <li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';
  481.  
  482. // Can the user modify the contents of this post?
  483. if ($message['can_modify'])
  484. echo '
  485. <li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';
  486.  
  487. // How about... even... remove it entirely?!
  488. if ($message['can_remove'])
  489. echo '
  490. <li class="remove_button"><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');">', $txt['remove'], '</a></li>';
  491.  
  492. // What about splitting it off the rest of the topic?
  493. if ($context['can_split'] && !empty($context['real_num_replies']))
  494. echo '
  495. <li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';
  496.  
  497. // Can we restore topics?
  498. if ($context['can_restore_msg'])
  499. echo '
  500. <li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';
  501.  
  502. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  503. echo '
  504. </ul>
  505. </div>
  506. <ul class="reset floatright" style="margin: 5px 15px 0 7px;">';
  507.  
  508. // Show a checkbox for quick moderation?
  509. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
  510. echo '
  511. <li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
  512.  
  513. echo'
  514. </ul>
  515. <div class="keyinfo">
  516. <div class="messageicon">
  517. <img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
  518. </div>
  519. <h5 id="subject_', $message['id'], '">
  520. <a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
  521. </h5>
  522. <div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
  523. <div id="msg_', $message['id'], '_quick_mod"></div>
  524. </div>';
  525.  
  526. // Ignoring this user? Hide the post.
  527. if ($ignoring)
  528. echo '
  529. <div id="msg_', $message['id'], '_ignored_prompt">
  530. ', $txt['ignoring_user'], '
  531. <a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
  532. </div>';
  533.  
  534. // Show the post itself, finally!
  535. echo '
  536. <div class="post">';
  537.  
  538. if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
  539. echo '
  540. <div class="approve_post">
  541. ', $txt['post_awaiting_approval'], '
  542. </div>';
  543. echo '
  544. <div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
  545. </div>';
  546.  
  547. // Can the user modify the contents of this post? Show the modify inline image.
  548. if ($message['can_modify'])
  549. echo '
  550. <img src="', $settings['images_url'], '/icons/modify_inline.gif" alt="', $txt['modify_msg'], '" title="', $txt['modify_msg'], '" class="modifybutton" id="modify_button_', $message['id'], '" style="cursor: ', ($context['browser']['is_ie5'] || $context['browser']['is_ie5.5'] ? 'hand' : 'pointer'), '; display: none;" onclick="oQuickModify.modifyMsg(\'', $message['id'], '\')" />';
  551.  
  552. // Assuming there are attachments...
  553. if (!empty($message['attachment']))
  554. {
  555. echo '
  556. <div id="msg_', $message['id'], '_footer" class="attachments smalltext">
  557. <div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">';
  558.  
  559. $last_approved_state = 1;
  560. foreach ($message['attachment'] as $attachment)
  561. {
  562. // Show a special box for unapproved attachments...
  563. if ($attachment['is_approved'] != $last_approved_state)
  564. {
  565. $last_approved_state = 0;
  566. echo '
  567. <fieldset>
  568. <legend>', $txt['attach_awaiting_approve'];
  569.  
  570. if ($context['can_approve'])
  571. echo '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
  572.  
  573. echo '</legend>';
  574. }
  575.  
  576. if ($attachment['is_image'])
  577. {
  578. if ($attachment['thumbnail']['has_thumb'])
  579. echo '
  580. <a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" /></a><br />';
  581. else
  582. echo '
  583. <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
  584. }
  585. echo '
  586. <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';
  587.  
  588. if (!$attachment['is_approved'] && $context['can_approve'])
  589. echo '
  590. [<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
  591. echo '
  592. (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
  593. }
  594.  
  595. // If we had unapproved attachments clean up.
  596. if ($last_approved_state == 0)
  597. echo '
  598. </fieldset>';
  599.  
  600. echo '
  601. </div>
  602. </div>';
  603. }
  604.  
  605. echo '
  606. </div>
  607. <div class="moderatorbar">
  608. <div class="smalltext modified" id="modified_', $message['id'], '">';
  609.  
  610. // Show "� Last Edit: Time by Person �" if this post was edited.
  611. if ($settings['show_modify'] && !empty($message['modified']['name']))
  612. echo '
  613. &#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
  614.  
  615. echo '
  616. </div>
  617. <div class="smalltext reportlinks">';
  618.  
  619. // Maybe they want to report this post to the moderator(s)?
  620. if ($context['can_report_moderator'])
  621. echo '
  622. <a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';
  623.  
  624. // Can we issue a warning because of this post? Remember, we can't give guests warnings.
  625. if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
  626. echo '
  627. <a href="', $scripturl, '?action=profile;area=issuewarning;u=', $message['member']['id'], ';msg=', $message['id'], '"><img src="', $settings['images_url'], '/warn.gif" alt="', $txt['issue_warning_post'], '" title="', $txt['issue_warning_post'], '" /></a>';
  628. echo '
  629. <img src="', $settings['images_url'], '/ip.gif" alt="" />';
  630.  
  631. // Show the IP to this user for this post - because you can moderate?
  632. if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
  633. echo '
  634. <a href="', $scripturl, '?action=', !empty($message['member']['is_guest']) ? 'trackip' : 'profile;area=tracking;sa=ip;u=' . $message['member']['id'], ';searchip=', $message['member']['ip'], '">', $message['member']['ip'], '</a> <a href="', $scripturl, '?action=helpadmin;help=see_admin_ip" onclick="return reqWin(this.href);" class="help">(?)</a>';
  635. // Or, should we show it because this is you?
  636. elseif ($message['can_see_ip'])
  637. echo '
  638. <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
  639. // Okay, are you at least logged in? Then we can show something about why IPs are logged...
  640. elseif (!$context['user']['is_guest'])
  641. echo '
  642. <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
  643. // Otherwise, you see NOTHING!
  644. else
  645. echo '
  646. ', $txt['logged'];
  647.  
  648. echo '
  649. </div>';
  650.  
  651. // Are there any custom profile fields for above the signature?
  652. if (!empty($message['member']['custom_fields']))
  653. {
  654. $shown = false;
  655. foreach ($message['member']['custom_fields'] as $custom)
  656. {
  657. if ($custom['placement'] != 2 || empty($custom['value']))
  658. continue;
  659. if (empty($shown))
  660. {
  661. $shown = true;
  662. echo '
  663. <div class="custom_fields_above_signature">
  664. <ul class="reset nolist">';
  665. }
  666. echo '
  667. <li>', $custom['value'], '</li>';
  668. }
  669. if ($shown)
  670. echo '
  671. </ul>
  672. </div>';
  673. }
  674.  
  675. // Show the member's signature?
  676. if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
  677. echo '
  678. <div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
  679.  
  680. echo '
  681. </div>
  682. </div>
  683. </div>
  684. </div>
  685. </div>
  686. <hr />';
  687. }
  688. echo '
  689. </form>
  690. </div>
  691. <a id="lastPost"></a>';
  692.  
  693. // Show the page index... "Pages: [1]".
  694. echo '
  695. <div class="pagesection">
  696. ', template_button_strip($normal_buttons, 'right'), '
  697. <div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>
  698. <div class="nextlinks_bottom">', $context['previous_next'], '</div>
  699. </div>';
  700.  
  701. // Show the lower breadcrumbs.
  702. theme_linktree();
  703.  
  704. $mod_buttons = array(
  705. 'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
  706. 'delete' => array('test' => 'can_delete', 'text' => 'remove_topic', 'image' => 'admin_rem.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['are_sure_remove_topic'] . '\');"', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']),
  707. 'lock' => array('test' => 'can_lock', 'text' => empty($context['is_locked']) ? 'set_lock' : 'set_unlock', 'image' => 'admin_lock.gif', 'lang' => true, 'url' => $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  708. 'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']),
  709. 'merge' => array('test' => 'can_merge', 'text' => 'merge', 'image' => 'merge.gif', 'lang' => true, 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']),
  710. 'calendar' => array('test' => 'calendar_post', 'text' => 'calendar_link', 'image' => 'linktocal.gif', 'lang' => true, 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0'),
  711. );
  712.  
  713. // Restore topic. eh? No monkey business.
  714. if ($context['can_restore_topic'])
  715. $mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
  716.  
  717. // Allow adding new mod buttons easily.
  718. call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
  719.  
  720. echo '
  721. <div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
  722.  
  723. // Show the jumpto box, or actually...let Javascript do it.
  724. echo '
  725. <div class="plainbox" id="display_jump_to">&nbsp;</div>';
  726.  
  727. if ($context['can_reply'] && !empty($options['display_quick_reply']))
  728. {
  729. echo '
  730. <a id="quickreply"></a>
  731. <div class="tborder" id="quickreplybox">
  732. <div class="cat_bar">
  733. <h3 class="catbg">
  734. <span class="ie6_header floatleft"><a href="javascript:oQuickReply.swap();">
  735. <img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" class="icon" />
  736. </a>
  737. <a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
  738. </span>
  739. </h3>
  740. </div>
  741. <div id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
  742. <span class="upperframe"><span></span></span>
  743. <div class="roundframe">
  744. <p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
  745. ', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
  746. $context['oldTopicError'] ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
  747. ', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
  748. ', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
  749. <form action="', $scripturl, '?board=', $context['current_board'], ';action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
  750. <input type="hidden" name="topic" value="', $context['current_topic'], '" />
  751. <input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
  752. <input type="hidden" name="icon" value="xx" />
  753. <input type="hidden" name="from_qr" value="1" />
  754. <input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
  755. <input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
  756. <input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
  757. <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
  758. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  759. <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
  760.  
  761. // Guests just need more.
  762. if ($context['user']['is_guest'])
  763. echo '
  764. <strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
  765. <strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
  766.  
  767. // Is visual verification enabled?
  768. if ($context['require_verification'])
  769. echo '
  770. <strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
  771.  
  772. echo '
  773. <div class="quickReplyContent">
  774. <textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
  775. </div>
  776. <div class="righttext padding">
  777. <input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
  778. <input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  779.  
  780. if ($context['show_spellchecking'])
  781. echo '
  782. <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  783.  
  784. echo '
  785. </div>
  786. </form>
  787. </div>
  788. <span class="lowerframe"><span></span></span>
  789. </div>
  790. </div>';
  791. }
  792. else
  793. echo '
  794. <br class="clear" />';
  795.  
  796. if ($context['show_spellchecking'])
  797. echo '
  798. <form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>
  799. <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
  800.  
  801. echo '
  802. <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
  803. <script type="text/javascript"><!-- // --><![CDATA[';
  804.  
  805. if (!empty($options['display_quick_reply']))
  806. echo '
  807. var oQuickReply = new QuickReply({
  808. bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ',
  809. iTopicId: ', $context['current_topic'], ',
  810. iStart: ', $context['start'], ',
  811. sScriptUrl: smf_scripturl,
  812. sImagesUrl: "', $settings['images_url'], '",
  813. sContainerId: "quickReplyOptions",
  814. sImageId: "quickReplyExpand",
  815. sImageCollapsed: "collapse.gif",
  816. sImageExpanded: "expand.gif",
  817. sJumpAnchor: "quickreply"
  818. });';
  819.  
  820. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
  821. echo '
  822. var oInTopicModeration = new InTopicModeration({
  823. sSelf: \'oInTopicModeration\',
  824. sCheckboxContainerMask: \'in_topic_mod_check_\',
  825. aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
  826. sSessionId: \'', $context['session_id'], '\',
  827. sSessionVar: \'', $context['session_var'], '\',
  828. sButtonStrip: \'moderationbuttons\',
  829. sButtonStripDisplay: \'moderationbuttons_strip\',
  830. bUseImageButton: false,
  831. bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
  832. sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
  833. sRemoveButtonImage: \'delete_selected.gif\',
  834. sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  835. bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
  836. sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
  837. sRestoreButtonImage: \'restore_selected.gif\',
  838. sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  839. sFormId: \'quickModForm\'
  840. });';
  841.  
  842. echo '
  843. if (\'XMLHttpRequest\' in window)
  844. {
  845. var oQuickModify = new QuickModify({
  846. sScriptUrl: smf_scripturl,
  847. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  848. iTopicId: ', $context['current_topic'], ',
  849. sTemplateBodyEdit: ', JavaScriptEscape('
  850. <div id="quick_edit_body_container" style="width: 90%">
  851. <div id="error_box" style="padding: 4px;" class="error"></div>
  852. <textarea class="editor" name="message" rows="12" style="' . ($context['browser']['is_ie8'] ? 'width: 635px; max-width: 100%; min-width: 100%' : 'width: 100%') . '; margin-bottom: 10px;" tabindex="' . $context['tabindex']++ . '">%body%</textarea><br />
  853. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  854. <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
  855. <input type="hidden" name="msg" value="%msg_id%" />
  856. <div class="righttext">
  857. <input type="submit" name="post" value="' . $txt['save'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifySave(\'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');" accesskey="s" class="button_submit" />&nbsp;&nbsp;' . ($context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" tabindex="' . $context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button_submit" />&nbsp;&nbsp;' : '') . '<input type="submit" name="cancel" value="' . $txt['modify_cancel'] . '" tabindex="' . $context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button_submit" />
  858. </div>
  859. </div>'), ',
  860. sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
  861. sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
  862. sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
  863. sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
  864. sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
  865. });
  866.  
  867. aJumpTo[aJumpTo.length] = new JumpTo({
  868. sContainerId: "display_jump_to",
  869. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  870. iCurBoardId: ', $context['current_board'], ',
  871. iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
  872. sCurBoardName: "', $context['jump_to']['board_name'], '",
  873. sBoardChildLevelIndicator: "==",
  874. sBoardPrefix: "=> ",
  875. sCatSeparator: "-----------------------------",
  876. sCatPrefix: "",
  877. sGoButtonLabel: "', $txt['go'], '"
  878. });
  879.  
  880. aIconLists[aIconLists.length] = new IconList({
  881. sBackReference: "aIconLists[" + aIconLists.length + "]",
  882. sIconIdPrefix: "msg_icon_",
  883. sScriptUrl: smf_scripturl,
  884. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  885. iBoardId: ', $context['current_board'], ',
  886. iTopicId: ', $context['current_topic'], ',
  887. sSessionId: "', $context['session_id'], '",
  888. sSessionVar: "', $context['session_var'], '",
  889. sLabelIconList: "', $txt['message_icon'], '",
  890. sBoxBackground: "transparent",
  891. sBoxBackgroundHover: "#ffffff",
  892. iBoxBorderWidthHover: 1,
  893. sBoxBorderColorHover: "#adadad" ,
  894. sContainerBackground: "#ffffff",
  895. sContainerBorder: "1px solid #adadad",
  896. sItemBorder: "1px solid #ffffff",
  897. sItemBorderHover: "1px dotted gray",
  898. sItemBackground: "transparent",
  899. sItemBackgroundHover: "#e0e0f0"
  900. });
  901. }';
  902.  
  903. if (!empty($ignoredMsgs))
  904. {
  905. echo '
  906. var aIgnoreToggles = new Array();';
  907.  
  908. foreach ($ignoredMsgs as $msgid)
  909. {
  910. echo '
  911. aIgnoreToggles[', $msgid, '] = new smc_Toggle({
  912. bToggleEnabled: true,
  913. bCurrentlyCollapsed: true,
  914. aSwappableContainers: [
  915. \'msg_', $msgid, '_extra_info\',
  916. \'msg_', $msgid, '\',
  917. \'msg_', $msgid, '_footer\',
  918. \'msg_', $msgid, '_quick_mod\',
  919. \'modify_button_', $msgid, '\',
  920. \'msg_', $msgid, '_signature\'
  921.  
  922. ],
  923. aSwapLinks: [
  924. {
  925. sId: \'msg_', $msgid, '_ignored_link\',
  926. msgExpanded: \'\',
  927. msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
  928. }
  929. ]
  930. });';
  931. }
  932. }
  933.  
  934. echo '
  935. // ]]></script>';
  936. }
  937.  
  938. mysqli_close($conectate);
  939. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement