/** * Simple Machines Forum (SMF) * * @package SMF * @author Simple Machines * @copyright 2011 Simple Machines * @license http://www.simplemachines.org/about/smf/license.php BSD * * @version 2.0 */ function template_browse() { global $context, $settings, $options, $scripturl, $txt; echo ' <div id="manage_mail"> <div class="cat_bar"> <h3 class="catbg">', $txt['mailqueue_stats'], '</h3> </div> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> <dl class="settings"> <dt><strong>', $txt['mailqueue_size'], '</strong></dt> <dd>', $context['mail_queue_size'], '</dd> <dt><strong>', $txt['mailqueue_oldest'], '</strong></dt> <dd>', $context['oldest_mail'], '</dd> </dl> </div> <span class="botslice"><span></span></span> </div>'; template_show_list('mail_queue'); echo ' </div> <br class="clear" />'; }
/** * Template for listing all scheduled tasks. */ function template_view_scheduled_tasks() { global $context, $txt; // We completed some tasks? if (!empty($context['tasks_were_run'])) { if (empty($context['scheduled_errors'])) { echo ' <div id="task_completed" class="successbox"> ', $txt['scheduled_tasks_were_run'], ' </div>'; } else { echo ' <div id="errors" class="errorbox"> ', $txt['scheduled_tasks_were_run_errors'], '<br />'; foreach ($context['scheduled_errors'] as $task => $errors) { echo isset($txt['scheduled_task_' . $task]) ? $txt['scheduled_task_' . $task] : $task, ' <ul> <li class="listlevel1">', implode('</li><li class="listlevel1">', $errors), '</li> </ul>'; } echo ' </div>'; } } template_show_list('scheduled_tasks'); }
/** * Simple Machines Forum (SMF) * * @package SMF * @author Simple Machines * @copyright 2011 Simple Machines * @license http://www.simplemachines.org/about/smf/license.php BSD * * @version 2.0 */ function template_main() { global $context, $settings, $options, $scripturl, $txt; template_show_list('regular_membergroups_list'); echo '<br /><br />'; template_show_list('post_count_membergroups_list'); }
/** * Editing the smiley sets. */ function template_editsets() { echo ' <div id="admincenter">'; template_show_list('smiley_set_list'); echo ' </div>'; }
function template_view_scheduled_tasks() { global $context, $settings, $options, $txt, $scripturl, $modSettings; // We completed some tasks? if (!empty($context['tasks_were_run'])) { echo ' <div id="task_completed"> ', $txt['scheduled_tasks_were_run'], ' </div>'; } template_show_list('scheduled_tasks'); }
/** * Template for showing custom profile fields. */ function template_show_custom_profile() { // Standard fields. template_show_list('standard_profile_fields'); // Disable the show on registration box if the profile field is not active echo ' <script><!-- // --><![CDATA[ var iNumChecks = document.forms.standardProfileFields.length; for (var i = 0; i < iNumChecks; i++) { if (document.forms.standardProfileFields[i].id.indexOf(\'reg_\') === 0) document.forms.standardProfileFields[i].disabled = document.forms.standardProfileFields[i].disabled || !document.getElementById(\'active_\' + document.forms.standardProfileFields[i].id.substr(4)).checked; } // ]]></script>'; // Custom fields. template_show_list('custom_profile_fields'); }
/** * Template for the mail queue */ function template_mail_queue() { global $context, $txt; echo ' <div id="manage_mail"> <div id="mailqueue_stats"> <h2 class="category_header">', $txt['mailqueue_stats'], '</h2> <div class="windowbg"> <div class="content"> <dl class="settings"> <dt><strong>', $txt['mailqueue_size'], '</strong></dt> <dd>', $context['mail_queue_size'], '</dd> <dt><strong>', $txt['mailqueue_oldest'], '</strong></dt> <dd>', $context['oldest_mail'], '</dd> </dl> </div> </div> </div>'; template_show_list('mail_queue'); echo ' </div>'; }
/** * SMF Arcade * * @package SMF Arcade * @version 2.6 Alpha * @license http://download.smfarcade.info/license.php New-BSD */ function template_manage_games_list() { global $context, $txt, $scripturl, $settings; if (!empty($context['qaction_title'])) { echo ' <div id="arcade_message"> <div class="windowbg" style="margin: 1ex; padding: 1ex 2ex; border: 1px dashed green; color: green;"> <div style="text-decoration: underline;" id="arcade_message_title">', $context['qaction_title'], '</div> <div id="arcade_message_text">', $context['qaction_text'], ': <ul>'; if (!empty($context['qaction_data'])) { foreach ($context['qaction_data'] as $game) { echo ' <li>', $game['name'], !empty($game['error']) ? '<div class="smalltext" style="color: red">' . vsprintf($txt[$game['error'][0]], $game['error'][1]) . '</div>' : '', '</li>'; } } echo ' </ul> </div> </div> </div><br />'; } template_show_list('games_list'); }
/** * Spider stats section. */ function template_show_spider_stats() { global $context, $txt, $scripturl; echo ' <div id="admincenter">'; // Standard fields. template_show_list('spider_stat_list'); echo ' <form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=sengines;sa=stats" method="post" accept-charset="UTF-8"> <h2 class="category_header">', $txt['spider_logs_delete'], '</h2> <div class="windowbg"> <div class="content"> <p> <label for="older">', sprintf($txt['spider_stats_delete_older'], '<input type="text" name="older" id="older" value="7" size="3" class="input_text" />'), '</label> </p> <hr /> <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> <input type="hidden" name="', $context['admin-ss_token_var'], '" value="', $context['admin-ss_token'], '" /> <input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value < 1 && !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="right_submit" /> <br /> </div> </div> </form> </div>'; }
function template_issueWarning() { global $context, $settings, $options, $scripturl, $modSettings, $txt; template_load_warning_variables(); echo ' <script type="text/javascript"><!-- // --><![CDATA[ function setWarningBarPos(curEvent, isMove, changeAmount) { barWidth = ', $context['warningBarWidth'], '; // Are we passing the amount to change it by? if (changeAmount) { if (document.getElementById(\'warning_level\').value == \'SAME\') percent = ', $context['member']['warning'], ' + changeAmount; else percent = parseInt(document.getElementById(\'warning_level\').value) + changeAmount; } // If not then it\'s a mouse thing. else { if (!curEvent) var curEvent = window.event; // If it\'s a movement check the button state first! if (isMove) { if (!curEvent.button || curEvent.button != 1) return false } // Get the position of the container. contain = document.getElementById(\'warning_contain\'); position = 0; while (contain != null) { position += contain.offsetLeft; contain = contain.offsetParent; } // Where is the mouse? if (curEvent.pageX) { mouse = curEvent.pageX; } else { mouse = curEvent.clientX; mouse += document.documentElement.scrollLeft != "undefined" ? document.documentElement.scrollLeft : document.body.scrollLeft; } // Is this within bounds? if (mouse < position || mouse > position + barWidth) return; percent = Math.round(((mouse - position) / barWidth) * 100); // Round percent to the nearest 5 - by kinda cheating! percent = Math.round(percent / 5) * 5; } // What are the limits? minLimit = ', $context['min_allowed'], '; maxLimit = ', $context['max_allowed'], '; percent = Math.max(percent, minLimit); percent = Math.min(percent, maxLimit); size = barWidth * (percent/100); setInnerHTML(document.getElementById(\'warning_text\'), percent + "%"); document.getElementById(\'warning_text\').innerHTML = percent + "%"; document.getElementById(\'warning_level\').value = percent; document.getElementById(\'warning_progress\').style.width = size + "px"; // Get the right color. color = "black"'; foreach ($context['colors'] as $limit => $color) { echo ' if (percent >= ', $limit, ') color = "', $color, '";'; } echo ' document.getElementById(\'warning_progress\').style.backgroundColor = color; // Also set the right effect. effectText = "";'; foreach ($context['level_effects'] as $limit => $text) { echo ' if (percent >= ', $limit, ') effectText = "', $text, '";'; } echo ' setInnerHTML(document.getElementById(\'cur_level_div\'), effectText); } // Disable notification boxes as required. function modifyWarnNotify() { disable = !document.getElementById(\'warn_notify\').checked; document.getElementById(\'warn_sub\').disabled = disable; document.getElementById(\'warn_body\').disabled = disable; document.getElementById(\'warn_temp\').disabled = disable; document.getElementById(\'new_template_link\').style.display = disable ? \'none\' : \'\'; document.getElementById(\'preview_button\').style.display = disable ? \'none\' : \'\'; } function changeWarnLevel(amount) { setWarningBarPos(false, false, amount); } // Warn template. function populateNotifyTemplate() { index = document.getElementById(\'warn_temp\').value; if (index == -1) return false; // Otherwise see what we can do...'; foreach ($context['notification_templates'] as $k => $type) { echo ' if (index == ', $k, ') document.getElementById(\'warn_body\').value = "', strtr($type['body'], array('"' => "'", "\n" => '\\n', "\r" => '')), '";'; } echo ' } // ]]></script>'; echo ' <form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=issuewarning" method="post" class="flow_hidden" accept-charset="', $context['character_set'], '"> <div class="cat_bar"> <h3 class="catbg"> <img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" /> ', $context['user']['is_owner'] ? $txt['profile_warning_level'] : $txt['profile_issue_warning'], ' </h3> </div>'; if (!$context['user']['is_owner']) { echo ' <p class="description">', $txt['profile_warning_desc'], '</p>'; } echo ' <div class="windowbg"> <div class="content"> <dl class="settings">'; if (!$context['user']['is_owner']) { echo ' <dt> <strong>', $txt['profile_warning_name'], ':</strong> </dt> <dd> <strong>', $context['member']['name'], '</strong> </dd>'; } echo ' <dt> <strong>', $txt['profile_warning_level'], ':</strong>'; // Is there only so much they can apply? if ($context['warning_limit']) { echo ' <br /><span class="smalltext">', sprintf($txt['profile_warning_limit_attribute'], $context['warning_limit']), '</span>'; } echo ' </dt> <dd> <div id="warndiv1" style="display: none;"> <div> <span class="floatleft" style="padding: 0 0.5em"><a href="#" onclick="changeWarnLevel(-5); return false;">[-]</a></span> <div class="floatleft" id="warning_contain" style="font-size: 8pt; height: 12pt; width: ', $context['warningBarWidth'], 'px; border: 1px solid black; background-color: white; padding: 1px; position: relative;" onmousedown="setWarningBarPos(event, true);" onmousemove="setWarningBarPos(event, true);" onclick="setWarningBarPos(event);"> <div id="warning_text" style="padding-top: 1pt; width: 100%; z-index: 2; color: black; position: absolute; text-align: center; font-weight: bold;">', $context['member']['warning'], '%</div> <div id="warning_progress" style="width: ', $context['member']['warning'], '%; height: 12pt; z-index: 1; background-color: ', $context['current_color'], ';"> </div> </div> <span class="floatleft" style="padding: 0 0.5em"><a href="#" onclick="changeWarnLevel(5); return false;">[+]</a></span> <div class="clear_left smalltext">', $txt['profile_warning_impact'], ': <span id="cur_level_div">', $context['level_effects'][$context['current_level']], '</span></div> </div> <input type="hidden" name="warning_level" id="warning_level" value="SAME" /> </div> <div id="warndiv2"> <input type="text" name="warning_level_nojs" size="6" maxlength="4" value="', $context['member']['warning'], '" class="input_text" /> ', $txt['profile_warning_max'], ' <div class="smalltext">', $txt['profile_warning_impact'], ':<br />'; // For non-javascript give a better list. foreach ($context['level_effects'] as $limit => $effect) { echo ' ', sprintf($txt['profile_warning_effect_text'], $limit, $effect), '<br />'; } echo ' </div> </div> </dd>'; if (!$context['user']['is_owner']) { echo ' <dt> <strong>', $txt['profile_warning_reason'], ':</strong><br /> <span class="smalltext">', $txt['profile_warning_reason_desc'], '</span> </dt> <dd> <input type="text" name="warn_reason" id="warn_reason" value="', $context['warning_data']['reason'], '" size="50" style="width: 80%;" class="input_text" /> </dd> </dl> <hr /> <div id="box_preview"', !empty($context['warning_data']['body_preview']) ? '' : ' style="display:none"', '> <dl class="settings"> <dt> <strong>', $txt['preview'], '</strong> </dt> <dd id="body_preview"> ', !empty($context['warning_data']['body_preview']) ? $context['warning_data']['body_preview'] : '', ' </dd> </dl> <hr /> </div> <dl class="settings"> <dt> <strong><label for="warn_notify">', $txt['profile_warning_notify'], ':</label></strong> </dt> <dd> <input type="checkbox" name="warn_notify" id="warn_notify" onclick="modifyWarnNotify();" ', $context['warning_data']['notify'] ? 'checked="checked"' : '', ' class="input_check" /> </dd> <dt> <strong><label for="warn_sub">', $txt['profile_warning_notify_subject'], ':</label></strong> </dt> <dd> <input type="text" name="warn_sub" id="warn_sub" value="', empty($context['warning_data']['notify_subject']) ? $txt['profile_warning_notify_template_subject'] : $context['warning_data']['notify_subject'], '" size="50" style="width: 80%;" class="input_text" /> </dd> <dt> <strong><label for="warn_temp">', $txt['profile_warning_notify_body'], ':</label></strong> </dt> <dd> <select name="warn_temp" id="warn_temp" disabled="disabled" onchange="populateNotifyTemplate();" style="font-size: x-small;"> <option value="-1">', $txt['profile_warning_notify_template'], '</option> <option value="-1">------------------------------</option>'; foreach ($context['notification_templates'] as $id_template => $template) { echo ' <option value="', $id_template, '">', $template['title'], '</option>'; } echo ' </select> <span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank" class="new_win">', $txt['profile_warning_new_template'], '</a>]</span><br /> <textarea name="warn_body" id="warn_body" cols="40" rows="8" style="min-width: 50%; max-width: 99%;">', $context['warning_data']['notify_body'], '</textarea> </dd>'; } echo ' </dl> <div class="righttext">'; if (!empty($context['token_check'])) { echo ' <input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />'; } echo ' <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> <input type="submit" name="preview" id="preview_button" value="', $txt['preview'], '" class="button_submit" /> <input type="submit" name="save" value="', $context['user']['is_owner'] ? $txt['change_profile'] : $txt['profile_warning_issue'], '" class="button_submit" /> </div> </div> </div> </form>'; // Previous warnings? template_show_list('view_warnings'); // Do our best to get pretty javascript enabled. echo ' <script type="text/javascript"><!-- // --><![CDATA[ document.getElementById(\'warndiv1\').style.display = ""; document.getElementById(\'preview_button\').style.display = "none"; document.getElementById(\'warndiv2\').style.display = "none";'; if (!$context['user']['is_owner']) { echo ' modifyWarnNotify(); $(document).ready(function() { $("#preview_button").click(function() { return ajax_getTemplatePreview(); }); }); function ajax_getTemplatePreview () { $.ajax({ type: "POST", url: "' . $scripturl . '?action=xmlhttp;sa=previews;xml", data: {item: "warning_preview", title: $("#warn_sub").val(), body: $("#warn_body").val(), issuing: true}, context: document.body, success: function(request){ $("#box_preview").css({display:""}); $("#body_preview").html($(request).find(\'body\').text()); if ($(request).find("error").text() != \'\') { $("#profile_error").css({display:""}); var errors_html = \'<span>\' + $("#profile_error").find("span").html() + \'</span>\' + \'<ul class="list_errors" class="reset">\'; var errors = $(request).find(\'error\').each(function() { errors_html += \'<li>\' + $(this).text() + \'</li>\'; }); errors_html += \'</ul>\'; $("#profile_error").html(errors_html); } else { $("#profile_error").css({display:"none"}); $("#error_list").html(\'\'); } return false; }, }); return false; }'; } echo ' // ]]></script>'; }
function template_show_spider_logs() { global $context, $txt, $settings, $scripturl; echo ' <div id="admincenter">'; // Standard fields. template_show_list('spider_logs'); echo ' <br /> <div class="cat_bar"> <h3 class="catbg">', $txt['spider_logs_delete'], '</h3> </div> <form action="', $scripturl, '?action=admin;area=sengines;sa=logs;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '"> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> <p> ', $txt['spider_logs_delete_older'], ' <input type="text" name="older" id="older" value="7" size="3" class="input_text" /> ', $txt['spider_logs_delete_day'], ' </p> <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> <input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value < 1 && !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="button_submit" /> </div> <span class="botslice"><span></span></span> </div> </form> </div> <br class="clear" />'; }
function template_extract_package() { global $context, $settings, $options, $txt, $scripturl; if (!empty($context['redirect_url'])) { echo ' <script type="text/javascript"><!-- // --><![CDATA[ setTimeout("doRedirect();", ', empty($context['redirect_timeout']) ? '5000' : $context['redirect_timeout'], '); function doRedirect() { window.location = "', $context['redirect_url'], '"; } // ]]></script>'; } echo ' <div id="admincenter">'; if (empty($context['redirect_url'])) { echo ' <div class="cat_bar"> <h3 class="catbg">', $context['uninstalling'] ? $txt['uninstall'] : $txt['extracting'], '</h3> </div> <div class="information">', $txt['package_installed_extract'], '</div>'; } else { echo ' <div class="cat_bar"> <h3 class="catbg">', $txt['package_installed_redirecting'], '</h3> </div>'; } echo ' <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content">'; // If we are going to redirect we have a slightly different agenda. if (!empty($context['redirect_url'])) { echo ' ', $context['redirect_text'], '<br /><br /> <a href="', $context['redirect_url'], '">', $txt['package_installed_redirect_go_now'], '</a> | <a href="', $scripturl, '?action=admin;area=packages;sa=browse">', $txt['package_installed_redirect_cancel'], '</a>'; } elseif ($context['uninstalling']) { echo ' ', $txt['package_uninstall_done']; } elseif ($context['install_finished']) { if ($context['extract_type'] == 'avatar') { echo ' ', $txt['avatars_extracted']; } elseif ($context['extract_type'] == 'language') { echo ' ', $txt['language_extracted']; } else { echo ' ', $txt['package_installed_done']; } } else { echo ' ', $txt['corrupt_compatible']; } echo ' </div> <span class="botslice"><span></span></span> </div>'; // Show the "restore permissions" screen? if (function_exists('template_show_list') && !empty($context['restore_file_permissions']['rows'])) { echo '<br />'; template_show_list('restore_file_permissions'); } echo ' </div> <br class="clear" />'; }
function template_viewWarning() { global $context, $txt, $scripturl, $settings; template_load_warning_variables(); echo ' <div class="title_bar"> <h3 class="titlebg"> <span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" class="icon" /> ', sprintf($txt['profile_viewwarning_for_user'], $context['member']['name']), ' </span> </h3> </div> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> <dl class="settings"> <dt> <strong>', $txt['profile_warning_name'], ':</strong> </dt> <dd> ', $context['member']['name'], ' </dd> <dt> <strong>', $txt['profile_warning_level'], ':</strong> </dt> <dd> <div> <div> <div style="font-size: 8pt; height: 12pt; width: ', $context['warningBarWidth'], 'px; border: 1px solid black; background-color: white; padding: 1px; position: relative;"> <div id="warning_text" style="padding-top: 1pt; width: 100%; z-index: 2; color: black; position: absolute; text-align: center; font-weight: bold;">', $context['member']['warning'], '%</div> <div id="warning_progress" style="width: ', $context['member']['warning'], '%; height: 12pt; z-index: 1; background-color: ', $context['current_color'], ';"> </div> </div> </div> </div> </dd>'; // There's some impact of this? if (!empty($context['level_effects'][$context['current_level']])) { echo ' <dt> <strong>', $txt['profile_viewwarning_impact'], ':</strong> </dt> <dd> ', $context['level_effects'][$context['current_level']], ' </dd>'; } echo ' </dl> </div> <span class="botslice"><span></span></span> </div>'; template_show_list('view_warnings'); }
function template_kbmanage() { global $context, $total_report, $total_approvecom, $total_approve, $scripturl, $txt; echo '<script type="text/javascript"> <!-- function confirmSubmit() { var agree=confirm("' . $txt['kb_sure_contjs'] . '"); if (agree) return true ; else return false ; } // --> </script>'; echo ' <div class="cat_bar"> <h3 class="catbg">' . $txt['kb_manage1'] . '</h3> </div>'; echo ' <div class="information centertext"> ' . $txt['kb_manage2'] . ' <strong>' . $total_approve . '</strong> ' . $txt['kb_manage3'] . ' <br />' . $txt['kb_manage2'] . ' <strong>' . $total_approvecom . '</strong> ' . $txt['kb_manage4'] . ' <br />' . $txt['kb_manage2'] . ' <strong>' . $total_report . '</strong> ' . $txt['kb_manage5'] . ' <br /><br /><a href="' . $scripturl . '?action=kb;area=catadd">[' . $txt['knowledgebasecatadd'] . ']</a> | <a href="' . $scripturl . '?action=kb;area=listcat">[' . $txt['knowledgebasecataddedit'] . ']</a> | <a href="' . $scripturl . '?action=kb;area=addknow;cat=0">[' . $txt['knowledgebasecataddedit1'] . ']</a> </div>'; template_show_list('kb_know_reports'); echo '<br />'; template_show_list('kb_knowcomappr'); echo '<br />'; template_show_list('kb_know'); template_kb_copy(); }
function template_download_language() { global $context, $settings, $options, $txt, $scripturl, $modSettings; // Actually finished? if (!empty($context['install_complete'])) { echo ' <div id="admincenter"> <div class="cat_bar"> <h3 class="catbg"> ', $txt['languages_download_complete'], ' </h3> </div> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> ', $context['install_complete'], ' </div> <span class="botslice"><span></span></span> </div> </div> <br class="clear" />'; return; } // An error? if (!empty($context['error_message'])) { echo ' <div id="errorbox"> <p>', $context['error_message'], '</p> </div>'; } // Provide something of an introduction... echo ' <div id="admincenter"> <form action="', $scripturl, '?action=admin;area=languages;sa=downloadlang;did=', $context['download_id'], ';', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '"> <div class="cat_bar"> <h3 class="catbg"> ', $txt['languages_download'], ' </h3> </div> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> <p> ', $txt['languages_download_note'], ' </p> <div class="smalltext"> ', $txt['languages_download_info'], ' </div> </div> <span class="botslice"><span></span></span> </div>'; // Show the main files. template_show_list('lang_main_files_list'); // Now, all the images and the likes, hidden via javascript 'cause there are so fecking many. echo ' <br /> <div class="title_bar"> <h3 class="titlebg"> ', $txt['languages_download_theme_files'], ' </h3> </div> <table class="table_grid" cellspacing="0" width="100%"> <thead> <tr class="catbg"> <th class="first_th" scope="col"> ', $txt['languages_download_filename'], ' </th> <th scope="col" width="100"> ', $txt['languages_download_writable'], ' </th> <th scope="col" width="100"> ', $txt['languages_download_exists'], ' </th> <th class="last_th" scope="col" width="50"> ', $txt['languages_download_copy'], ' </th> </tr> </thead> <tbody>'; foreach ($context['files']['images'] as $theme => $group) { $count = 0; echo ' <tr class="titlebg"> <td colspan="4"> <img src="', $settings['images_url'], '/sort_down.gif" id="toggle_image_', $theme, '" alt="*" /> ', isset($context['theme_names'][$theme]) ? $context['theme_names'][$theme] : $theme, ' </td> </tr>'; $alternate = false; foreach ($group as $file) { echo ' <tr class="windowbg', $alternate ? '2' : '', '" id="', $theme, '-', $count++, '"> <td> <strong>', $file['name'], '</strong><br /> <span class="smalltext">', $txt['languages_download_dest'], ': ', $file['destination'], '</span> </td> <td> <span style="color: ', $file['writable'] ? 'green' : 'red', ';">', $file['writable'] ? $txt['yes'] : $txt['no'], '</span> </td> <td> ', $file['exists'] ? $file['exists'] == 'same' ? $txt['languages_download_exists_same'] : $txt['languages_download_exists_different'] : $txt['no'], ' </td> <td> <input type="checkbox" name="copy_file[]" value="', $file['generaldest'], '"', $file['default_copy'] ? ' checked="checked"' : '', ' class="input_check" /> </td> </tr>'; $alternate = !$alternate; } } echo ' </tbody> </table>'; // Do we want some FTP baby? if (!empty($context['still_not_writable'])) { if (!empty($context['package_ftp']['error'])) { echo ' <div id="errorbox"> <tt>', $context['package_ftp']['error'], '</tt> </div>'; } echo ' <div class="cat_bar"> <h3 class="catbg"> ', $txt['package_ftp_necessary'], ' </h3> </div> <div class="windowbg"> <span class="topslice"><span></span></span> <div class="content"> <p>', $txt['package_ftp_why'], '</p> <dl class="settings"> <dt <label for="ftp_server">', $txt['package_ftp_server'], ':</label> </dt> <dd> <div class="floatright" style="margin-right: 1px;"><label for="ftp_port" style="padding-top: 2px; padding-right: 2ex;">', $txt['package_ftp_port'], ': </label> <input type="text" size="3" name="ftp_port" id="ftp_port" value="', isset($context['package_ftp']['port']) ? $context['package_ftp']['port'] : (isset($modSettings['package_port']) ? $modSettings['package_port'] : '21'), '" class="input_text" /></div> <input type="text" size="30" name="ftp_server" id="ftp_server" value="', isset($context['package_ftp']['server']) ? $context['package_ftp']['server'] : (isset($modSettings['package_server']) ? $modSettings['package_server'] : 'localhost'), '" style="width: 70%;" class="input_text" /> </dd> <dt> <label for="ftp_username">', $txt['package_ftp_username'], ':</label> </dt> <dd> <input type="text" size="50" name="ftp_username" id="ftp_username" value="', isset($context['package_ftp']['username']) ? $context['package_ftp']['username'] : (isset($modSettings['package_username']) ? $modSettings['package_username'] : ''), '" style="width: 99%;" class="input_text" /> </dd> <dt> <label for="ftp_password">', $txt['package_ftp_password'], ':</label> </dt> <dd> <input type="password" size="50" name="ftp_password" id="ftp_password" style="width: 99%;" class="input_text" /> </dd> <dt> <label for="ftp_path">', $txt['package_ftp_path'], ':</label> </dt> <dd> <input type="text" size="50" name="ftp_path" id="ftp_path" value="', $context['package_ftp']['path'], '" style="width: 99%;" class="input_text" /> </dd> </dl> </div> <span class="botslice"><span></span></span> </div>'; } // Install? echo ' <div class="righttext padding"> <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> <input type="submit" name="do_install" value="', $txt['add_language_smf_install'], '" class="button_submit" /> </div> </form> </div> <br class="clear" />'; // The javascript for expand and collapse of sections. echo ' <script type="text/javascript"><!-- // --><![CDATA['; // Each theme gets its own handler. foreach ($context['files']['images'] as $theme => $group) { $count = 0; echo ' var oTogglePanel_', $theme, ' = new smc_Toggle({ bToggleEnabled: true, bCurrentlyCollapsed: true, aSwappableContainers: ['; foreach ($group as $file) { echo ' ', JavaScriptEscape($theme . '-' . $count++), ','; } echo ' null ], aSwapImages: [ { sId: \'toggle_image_', $theme, '\', srcExpanded: smf_images_url + \'/sort_down.gif\', altExpanded: \'*\', srcCollapsed: smf_images_url + \'/selected.gif\', altCollapsed: \'*\' } ] });'; } echo ' // ]]></script>'; }
/** * Template for setting up how and what you want to be notified about */ function template_action_notification() { global $context, $txt, $scripturl, $modSettings; // The main containing header. echo ' <form action="', $scripturl, '?action=profile;area=notification;save" method="post" accept-charset="UTF-8" id="notify_options" class="flow_hidden"> <h2 class="category_header hdicon cat_img_profile"> ', $txt['profile'], ' </h2> <p class="description">', $txt['notification_info'], '</p> <div class="windowbg2"> <div class="content"> <dl class="settings">'; // Allow notification on announcements to be disabled? if (!empty($modSettings['allow_disableAnnounce'])) { echo ' <dt> <label for="notify_announcements">', $txt['notify_important_email'], '</label> </dt> <dd> <input type="hidden" name="notify_announcements" value="0" /> <input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' class="input_check" /> </dd>'; } // Auto notification when you reply / start a topic? echo ' <dt> <label for="auto_notify">', $txt['auto_notify'], '</label> </dt> <dd> <input type="hidden" name="default_options[auto_notify]" value="0" /> <input type="checkbox" id="auto_notify" name="default_options[auto_notify]" value="1"', !empty($context['member']['options']['auto_notify']) ? ' checked="checked"' : '', ' class="input_check" /> ', !empty($modSettings['maillist_enabled']) ? $txt['auto_notify_pbe_post'] : '', ' </dd>'; // Can the body of the post be sent, PBE will ensure it can if (empty($modSettings['disallow_sendBody'])) { echo ' <dt> <label for="notify_send_body">', $txt['notify_send_body' . (!empty($modSettings['maillist_enabled']) ? '_pbe' : '')], '</label> </dt> <dd> <input type="hidden" name="notify_send_body" value="0" /> <input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' class="input_check" /> ', !empty($modSettings['maillist_enabled']) ? $txt['notify_send_body_pbe_post'] : '', ' </dd>'; } // How often do you want to hear from us, instant, daily, weekly? echo ' <dt> <label for="notify_regularity">', $txt['notify_regularity'], '</label> </dt> <dd> <select name="notify_regularity" id="notify_regularity"> <option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected="selected"' : '', '>', $txt['notify_regularity_instant'], '</option> <option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_regularity_first_only'], '</option> <option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_regularity_daily'], '</option> <option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_regularity_weekly'], '</option> </select> </dd> <dt> <label for="notify_types">', $txt['notify_send_types'], '</label> </dt> <dd> <select name="notify_types" id="notify_types">'; // Using the maillist functions, then limit the options so they make sense if (empty($modSettings['maillist_enabled']) || empty($modSettings['pbe_no_mod_notices']) && !empty($modSettings['maillist_enabled'])) { echo ' <option value="1"', $context['member']['notify_types'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything'], '</option> <option value="2"', $context['member']['notify_types'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything_own'], '</option>'; } echo ' <option value="3"', $context['member']['notify_types'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_send_type_only_replies' . (!empty($modSettings['maillist_enabled']) ? '_pbe' : '')], '</option> <option value="4"', $context['member']['notify_types'] == 4 ? ' selected="selected"' : '', '>', $txt['notify_send_type_nothing'], '</option> </select> </dd> </dl> <hr /> <div class="submitbutton"> <input id="notify_submit" type="submit" value="', $txt['notify_save'], '" class="button_submit" /> <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />', !empty($context['token_check']) ? ' <input type="hidden" name="' . $context[$context['token_check'] . '_token_var'] . '" value="' . $context[$context['token_check'] . '_token'] . '" />' : '', ' <input type="hidden" name="u" value="', $context['id_member'], '" /> <input type="hidden" name="sa" value="', $context['menu_item_selected'], '" /> </div> </div> </div> </form>'; // Show the boards you have on notify template_show_list('board_notification_list'); echo ' <br />'; // And any topics you are watching as well template_show_list('topic_notification_list'); }
/** * Add a new language */ function template_add_language() { global $context, $txt, $scripturl; echo ' <div id="admincenter"> <form id="admin_form_wrapper"action="', $scripturl, '?action=admin;area=languages;sa=add;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="UTF-8"> <h2 class="category_header">', $txt['add_language'], '</h2> <div class="windowbg"> <div class="content"> <fieldset> <legend>', $txt['add_language_elk'], '</legend> <label for="lang_add" class="smalltext">', $txt['add_language_elk_browse'], '</label> <input type="text" id="lang_add" name="lang_add" size="40" value="', !empty($context['elk_search_term']) ? $context['elk_search_term'] : '', '" class="input_text" />'; // Do we have some errors? Too bad. if (!empty($context['langfile_error'])) { // Display a little error box. echo ' <div> <br /> <p class="errorbox">', $txt['add_language_error_' . $context['langfile_error']], '</p> </div>'; } echo ' </fieldset>', isBrowser('is_ie') ? '<input type="text" name="ie_fix" style="display: none;" class="input_text" /> ' : '', ' <input type="submit" name="lang_add_sub" value="', $txt['search'], '" class="right_submit" /> <br /> </div> </div> '; // Had some results? if (!empty($context['languages'])) { echo ' <div class="information">', $txt['add_language_elk_found'], '</div>'; template_show_list('languages'); } echo ' </form> </div>'; }
function template_kbdolog() { template_show_list('kb_list'); }
/** * Show the listing of addons on the system, installed, uninstalled, etc. */ function template_browse() { global $context, $txt; echo ' <div id="admincenter">'; $adds_available = false; foreach ($context['package_types'] as $type) { if (!empty($context['available_' . $type])) { template_show_list('packages_lists_' . $type); $adds_available = true; } } if (!$adds_available) { echo ' <div class="infobox">', $context['sub_action'] == 'browse' ? $txt['no_packages'] : $txt['no_adds_installed'], '</div>'; } echo ' </div>'; }
function template_attachment_paths() { template_show_list('attach_paths'); }
/** * Section on the page for attachments directories paths. */ function template_attach_paths() { global $modSettings; if (!empty($modSettings['attachment_basedirectories'])) { template_show_list('base_paths'); } template_show_list('attach_paths'); }
/** * View the details of a moderation report */ function template_viewmodreport() { global $context, $scripturl, $txt; echo ' <div id="modcenter"> <form action="', $scripturl, '?action=moderate;area=reports;report=', $context['report']['id'], '" method="post" accept-charset="UTF-8"> <h3 class="category_header"> ', sprintf($txt['mc_viewmodreport'], $context['report']['message_link'], $context['report']['author']['link']), ' </h3> <div class="windowbg2"> <p class="warningbox">', sprintf($txt['mc_modreport_summary'], $context['report']['num_reports'], $context['report']['last_updated']), '</p> <div class="content"> ', $context['report']['body'], ' </div> <ul class="quickbuttons"> <li class="listlevel1"> <a class="linklevel1 close_button" href="', $scripturl, '?action=moderate;area=reports;close=', (int) (!$context['report']['closed']), ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $context['report']['closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], '</a> </li> <li class="listlevel1"> <a class="linklevel1 ignore_button" href="', $scripturl, '?action=moderate;area=reports;ignore=', (int) (!$context['report']['ignore']), ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '" ', !$context['report']['ignore'] ? 'onclick="return confirm(' . JavaScriptEscape($txt['mc_reportedp_ignore_confirm']) . ');"' : '', '>', $context['report']['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'], '</a> </li> </ul> </div> <h3 class="category_header">', $txt['mc_modreport_whoreported_title'], '</h3>'; foreach ($context['report']['comments'] as $comment) { echo ' <div class="windowbg"> <div class="content"> <p class="smalltext">', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '</p> <p>', $comment['message'], '</p> </div> </div>'; } echo ' <h3 class="category_header">', $txt['mc_modreport_mod_comments'], '</h3> <div class="windowbg2"> <div class="content">'; if (empty($context['report']['mod_comments'])) { echo ' <p class="successbox">', $txt['mc_modreport_no_mod_comment'], '</p>'; } foreach ($context['report']['mod_comments'] as $comment) { echo '<p>', $comment['member']['link'], ': ', $comment['message'], ' <em class="smalltext">(', $comment['time'], ')</em></p>'; } echo ' <textarea rows="2" cols="60" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 60%; min-width: 60%' : 'width: 100%') . ';" name="mod_comment"></textarea> <div class="submitbutton"> <input type="submit" name="add_comment" value="', $txt['mc_modreport_add_mod_comment'], '" class="button_submit" /> </div> </div> </div>'; template_show_list('moderation_actions_list'); echo ' <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> </form> </div>'; }
/** * Template to browse members in admin panel */ function template_admin_browse() { global $context, $scripturl, $txt; echo ' <div id="admincenter">'; template_show_list('approve_list'); // If we have lots of outstanding members try and make the admin's life easier. if ($context['approve_list']['total_num_items'] > 10) { echo ' <br /> <form id="admin_form_wrapper" action="', $scripturl, '?action=admin;area=viewmembers" method="post" accept-charset="UTF-8" name="postFormOutstanding" id="postFormOutstanding" onsubmit="return onOutstandingSubmit();"> <h2 class="category_header">', $txt['admin_browse_outstanding'], '</h2> <script><!-- // --><![CDATA[ function onOutstandingSubmit() { if (document.forms.postFormOutstanding.todo.value === "") return; var message = ""; if (document.forms.postFormOutstanding.todo.value.indexOf("delete") !== -1) message = "', $txt['admin_browse_w_delete'], '"; else if (document.forms.postFormOutstanding.todo.value.indexOf("reject") !== -1) message = "', $txt['admin_browse_w_reject'], '"; else if (document.forms.postFormOutstanding.todo.value === "remind") message = "', $txt['admin_browse_w_remind'], '"; else message = "', $context['browse_type'] == 'approve' ? $txt['admin_browse_w_approve'] : $txt['admin_browse_w_activate'], '"; if (confirm(message + " ', $txt['admin_browse_outstanding_warn'], '")) return true; else return false; } // ]]></script> <div class="windowbg"> <div class="content"> <dl class="settings"> <dt> <label for="time_passed">', $txt['admin_browse_outstanding_days_1'], '</label>: </dt> <dd> <input type="text" id="time_passed" name="time_passed" value="14" maxlength="4" size="3" class="input_text" /> ', $txt['admin_browse_outstanding_days_2'], '. </dd> <dt> <label for="todo">', $txt['admin_browse_outstanding_perform'], '</label>: </dt> <dd> <select id="todo" name="todo"> ', $context['browse_type'] == 'activate' ? ' <option value="ok">' . $txt['admin_browse_w_activate'] . '</option>' : '', ' <option value="okemail">', $context['browse_type'] == 'approve' ? $txt['admin_browse_w_approve'] : $txt['admin_browse_w_activate'], ' ', $txt['admin_browse_w_email'], '</option>', $context['browse_type'] == 'activate' ? '' : ' <option value="require_activation">' . $txt['admin_browse_w_approve_require_activate'] . '</option>', ' <option value="reject">', $txt['admin_browse_w_reject'], '</option> <option value="rejectemail">', $txt['admin_browse_w_reject'], ' ', $txt['admin_browse_w_email'], '</option> <option value="delete">', $txt['admin_browse_w_delete'], '</option> <option value="deleteemail">', $txt['admin_browse_w_delete'], ' ', $txt['admin_browse_w_email'], '</option>', $context['browse_type'] == 'activate' ? ' <option value="remind">' . $txt['admin_browse_w_remind'] . '</option>' : '', ' </select> </dd> </dl> <input type="submit" value="', $txt['admin_browse_outstanding_go'], '" class="right_submit" /> <input type="hidden" name="type" value="', $context['browse_type'], '" /> <input type="hidden" name="sort" value="', $context['approve_list']['sort']['id'], '" /> <input type="hidden" name="start" value="', $context['approve_list']['start'], '" /> <input type="hidden" name="orig_filter" value="', $context['current_filter'], '" /> <input type="hidden" name="sa" value="approve" />', !empty($context['approve_list']['sort']['desc']) ? ' <input type="hidden" name="desc" value="1" />' : '', ' <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> </div> </div> </form>'; } echo ' </div>'; }
function template_browse() { global $context, $settings, $options, $txt, $scripturl, $modSettings, $forum_version; echo ' <div id="admincenter">'; if ($context['sub_action'] == 'browse') { echo ' <div class="cat_bar"> <h3 class="catbg"> <a href="', $scripturl, '?action=helpadmin;help=latest_packages" onclick="return reqOverlayDiv(this.href);" class="help"><img class="icon" src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" /></a> ', $txt['packages_latest'], ' </h3> </div> <div class="windowbg2"> <div class="content"> <div id="packagesLatest">', $txt['packages_latest_fetch'], '</div> </div> </div> <script type="text/javascript"><!-- // --><![CDATA[ window.smfForum_scripturl = "', $scripturl, '"; window.smfForum_sessionid = "', $context['session_id'], '"; window.smfForum_sessionvar = "', $context['session_var'], '";'; // Make a list of already installed mods so nothing is listed twice ;). echo ' window.smfInstalledPackages = ["', implode('", "', $context['installed_mods']), '"]; window.smfVersion = "', $context['forum_version'], '"; // ]]></script>'; if (empty($modSettings['disable_smf_js'])) { echo ' <script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-packages.js"></script>'; } echo ' <script type="text/javascript"><!-- // --><![CDATA[ var tempOldOnload; smfSetLatestPackages(); // ]]></script>'; echo ' <br class="clear" /> <div class="cat_bar"> <h3 class="catbg">', $txt['browse_packages'], '</h3> </div>'; } $mods_available = false; foreach ($context['modification_types'] as $type) { if (!empty($context['available_' . $type])) { template_show_list('packages_lists_' . $type); $mods_available = true; } } if (!$mods_available) { echo ' <div class="information">', $context['sub_action'] == 'browse' ? $txt['no_packages'] : $txt['no_mods_installed'], '</div>'; } // the advanced (emulation) box, collapsed by default echo ' <form action="', $scripturl, '?action=admin;area=packages;sa=', $context['sub_action'], '" method="get"> <div id="advanced_box" > <div class="cat_bar"> <h3 class="catbg"> <img id="advanced_panel_toggle" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" alt="*" /> <a href="#" id="advanced_panel_link">', $txt['package_advanced_button'], '</a> </h3> </div> <div id="advanced_panel_div" class="windowbg"> <div class="content"> <p> ', $txt['package_emulate_desc'], ' </p> <dl class="settings"> <dt> <strong>', $txt['package_emulate'], ':</strong><br /> <span class="smalltext"> <a href="#" onclick="document.getElementById(\'ve\').value = \'', $forum_version, '\';document.getElementsByName(\'version_emulate\')[0].value = \'', $forum_version, '\';return false">', $txt['package_emulate_revert'], '</a> </span> </dt> <dd> <input type="text" name="version_emulate" id="ve" value="', $context['forum_version'], '" size="25" class="input_text" /> </dd> </dl> <div class="righttext padding"> <input type="submit" value="', $txt['package_apply'], '" class="button_submit" /> </div> </div> </div> </div> <input type="hidden" name="action" value="admin" /> <input type="hidden" name="area" value="packages" /> <input type="hidden" name="sa" value="', $context['sub_action'], '" /> </form>'; echo ' </div> <script type="text/javascript"><!-- // --><![CDATA[ var oAdvancedPanelToggle = new smc_Toggle({ bToggleEnabled: true, bCurrentlyCollapsed: ', empty($context['show_advanced_options']) ? 'true' : 'false', ', aSwappableContainers: [ \'advanced_panel_div\' ], aSwapImages: [ { sId: \'advanced_panel_toggle\', srcExpanded: smf_images_url + \'/collapse.png\', altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ', srcCollapsed: smf_images_url + \'/expand.png\', altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), ' } ], aSwapLinks: [ { sId: \'advanced_panel_link\', msgExpanded: ', JavaScriptEscape($txt['package_advanced_button']), ', msgCollapsed: ', JavaScriptEscape($txt['package_advanced_button']), ' } ], oThemeOptions: { bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ', sOptionName: \'admin_preferences\', sSessionVar: smf_session_var, sSessionId: smf_session_id, sThemeId: \'1\' } }); // ]]></script> <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script> <script type="text/javascript"><!-- // --><![CDATA[ var oAddVersionSuggest = new smc_AutoSuggest({ sSelf: \'oAddVersionSuggest\', sSessionId: smf_session_id, sSessionVar: smf_session_var, sControlId: \'ve\', sSearchType: \'versions\', bItemList: false }); // ]]></script>'; }
function template_editicons() { global $context, $settings, $options, $scripturl, $txt, $modSettings; template_show_list('message_icon_list'); }
function template_viewmodreport() { global $context, $scripturl, $txt; echo ' <div id="modcenter"> <form action="', $scripturl, '?action=moderate;area=reports;report=', $context['report']['id'], '" method="post" accept-charset="', $context['character_set'], '"> <div class="cat_bar"> <h3 class="catbg"> ', sprintf($txt['mc_viewmodreport'], $context['report']['message_link'], $context['report']['author']['link']), ' </h3> </div> <div class="title_bar"> <h3 class="titlebg"> <span class="floatleft"> ', sprintf($txt['mc_modreport_summary'], $context['report']['num_reports'], $context['report']['last_updated']), ' </span> <span class="floatright">'; // Make the buttons. $close_button = create_button('close.png', $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', 'class="centericon"'); $ignore_button = create_button('ignore.png', 'mc_reportedp_ignore', 'mc_reportedp_ignore', 'class="centericon"'); $unignore_button = create_button('ignore.png', 'mc_reportedp_unignore', 'mc_reportedp_unignore', 'class="centericon"'); echo ' <a href="', $scripturl, '?action=moderate;area=reports;ignore=', (int) (!$context['report']['ignore']), ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '" ', !$context['report']['ignore'] ? 'onclick="return confirm(\'' . $txt['mc_reportedp_ignore_confirm'] . '\');"' : '', '>', $context['report']['ignore'] ? $unignore_button : $ignore_button, '</a> <a href="', $scripturl, '?action=moderate;area=reports;close=', (int) (!$context['report']['closed']), ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a> </span> </h3> </div> <div class="windowbg2"> <div class="content"> ', $context['report']['body'], ' </div> </div> <br /> <div class="cat_bar"> <h3 class="catbg">', $txt['mc_modreport_whoreported_title'], '</h3> </div>'; foreach ($context['report']['comments'] as $comment) { echo ' <div class="windowbg"> <div class="content"> <p class="smalltext">', sprintf($txt['mc_modreport_whoreported_data'], $comment['member']['link'] . (empty($comment['member']['id']) && !empty($comment['member']['ip']) ? ' (' . $comment['member']['ip'] . ')' : ''), $comment['time']), '</p> <p>', $comment['message'], '</p> </div> </div>'; } echo ' <br /> <div class="cat_bar"> <h3 class="catbg">', $txt['mc_modreport_mod_comments'], '</h3> </div> <div class="windowbg2"> <div class="content">'; if (empty($context['report']['mod_comments'])) { echo ' <div class="information"> <p class="centertext">', $txt['mc_modreport_no_mod_comment'], '</p> </div>'; } foreach ($context['report']['mod_comments'] as $comment) { echo '<p>', $comment['member']['link'], ': ', $comment['message'], ' <em class="smalltext">(', $comment['time'], ')</em></p>'; } echo ' <textarea rows="2" cols="60" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 60%; min-width: 60%' : 'width: 60%') . ';" name="mod_comment"></textarea> <div> <input type="submit" name="add_comment" value="', $txt['mc_modreport_add_mod_comment'], '" class="button_submit" /> </div> </div> </div> <br />'; $alt = false; template_show_list('moderation_actions_list'); echo ' <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /> </form> </div>'; }
/** * Add a new language * */ function template_add_language() { global $context, $settings, $options, $txt, $scripturl; echo ' <div id="admincenter"> <form action="', $scripturl, '?action=admin;area=languages;sa=add;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '"> <div class="cat_bar"> <h3 class="catbg"> ', $txt['add_language'], ' </h3> </div> <div class="windowbg"> <div class="content"> <fieldset> <legend>', $txt['add_language_smf'], '</legend> <label class="smalltext">', $txt['add_language_smf_browse'], '</label> <input type="text" name="smf_add" size="40" value="', !empty($context['smf_search_term']) ? $context['smf_search_term'] : '', '" class="input_text" />'; // Do we have some errors? Too bad. if (!empty($context['smf_error'])) { // Display a little error box. echo ' <div><br /><p class="errorbox">', $txt['add_language_error_' . $context['smf_error']], '</p></div>'; } echo ' </fieldset>', isBrowser('is_ie') ? '<input type="text" name="ie_fix" style="display: none;" class="input_text" /> ' : '', ' <input type="submit" name="smf_add_sub" value="', $txt['search'], '" class="button_submit" /> <br /> </div> </div> '; // Had some results? if (!empty($context['smf_languages'])) { echo ' <div class="information">', $txt['add_language_smf_found'], '</div>'; template_show_list('smf_languages'); } echo ' </form> </div>'; }
function template_show_custom_profile() { global $context, $txt, $settings, $scripturl; // Standard fields. template_show_list('standard_profile_fields'); echo ' <script type="text/javascript"><!-- // --><![CDATA[ var iNumChecks = document.forms.standardProfileFields.length; for (var i = 0; i < iNumChecks; i++) if (document.forms.standardProfileFields[i].id.indexOf(\'reg_\') == 0) document.forms.standardProfileFields[i].disabled = document.forms.standardProfileFields[i].disabled || !document.getElementById(\'active_\' + document.forms.standardProfileFields[i].id.substr(4)).checked; // ]]></script><br />'; // Custom fields. template_show_list('custom_profile_fields'); }
function template_gplus_log() { template_show_list('gp_list'); }
function template_facelog() { global $txt, $scripturl, $context; template_show_list('fb_list'); }