annotate forum/Themes/default/ManageSearch.template.php @ 76:e3e11437ecea website

Add forum code
author Chris Cannam
date Sun, 07 Jul 2013 11:25:48 +0200
parents
children
rev   line source
Chris@76 1 <?php
Chris@76 2 /**
Chris@76 3 * Simple Machines Forum (SMF)
Chris@76 4 *
Chris@76 5 * @package SMF
Chris@76 6 * @author Simple Machines
Chris@76 7 * @copyright 2011 Simple Machines
Chris@76 8 * @license http://www.simplemachines.org/about/smf/license.php BSD
Chris@76 9 *
Chris@76 10 * @version 2.0
Chris@76 11 */
Chris@76 12
Chris@76 13 function template_modify_weights()
Chris@76 14 {
Chris@76 15 global $context, $settings, $options, $scripturl, $txt, $modSettings;
Chris@76 16
Chris@76 17 echo '
Chris@76 18 <div id="admincenter">
Chris@76 19 <form action="', $scripturl, '?action=admin;area=managesearch;sa=weights" method="post" accept-charset="', $context['character_set'], '">
Chris@76 20 <div class="cat_bar">
Chris@76 21 <h3 class="catbg">', $txt['search_weights'], '</h3>
Chris@76 22 </div>
Chris@76 23 <div class="windowbg">
Chris@76 24 <span class="topslice"><span></span></span>
Chris@76 25 <div class="content">
Chris@76 26 <dl class="settings">
Chris@76 27 <dt class="large_caption">
Chris@76 28 <a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 29 ', $txt['search_weight_frequency'], ':
Chris@76 30 </dt>
Chris@76 31 <dd class="large_caption">
Chris@76 32 <span class="search_weight"><input type="text" name="search_weight_frequency" id="weight1_val" value="', empty($modSettings['search_weight_frequency']) ? '0' : $modSettings['search_weight_frequency'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 33 <span id="weight1" class="search_weight">', $context['relative_weights']['search_weight_frequency'], '%</span>
Chris@76 34 </dd>
Chris@76 35 <dt class="large_caption">
Chris@76 36 <a href="', $scripturl, '?action=helpadmin;help=search_weight_age" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 37 ', $txt['search_weight_age'], ':
Chris@76 38 </dt>
Chris@76 39 <dd class="large_caption">
Chris@76 40 <span class="search_weight"><input type="text" name="search_weight_age" id="weight2_val" value="', empty($modSettings['search_weight_age']) ? '0' : $modSettings['search_weight_age'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 41 <span id="weight2" class="search_weight">', $context['relative_weights']['search_weight_age'], '%</span>
Chris@76 42 </dd>
Chris@76 43 <dt class="large_caption">
Chris@76 44 <a href="', $scripturl, '?action=helpadmin;help=search_weight_length" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 45 ', $txt['search_weight_length'], ':
Chris@76 46 </dt>
Chris@76 47 <dd class="large_caption">
Chris@76 48 <span class="search_weight"><input type="text" name="search_weight_length" id="weight3_val" value="', empty($modSettings['search_weight_length']) ? '0' : $modSettings['search_weight_length'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 49 <span id="weight3" class="search_weight">', $context['relative_weights']['search_weight_length'], '%</span>
Chris@76 50 </dd>
Chris@76 51 <dt class="large_caption">
Chris@76 52 <a href="', $scripturl, '?action=helpadmin;help=search_weight_subject" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 53 ', $txt['search_weight_subject'], ':
Chris@76 54 </dt>
Chris@76 55 <dd class="large_caption">
Chris@76 56 <span class="search_weight"><input type="text" name="search_weight_subject" id="weight4_val" value="', empty($modSettings['search_weight_subject']) ? '0' : $modSettings['search_weight_subject'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 57 <span id="weight4" class="search_weight">', $context['relative_weights']['search_weight_subject'], '%</span>
Chris@76 58 </dd>
Chris@76 59 <dt class="large_caption">
Chris@76 60 <a href="', $scripturl, '?action=helpadmin;help=search_weight_first_message" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 61 ', $txt['search_weight_first_message'], ':
Chris@76 62 </dt>
Chris@76 63 <dd class="large_caption">
Chris@76 64 <span class="search_weight"><input type="text" name="search_weight_first_message" id="weight5_val" value="', empty($modSettings['search_weight_first_message']) ? '0' : $modSettings['search_weight_first_message'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 65 <span id="weight5" class="search_weight">', $context['relative_weights']['search_weight_first_message'], '%</span>
Chris@76 66 </dd>
Chris@76 67 <dt class="large_caption">
Chris@76 68 <a href="', $scripturl, '?action=helpadmin;help=search_weight_frequency" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt['help'], '" align="top" /></a>
Chris@76 69 ', $txt['search_weight_sticky'], ':
Chris@76 70 </dt>
Chris@76 71 <dd class="large_caption">
Chris@76 72 <span class="search_weight"><input type="text" name="search_weight_sticky" id="weight6_val" value="', empty($modSettings['search_weight_sticky']) ? '0' : $modSettings['search_weight_sticky'], '" onchange="calculateNewValues()" size="3" class="input_text" /></span>
Chris@76 73 <span id="weight6" class="search_weight">', $context['relative_weights']['search_weight_sticky'], '%</span>
Chris@76 74 </dd>
Chris@76 75 <dt class="large_caption">
Chris@76 76 <strong>', $txt['search_weights_total'], '</strong>
Chris@76 77 </dt>
Chris@76 78 <dd class="large_caption">
Chris@76 79 <span id="weighttotal" class="search_weight"><strong>', $context['relative_weights']['total'], '</strong></span>
Chris@76 80 <span class="search_weight"><strong>100%</strong></span>
Chris@76 81 </dd>
Chris@76 82 </dl>
Chris@76 83 <input type="submit" name="save" value="', $txt['search_weights_save'], '" class="button_submit floatright" />
Chris@76 84 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" /><br class="clear" />
Chris@76 85 </div>
Chris@76 86 <span class="botslice"><span></span></span>
Chris@76 87 </div>
Chris@76 88 </form>
Chris@76 89 </div>
Chris@76 90 <br class="clear" />
Chris@76 91 <script type="text/javascript"><!-- // --><![CDATA[
Chris@76 92 function calculateNewValues()
Chris@76 93 {
Chris@76 94 var total = 0;
Chris@76 95 for (var i = 1; i <= 6; i++)
Chris@76 96 {
Chris@76 97 total += parseInt(document.getElementById(\'weight\' + i + \'_val\').value);
Chris@76 98 }
Chris@76 99 setInnerHTML(document.getElementById(\'weighttotal\'), total);
Chris@76 100 for (var i = 1; i <= 6; i++)
Chris@76 101 {
Chris@76 102 setInnerHTML(document.getElementById(\'weight\' + i), (Math.round(1000 * parseInt(document.getElementById(\'weight\' + i + \'_val\').value) / total) / 10) + \'%\');
Chris@76 103 }
Chris@76 104 }
Chris@76 105 // ]]></script>';
Chris@76 106 }
Chris@76 107
Chris@76 108 function template_select_search_method()
Chris@76 109 {
Chris@76 110 global $context, $settings, $options, $scripturl, $txt, $modSettings;
Chris@76 111
Chris@76 112 echo '
Chris@76 113 <div id="admincenter">
Chris@76 114 <form action="', $scripturl, '?action=admin;area=managesearch;sa=method" method="post" accept-charset="', $context['character_set'], '">
Chris@76 115 <div class="cat_bar">
Chris@76 116 <h3 class="catbg">', $txt['search_method'], '</h3>
Chris@76 117 </div>
Chris@76 118 <div class="information">
Chris@76 119 <div class="smalltext" style="font-weight: normal;"><a href="', $scripturl, '?action=helpadmin;help=search_why_use_index" onclick="return reqWin(this.href);">', $txt['search_create_index_why'], '</a></div>
Chris@76 120 </div>
Chris@76 121 <div class="windowbg">
Chris@76 122 <span class="topslice"><span></span></span>
Chris@76 123 <div class="content">
Chris@76 124 <dl class="settings">
Chris@76 125
Chris@76 126 ';
Chris@76 127 if (!empty($context['table_info']))
Chris@76 128 echo '
Chris@76 129 <dt>
Chris@76 130 <strong>', $txt['search_method_messages_table_space'], ':</strong>
Chris@76 131 </dt>
Chris@76 132 <dd>
Chris@76 133 ', $context['table_info']['data_length'], '
Chris@76 134 </dd>
Chris@76 135 <dt>
Chris@76 136 <strong>', $txt['search_method_messages_index_space'], ':</strong>
Chris@76 137 </dt>
Chris@76 138 <dd>
Chris@76 139 ', $context['table_info']['index_length'], '
Chris@76 140 </dd>';
Chris@76 141 echo '
Chris@76 142 </dl>
Chris@76 143 ', $context['double_index'] ? '<div class="information">
Chris@76 144 ' . $txt['search_double_index'] . '</div>' : '', '
Chris@76 145 <fieldset class="search_settings floatleft">
Chris@76 146 <legend>', $txt['search_index'], '</legend>
Chris@76 147 <dl>
Chris@76 148 <dt><input type="radio" name="search_index" value=""', empty($modSettings['search_index']) ? ' checked="checked"' : '', ' class="input_radio" />
Chris@76 149 ', $txt['search_index_none'], '
Chris@76 150 </dt>';
Chris@76 151
Chris@76 152 if ($context['supports_fulltext'])
Chris@76 153 {
Chris@76 154 echo '
Chris@76 155 <dt>
Chris@76 156 <input type="radio" name="search_index" value="fulltext"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? ' checked="checked"' : '', empty($context['fulltext_index']) ? ' onclick="alert(\'' . $txt['search_method_fulltext_warning'] . '\'); selectRadioByName(this.form.search_index, \'fulltext\');"': '', ' class="input_radio" />
Chris@76 157 ', $txt['search_method_fulltext_index'], '
Chris@76 158 </dt>
Chris@76 159 <dd>
Chris@76 160
Chris@76 161 <span class="smalltext">';
Chris@76 162 if (empty($context['fulltext_index']) && empty($context['cannot_create_fulltext']))
Chris@76 163 echo '
Chris@76 164 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createfulltext;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_method_fulltext_create'], '</a>]';
Chris@76 165 elseif (empty($context['fulltext_index']) && !empty($context['cannot_create_fulltext']))
Chris@76 166 echo '
Chris@76 167 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_fulltext_cannot_create'];
Chris@76 168 else
Chris@76 169 echo '
Chris@76 170 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removefulltext;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_method_fulltext_remove'], '</a>]<br />
Chris@76 171 <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['fulltext_length'];
Chris@76 172 echo '
Chris@76 173 </span>
Chris@76 174 </dd>';
Chris@76 175 }
Chris@76 176
Chris@76 177 echo '
Chris@76 178 <dt>
Chris@76 179 <input type="radio" name="search_index" value="custom"', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'custom' ? ' checked="checked"' : '', $context['custom_index'] ? '' : ' onclick="alert(\'' . $txt['search_index_custom_warning'] . '\'); selectRadioByName(this.form.search_method, \'1\');"', ' class="input_radio" />
Chris@76 180 ', $txt['search_index_custom'], '
Chris@76 181 </dt>
Chris@76 182 <dd>
Chris@76 183 <span class="smalltext">';
Chris@76 184 if ($context['custom_index'])
Chris@76 185 echo '
Chris@76 186 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_already_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_remove'], '</a>]<br />
Chris@76 187 <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
Chris@76 188 elseif ($context['partial_custom_index'])
Chris@76 189 echo '
Chris@76 190 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_index_partial'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=removecustom;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_remove'], '</a>] [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;resume;', $context['session_var'], '=', $context['session_id'], '">', $txt['search_index_custom_resume'], '</a>]<br />
Chris@76 191 <strong>', $txt['search_index_size'], ':</strong> ', $context['table_info']['custom_index_length'];
Chris@76 192 else
Chris@76 193 echo '
Chris@76 194 <strong>', $txt['search_index_label'], ':</strong> ', $txt['search_method_no_index_exists'], ' [<a href="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex">', $txt['search_index_create_custom'], '</a>]';
Chris@76 195 echo '
Chris@76 196 </span>
Chris@76 197 </dd>';
Chris@76 198
Chris@76 199 foreach ($context['search_apis'] as $api)
Chris@76 200 {
Chris@76 201 if (empty($api['label']) || $api['has_template'])
Chris@76 202 continue;
Chris@76 203
Chris@76 204 echo '
Chris@76 205 <dt>
Chris@76 206 <input type="radio" name="search_index" value="', $api['setting_index'], '"', !empty($modSettings['search_index']) && $modSettings['search_index'] == $api['setting_index'] ? ' checked="checked"' : '', ' class="input_radio" />
Chris@76 207 ', $api['label'] ,'
Chris@76 208 </dt>';
Chris@76 209
Chris@76 210 if ($api['desc'])
Chris@76 211 echo '
Chris@76 212 <dd>
Chris@76 213 <span class="smalltext">', $api['desc'], '</span>
Chris@76 214 </dd>';
Chris@76 215 }
Chris@76 216
Chris@76 217 echo '
Chris@76 218 </dl>
Chris@76 219 </fieldset>
Chris@76 220 <fieldset class="search_settings floatright">
Chris@76 221 <legend>', $txt['search_method'], '</legend>
Chris@76 222 <input type="checkbox" name="search_force_index" id="search_force_index_check" value="1"', empty($modSettings['search_force_index']) ? '' : ' checked="checked"', ' class="input_check" /><label for="search_force_index_check">', $txt['search_force_index'], '</label><br />
Chris@76 223 <input type="checkbox" name="search_match_words" id="search_match_words_check" value="1"', empty($modSettings['search_match_words']) ? '' : ' checked="checked"', ' class="input_check" /><label for="search_match_words_check">', $txt['search_match_words'], '</label>
Chris@76 224 </fieldset>
Chris@76 225 <div class="clear">
Chris@76 226 <input type="submit" name="save" value="', $txt['search_method_save'], '" class="button_submit floatright" />
Chris@76 227 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 228 </div>
Chris@76 229 </div>
Chris@76 230 <span class="botslice clear"><span></span></span>
Chris@76 231 </div>
Chris@76 232 </form>
Chris@76 233 </div>
Chris@76 234 <br class="clear" />';
Chris@76 235 }
Chris@76 236
Chris@76 237 function template_create_index()
Chris@76 238 {
Chris@76 239 global $context, $settings, $options, $scripturl, $txt;
Chris@76 240
Chris@76 241 echo '
Chris@76 242 <div id="admincenter">
Chris@76 243 <form action="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;step=1" method="post" accept-charset="', $context['character_set'], '" name="create_index">
Chris@76 244 <div class="cat_bar">
Chris@76 245 <h3 class="catbg">', $txt['search_create_index'], '</h3>
Chris@76 246 </div>
Chris@76 247 <div class="windowbg">
Chris@76 248 <span class="topslice"><span></span></span>
Chris@76 249 <div class="content">
Chris@76 250 <dl class="settings">
Chris@76 251 <dt>
Chris@76 252 <label for="predefine_select">', $txt['search_predefined'], ':</label>
Chris@76 253 </dt>
Chris@76 254 <dd>
Chris@76 255 <select name="bytes_per_word" id="predefine_select">
Chris@76 256 <option value="2">', $txt['search_predefined_small'], '</option>
Chris@76 257 <option value="4" selected="selected">', $txt['search_predefined_moderate'], '</option>
Chris@76 258 <option value="5">', $txt['search_predefined_large'], '</option>
Chris@76 259 </select>
Chris@76 260 </dd>
Chris@76 261 </dl>
Chris@76 262 <input type="submit" name="save" value="', $txt['search_create_index_start'], '" class="button_submit" />
Chris@76 263 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 264 </div>
Chris@76 265 <span class="botslice"><span></span></span>
Chris@76 266 </div>
Chris@76 267
Chris@76 268 </form>
Chris@76 269 </div>
Chris@76 270 <br class="clear" />';
Chris@76 271 }
Chris@76 272
Chris@76 273 function template_create_index_progress()
Chris@76 274 {
Chris@76 275 global $context, $settings, $options, $scripturl, $txt;
Chris@76 276 echo '
Chris@76 277 <div id="admincenter">
Chris@76 278 <form action="', $scripturl, '?action=admin;area=managesearch;sa=createmsgindex;step=1" name="autoSubmit" method="post" accept-charset="', $context['character_set'], '">
Chris@76 279 <div class="cat_bar">
Chris@76 280 <h3 class="catbg">', $txt['search_create_index'], '</h3>
Chris@76 281 </div>
Chris@76 282 <div class="windowbg">
Chris@76 283 <span class="topslice"><span></span></span>
Chris@76 284 <div class="content">
Chris@76 285 <p>
Chris@76 286 ', $txt['search_create_index_not_ready'], '
Chris@76 287 </p>
Chris@76 288 <p>
Chris@76 289 <strong>', $txt['search_create_index_progress'], ': ', $context['percentage'], '%</strong>
Chris@76 290 </p>
Chris@76 291 <input type="submit" name="b" value="', $txt['search_create_index_continue'], '" class="button_submit" />
Chris@76 292 </div>
Chris@76 293 <span class="botslice"><span></span></span>
Chris@76 294 </div>
Chris@76 295 <input type="hidden" name="step" value="', $context['step'], '" />
Chris@76 296 <input type="hidden" name="start" value="', $context['start'], '" />
Chris@76 297 <input type="hidden" name="bytes_per_word" value="', $context['index_settings']['bytes_per_word'], '" />
Chris@76 298 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 299 </form>
Chris@76 300 </div>
Chris@76 301 <br class="clear" />
Chris@76 302 <script type="text/javascript"><!-- // --><![CDATA[
Chris@76 303 var countdown = 10;
Chris@76 304 doAutoSubmit();
Chris@76 305
Chris@76 306 function doAutoSubmit()
Chris@76 307 {
Chris@76 308 if (countdown == 0)
Chris@76 309 document.forms.autoSubmit.submit();
Chris@76 310 else if (countdown == -1)
Chris@76 311 return;
Chris@76 312
Chris@76 313 document.forms.autoSubmit.b.value = "', $txt['search_create_index_continue'], ' (" + countdown + ")";
Chris@76 314 countdown--;
Chris@76 315
Chris@76 316 setTimeout("doAutoSubmit();", 1000);
Chris@76 317 }
Chris@76 318 // ]]></script>';
Chris@76 319
Chris@76 320 }
Chris@76 321
Chris@76 322 function template_create_index_done()
Chris@76 323 {
Chris@76 324 global $context, $settings, $options, $scripturl, $txt;
Chris@76 325 echo '
Chris@76 326 <div id="admincenter">
Chris@76 327 <div class="cat_bar">
Chris@76 328 <h3 class="catbg">', $txt['search_create_index'], '</h3>
Chris@76 329 </div>
Chris@76 330 <div class="windowbg">
Chris@76 331 <span class="topslice"><span></span></span>
Chris@76 332 <div class="content">
Chris@76 333 <p>', $txt['search_create_index_done'], '</p>
Chris@76 334 <p>
Chris@76 335 <strong><a href="', $scripturl, '?action=admin;area=managesearch;sa=method">', $txt['search_create_index_done_link'], '</a></strong>
Chris@76 336 </p>
Chris@76 337 </div>
Chris@76 338 <span class="botslice"><span></span></span>
Chris@76 339 </div>
Chris@76 340 </div>
Chris@76 341 <br class="clear" />';
Chris@76 342 }
Chris@76 343
Chris@76 344 // Add or edit a search engine spider.
Chris@76 345 function template_spider_edit()
Chris@76 346 {
Chris@76 347 global $context, $settings, $options, $scripturl, $txt;
Chris@76 348 echo '
Chris@76 349 <div id="admincenter">
Chris@76 350 <form action="', $scripturl, '?action=admin;area=sengines;sa=editspiders;sid=', $context['spider']['id'], '" method="post" accept-charset="', $context['character_set'], '">
Chris@76 351 <div class="cat_bar">
Chris@76 352 <h3 class="catbg">', $context['page_title'], '</h3>
Chris@76 353 </div>
Chris@76 354 <div class="information">
Chris@76 355 ', $txt['add_spider_desc'], '
Chris@76 356 </div>
Chris@76 357 <div class="windowbg">
Chris@76 358 <span class="topslice"><span></span></span>
Chris@76 359 <div class="content">
Chris@76 360 <dl class="settings">
Chris@76 361 <dt>
Chris@76 362 <strong>', $txt['spider_name'], ':</strong><br />
Chris@76 363 <span class="smalltext">', $txt['spider_name_desc'], '</span>
Chris@76 364 </dt>
Chris@76 365 <dd>
Chris@76 366 <input type="text" name="spider_name" value="', $context['spider']['name'], '" class="input_text" />
Chris@76 367 </dd>
Chris@76 368 <dt>
Chris@76 369 <strong>', $txt['spider_agent'], ':</strong><br />
Chris@76 370 <span class="smalltext">', $txt['spider_agent_desc'], '</span>
Chris@76 371 </dt>
Chris@76 372 <dd>
Chris@76 373 <input type="text" name="spider_agent" value="', $context['spider']['agent'], '" class="input_text" />
Chris@76 374 </dd>
Chris@76 375 <dt>
Chris@76 376 <strong>', $txt['spider_ip_info'], ':</strong><br />
Chris@76 377 <span class="smalltext">', $txt['spider_ip_info_desc'], '</span>
Chris@76 378 </dt>
Chris@76 379 <dd>
Chris@76 380 <textarea name="spider_ip" rows="4" cols="20">', $context['spider']['ip_info'], '</textarea>
Chris@76 381 </dd>
Chris@76 382 </dl>
Chris@76 383 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 384 <input type="submit" name="save" value="', $context['page_title'], '" class="button_submit" />
Chris@76 385 </div>
Chris@76 386 <span class="botslice"><span></span></span>
Chris@76 387 </div>
Chris@76 388 </form>
Chris@76 389 </div>
Chris@76 390 <br class="clear" />';
Chris@76 391 }
Chris@76 392
Chris@76 393 // Show... spider... logs...
Chris@76 394 function template_show_spider_logs()
Chris@76 395 {
Chris@76 396 global $context, $txt, $settings, $scripturl;
Chris@76 397
Chris@76 398 echo '
Chris@76 399 <div id="admincenter">';
Chris@76 400
Chris@76 401 // Standard fields.
Chris@76 402 template_show_list('spider_logs');
Chris@76 403
Chris@76 404 echo '
Chris@76 405 <br />
Chris@76 406 <div class="cat_bar">
Chris@76 407 <h3 class="catbg">', $txt['spider_logs_delete'], '</h3>
Chris@76 408 </div>
Chris@76 409 <form action="', $scripturl, '?action=admin;area=sengines;sa=logs;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
Chris@76 410 <div class="windowbg">
Chris@76 411 <span class="topslice"><span></span></span>
Chris@76 412 <div class="content">
Chris@76 413 <p>
Chris@76 414 ', $txt['spider_logs_delete_older'], '
Chris@76 415 <input type="text" name="older" id="older" value="7" size="3" class="input_text" />
Chris@76 416 ', $txt['spider_logs_delete_day'], '
Chris@76 417 </p>
Chris@76 418 <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
Chris@76 419 <input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value &lt; 1 &amp;&amp; !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="button_submit" />
Chris@76 420 </div>
Chris@76 421 <span class="botslice"><span></span></span>
Chris@76 422 </div>
Chris@76 423 </form>
Chris@76 424 </div>
Chris@76 425 <br class="clear" />';
Chris@76 426 }
Chris@76 427
Chris@76 428 ?>