Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.28 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. <span class="arrow-left"></span>
  459. <div class="postarea">';
  460.  
  461. // If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
  462. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  463. echo '
  464. <div class="btn-group navbar-right">
  465. <button type="button" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown">Actions <span class="caret"></span></button>
  466. <ul class="dropdown-menu" role="menu"">';
  467.  
  468. // Maybe we can approve it, maybe we should?
  469. if ($message['can_approve'])
  470. echo '
  471. <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>';
  472.  
  473. // Can they reply? Have they turned on quick reply?
  474. if ($context['can_quote'] && !empty($options['display_quick_reply']))
  475. echo '
  476. <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>';
  477.  
  478. // So... quick reply is off, but they *can* reply?
  479. elseif ($context['can_quote'])
  480. echo '
  481. <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>';
  482.  
  483. // Can the user modify the contents of this post?
  484. if ($message['can_modify'])
  485. echo '
  486. <li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';
  487.  
  488. // How about... even... remove it entirely?!
  489. if ($message['can_remove'])
  490. echo '
  491. <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>';
  492.  
  493. // What about splitting it off the rest of the topic?
  494. if ($context['can_split'] && !empty($context['real_num_replies']))
  495. echo '
  496. <li class="split_button"><a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $txt['split'], '</a></li>';
  497.  
  498. // Can we restore topics?
  499. if ($context['can_restore_msg'])
  500. echo '
  501. <li class="restore_button"><a href="', $scripturl, '?action=restoretopic;msgs=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['restore_message'], '</a></li>';
  502.  
  503. if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
  504. echo '
  505. </ul>
  506. </div>
  507. <ul class="reset floatright" style="margin: 5px 15px 0 7px;">';
  508.  
  509. // Show a checkbox for quick moderation?
  510. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
  511. echo '
  512. <li class="inline_mod_check" style="display: none;" id="in_topic_mod_check_', $message['id'], '"></li>';
  513.  
  514. echo'
  515. </ul>
  516. <div class="keyinfo">
  517. <div class="messageicon">
  518. <img src="', $message['icon_url'] . '" alt=""', $message['can_modify'] ? ' id="msg_icon_' . $message['id'] . '"' : '', ' />
  519. </div>
  520. <h5 id="subject_', $message['id'], '">
  521. <a href="', $message['href'], '" rel="nofollow">', $message['subject'], '</a>
  522. </h5>
  523. <div class="smalltext">&#171; <strong>', !empty($message['counter']) ? $txt['reply_noun'] . ' #' . $message['counter'] : '', ' ', $txt['on'], ':</strong> ', $message['time'], ' &#187;</div>
  524. <div id="msg_', $message['id'], '_quick_mod"></div>
  525. </div>';
  526.  
  527. // Ignoring this user? Hide the post.
  528. if ($ignoring)
  529. echo '
  530. <div id="msg_', $message['id'], '_ignored_prompt">
  531. ', $txt['ignoring_user'], '
  532. <a href="#" id="msg_', $message['id'], '_ignored_link" style="display: none;">', $txt['show_ignore_user_post'], '</a>
  533. </div>';
  534.  
  535. // Show the post itself, finally!
  536. echo '
  537. <div class="post">';
  538.  
  539. if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
  540. echo '
  541. <div class="approve_post">
  542. ', $txt['post_awaiting_approval'], '
  543. </div>';
  544. echo '
  545. <div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
  546. </div>';
  547.  
  548. // Can the user modify the contents of this post? Show the modify inline image.
  549. if ($message['can_modify'])
  550. echo '
  551. <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'], '\')" />';
  552.  
  553. // Assuming there are attachments...
  554. if (!empty($message['attachment']))
  555. {
  556. echo '
  557. <div id="msg_', $message['id'], '_footer" class="attachments smalltext">
  558. <div style="overflow: ', $context['browser']['is_firefox'] ? 'visible' : 'auto', ';">';
  559.  
  560. $last_approved_state = 1;
  561. foreach ($message['attachment'] as $attachment)
  562. {
  563. // Show a special box for unapproved attachments...
  564. if ($attachment['is_approved'] != $last_approved_state)
  565. {
  566. $last_approved_state = 0;
  567. echo '
  568. <fieldset>
  569. <legend>', $txt['attach_awaiting_approve'];
  570.  
  571. if ($context['can_approve'])
  572. echo '&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=all;mid=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve_all'], '</a>]';
  573.  
  574. echo '</legend>';
  575. }
  576.  
  577. if ($attachment['is_image'])
  578. {
  579. if ($attachment['thumbnail']['has_thumb'])
  580. echo '
  581. <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 />';
  582. else
  583. echo '
  584. <img src="' . $attachment['href'] . ';image" alt="" width="' . $attachment['width'] . '" height="' . $attachment['height'] . '"/><br />';
  585. }
  586. echo '
  587. <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';
  588.  
  589. if (!$attachment['is_approved'] && $context['can_approve'])
  590. echo '
  591. [<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>] ';
  592. echo '
  593. (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
  594. }
  595.  
  596. // If we had unapproved attachments clean up.
  597. if ($last_approved_state == 0)
  598. echo '
  599. </fieldset>';
  600.  
  601. echo '
  602. </div>
  603. </div>';
  604. }
  605.  
  606. echo '
  607. </div>
  608. <div class="moderatorbar">
  609. <div class="smalltext modified" id="modified_', $message['id'], '">';
  610.  
  611. // Show "� Last Edit: Time by Person �" if this post was edited.
  612. if ($settings['show_modify'] && !empty($message['modified']['name']))
  613. echo '
  614. &#171; <em>', $txt['last_edit'], ': ', $message['modified']['time'], ' ', $txt['by'], ' ', $message['modified']['name'], '</em> &#187;';
  615.  
  616. echo '
  617. </div>
  618. <div class="smalltext reportlinks">';
  619.  
  620. // Maybe they want to report this post to the moderator(s)?
  621. if ($context['can_report_moderator'])
  622. echo '
  623. <a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '">', $txt['report_to_mod'], '</a> &nbsp;';
  624.  
  625. // Can we issue a warning because of this post? Remember, we can't give guests warnings.
  626. if ($context['can_issue_warning'] && !$message['is_message_author'] && !$message['member']['is_guest'])
  627. echo '
  628. <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>';
  629. echo '
  630. <img src="', $settings['images_url'], '/ip.gif" alt="" />';
  631.  
  632. // Show the IP to this user for this post - because you can moderate?
  633. if ($context['can_moderate_forum'] && !empty($message['member']['ip']))
  634. echo '
  635. <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>';
  636. // Or, should we show it because this is you?
  637. elseif ($message['can_see_ip'])
  638. echo '
  639. <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $message['member']['ip'], '</a>';
  640. // Okay, are you at least logged in? Then we can show something about why IPs are logged...
  641. elseif (!$context['user']['is_guest'])
  642. echo '
  643. <a href="', $scripturl, '?action=helpadmin;help=see_member_ip" onclick="return reqWin(this.href);" class="help">', $txt['logged'], '</a>';
  644. // Otherwise, you see NOTHING!
  645. else
  646. echo '
  647. ', $txt['logged'];
  648.  
  649. echo '
  650. </div>';
  651.  
  652. // Are there any custom profile fields for above the signature?
  653. if (!empty($message['member']['custom_fields']))
  654. {
  655. $shown = false;
  656. foreach ($message['member']['custom_fields'] as $custom)
  657. {
  658. if ($custom['placement'] != 2 || empty($custom['value']))
  659. continue;
  660. if (empty($shown))
  661. {
  662. $shown = true;
  663. echo '
  664. <div class="custom_fields_above_signature">
  665. <ul class="reset nolist">';
  666. }
  667. echo '
  668. <li>', $custom['value'], '</li>';
  669. }
  670. if ($shown)
  671. echo '
  672. </ul>
  673. </div>';
  674. }
  675.  
  676. // Show the member's signature?
  677. if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
  678. echo '
  679. <div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';
  680.  
  681. echo '
  682. </div>
  683. </div>
  684. </div>
  685. </div>
  686. </div>
  687. <hr />';
  688. }
  689. echo '
  690. </form>
  691. </div>
  692. <a id="lastPost"></a>';
  693.  
  694. // Show the page index... "Pages: [1]".
  695. echo '
  696. <div class="pagesection">
  697. ', template_button_strip($normal_buttons, 'right'), '
  698. <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>
  699. <div class="nextlinks_bottom">', $context['previous_next'], '</div>
  700. </div>';
  701.  
  702. // Show the lower breadcrumbs.
  703. theme_linktree();
  704.  
  705. $mod_buttons = array(
  706. 'move' => array('test' => 'can_move', 'text' => 'move_topic', 'image' => 'admin_move.gif', 'lang' => true, 'url' => $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0'),
  707. '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']),
  708. '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']),
  709. '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']),
  710. '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']),
  711. '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'),
  712. );
  713.  
  714. // Restore topic. eh? No monkey business.
  715. if ($context['can_restore_topic'])
  716. $mod_buttons[] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
  717.  
  718. // Allow adding new mod buttons easily.
  719. call_integration_hook('integrate_mod_buttons', array(&$mod_buttons));
  720.  
  721. echo '
  722. <div id="moderationbuttons">', template_button_strip($mod_buttons, 'bottom', array('id' => 'moderationbuttons_strip')), '</div>';
  723.  
  724. // Show the jumpto box, or actually...let Javascript do it.
  725. echo '
  726. <div class="plainbox" id="display_jump_to">&nbsp;</div>';
  727.  
  728. if ($context['can_reply'] && !empty($options['display_quick_reply']))
  729. {
  730. echo '
  731. <a id="quickreply"></a>
  732. <div class="tborder" id="quickreplybox">
  733. <div class="cat_bar">
  734. <h3 class="catbg">
  735. <span class="ie6_header floatleft"><a href="javascript:oQuickReply.swap();">
  736. <img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" id="quickReplyExpand" class="icon" />
  737. </a>
  738. <a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
  739. </span>
  740. </h3>
  741. </div>
  742. <div id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
  743. <span class="upperframe"><span></span></span>
  744. <div class="roundframe">
  745. <p class="smalltext lefttext">', $txt['quick_reply_desc'], '</p>
  746. ', $context['is_locked'] ? '<p class="alert smalltext">' . $txt['quick_reply_warning'] . '</p>' : '',
  747. $context['oldTopicError'] ? '<p class="alert smalltext">' . sprintf($txt['error_old_topic'], $modSettings['oldTopicDays']) . '</p>' : '', '
  748. ', $context['can_reply_approved'] ? '' : '<em>' . $txt['wait_for_approval'] . '</em>', '
  749. ', !$context['can_reply_approved'] && $context['require_verification'] ? '<br />' : '', '
  750. <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;">
  751. <input type="hidden" name="topic" value="', $context['current_topic'], '" />
  752. <input type="hidden" name="subject" value="', $context['response_prefix'], $context['subject'], '" />
  753. <input type="hidden" name="icon" value="xx" />
  754. <input type="hidden" name="from_qr" value="1" />
  755. <input type="hidden" name="notify" value="', $context['is_marked_notify'] || !empty($options['auto_notify']) ? '1' : '0', '" />
  756. <input type="hidden" name="not_approved" value="', !$context['can_reply_approved'], '" />
  757. <input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
  758. <input type="hidden" name="last_msg" value="', $context['topic_last_message'], '" />
  759. <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
  760. <input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />';
  761.  
  762. // Guests just need more.
  763. if ($context['user']['is_guest'])
  764. echo '
  765. <strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
  766. <strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
  767.  
  768. // Is visual verification enabled?
  769. if ($context['require_verification'])
  770. echo '
  771. <strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
  772.  
  773. echo '
  774. <div class="quickReplyContent">
  775. <textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
  776. </div>
  777. <div class="righttext padding">
  778. <input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
  779. <input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  780.  
  781. if ($context['show_spellchecking'])
  782. echo '
  783. <input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
  784.  
  785. echo '
  786. </div>
  787. </form>
  788. </div>
  789. <span class="lowerframe"><span></span></span>
  790. </div>
  791. </div>';
  792. }
  793. else
  794. echo '
  795. <br class="clear" />';
  796.  
  797. if ($context['show_spellchecking'])
  798. echo '
  799. <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>
  800. <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/spellcheck.js"></script>';
  801.  
  802. echo '
  803. <script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/topic.js"></script>
  804. <script type="text/javascript"><!-- // --><![CDATA[';
  805.  
  806. if (!empty($options['display_quick_reply']))
  807. echo '
  808. var oQuickReply = new QuickReply({
  809. bDefaultCollapsed: ', !empty($options['display_quick_reply']) && $options['display_quick_reply'] == 2 ? 'false' : 'true', ',
  810. iTopicId: ', $context['current_topic'], ',
  811. iStart: ', $context['start'], ',
  812. sScriptUrl: smf_scripturl,
  813. sImagesUrl: "', $settings['images_url'], '",
  814. sContainerId: "quickReplyOptions",
  815. sImageId: "quickReplyExpand",
  816. sImageCollapsed: "collapse.gif",
  817. sImageExpanded: "expand.gif",
  818. sJumpAnchor: "quickreply"
  819. });';
  820.  
  821. if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
  822. echo '
  823. var oInTopicModeration = new InTopicModeration({
  824. sSelf: \'oInTopicModeration\',
  825. sCheckboxContainerMask: \'in_topic_mod_check_\',
  826. aMessageIds: [\'', implode('\', \'', $removableMessageIDs), '\'],
  827. sSessionId: \'', $context['session_id'], '\',
  828. sSessionVar: \'', $context['session_var'], '\',
  829. sButtonStrip: \'moderationbuttons\',
  830. sButtonStripDisplay: \'moderationbuttons_strip\',
  831. bUseImageButton: false,
  832. bCanRemove: ', $context['can_remove_post'] ? 'true' : 'false', ',
  833. sRemoveButtonLabel: \'', $txt['quickmod_delete_selected'], '\',
  834. sRemoveButtonImage: \'delete_selected.gif\',
  835. sRemoveButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  836. bCanRestore: ', $context['can_restore_msg'] ? 'true' : 'false', ',
  837. sRestoreButtonLabel: \'', $txt['quick_mod_restore'], '\',
  838. sRestoreButtonImage: \'restore_selected.gif\',
  839. sRestoreButtonConfirm: \'', $txt['quickmod_confirm'], '\',
  840. sFormId: \'quickModForm\'
  841. });';
  842.  
  843. echo '
  844. if (\'XMLHttpRequest\' in window)
  845. {
  846. var oQuickModify = new QuickModify({
  847. sScriptUrl: smf_scripturl,
  848. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  849. iTopicId: ', $context['current_topic'], ',
  850. sTemplateBodyEdit: ', JavaScriptEscape('
  851. <div id="quick_edit_body_container" style="width: 90%">
  852. <div id="error_box" style="padding: 4px;" class="error"></div>
  853. <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 />
  854. <input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
  855. <input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
  856. <input type="hidden" name="msg" value="%msg_id%" />
  857. <div class="righttext">
  858. <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" />
  859. </div>
  860. </div>'), ',
  861. sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . $context['tabindex']++ . '" class="input_text" />'), ',
  862. sTemplateBodyNormal: ', JavaScriptEscape('%body%'), ',
  863. sTemplateSubjectNormal: ', JavaScriptEscape('<a href="' . $scripturl . '?topic=' . $context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
  864. sTemplateTopSubject: ', JavaScriptEscape($txt['topic'] . ': %subject% &nbsp;(' . $txt['read'] . ' ' . $context['num_views'] . ' ' . $txt['times'] . ')'), ',
  865. sErrorBorderStyle: ', JavaScriptEscape('1px solid red'), '
  866. });
  867.  
  868. aJumpTo[aJumpTo.length] = new JumpTo({
  869. sContainerId: "display_jump_to",
  870. sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",
  871. iCurBoardId: ', $context['current_board'], ',
  872. iCurBoardChildLevel: ', $context['jump_to']['child_level'], ',
  873. sCurBoardName: "', $context['jump_to']['board_name'], '",
  874. sBoardChildLevelIndicator: "==",
  875. sBoardPrefix: "=> ",
  876. sCatSeparator: "-----------------------------",
  877. sCatPrefix: "",
  878. sGoButtonLabel: "', $txt['go'], '"
  879. });
  880.  
  881. aIconLists[aIconLists.length] = new IconList({
  882. sBackReference: "aIconLists[" + aIconLists.length + "]",
  883. sIconIdPrefix: "msg_icon_",
  884. sScriptUrl: smf_scripturl,
  885. bShowModify: ', $settings['show_modify'] ? 'true' : 'false', ',
  886. iBoardId: ', $context['current_board'], ',
  887. iTopicId: ', $context['current_topic'], ',
  888. sSessionId: "', $context['session_id'], '",
  889. sSessionVar: "', $context['session_var'], '",
  890. sLabelIconList: "', $txt['message_icon'], '",
  891. sBoxBackground: "transparent",
  892. sBoxBackgroundHover: "#ffffff",
  893. iBoxBorderWidthHover: 1,
  894. sBoxBorderColorHover: "#adadad" ,
  895. sContainerBackground: "#ffffff",
  896. sContainerBorder: "1px solid #adadad",
  897. sItemBorder: "1px solid #ffffff",
  898. sItemBorderHover: "1px dotted gray",
  899. sItemBackground: "transparent",
  900. sItemBackgroundHover: "#e0e0f0"
  901. });
  902. }';
  903.  
  904. if (!empty($ignoredMsgs))
  905. {
  906. echo '
  907. var aIgnoreToggles = new Array();';
  908.  
  909. foreach ($ignoredMsgs as $msgid)
  910. {
  911. echo '
  912. aIgnoreToggles[', $msgid, '] = new smc_Toggle({
  913. bToggleEnabled: true,
  914. bCurrentlyCollapsed: true,
  915. aSwappableContainers: [
  916. \'msg_', $msgid, '_extra_info\',
  917. \'msg_', $msgid, '\',
  918. \'msg_', $msgid, '_footer\',
  919. \'msg_', $msgid, '_quick_mod\',
  920. \'modify_button_', $msgid, '\',
  921. \'msg_', $msgid, '_signature\'
  922.  
  923. ],
  924. aSwapLinks: [
  925. {
  926. sId: \'msg_', $msgid, '_ignored_link\',
  927. msgExpanded: \'\',
  928. msgCollapsed: ', JavaScriptEscape($txt['show_ignore_user_post']), '
  929. }
  930. ]
  931. });';
  932. }
  933. }
  934.  
  935. echo '
  936. // ]]></script>';
  937. }
  938.  
  939. mysqli_close($conectate);
  940. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement