includes/clientside/static/ajax.js
changeset 58 8f532d8ab5f5
parent 57 b354deeaa4c4
child 60 71b50f8c8f85
equal deleted inserted replaced
48:fc9762553a3c 58:8f532d8ab5f5
    49   return text;
    49   return text;
    50 }
    50 }
    51 
    51 
    52 // Page editor
    52 // Page editor
    53 
    53 
    54 function ajaxEditor() {
    54 function ajaxEditor()
       
    55 {
       
    56   // IE <6 pseudo-compatibility
       
    57   if ( KILL_SWITCH )
       
    58     return true;
    55   setAjaxLoading();
    59   setAjaxLoading();
    56   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
    60   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
    57       if(ajax.readyState == 4) {
    61       if(ajax.readyState == 4) {
    58         unsetAjaxLoading();
    62         unsetAjaxLoading();
    59         if(edit_open) {
    63         if(edit_open) {
   104   $('ajaxEditArea').destroyMCE();
   108   $('ajaxEditArea').destroyMCE();
   105   createCookie('enano_editor_mode', 'text', 365);
   109   createCookie('enano_editor_mode', 'text', 365);
   106   $('switcher').object.innerHTML = 'wikitext editor  |  <a href="#" onclick="setEditorMCE(); return false;">graphical editor</a>';
   110   $('switcher').object.innerHTML = 'wikitext editor  |  <a href="#" onclick="setEditorMCE(); return false;">graphical editor</a>';
   107 }
   111 }
   108 
   112 
   109 function ajaxViewSource() {
   113 function ajaxViewSource()
       
   114 {
       
   115   // IE <6 pseudo-compatibility
       
   116   if ( KILL_SWITCH )
       
   117     return true;
   110   setAjaxLoading();
   118   setAjaxLoading();
   111   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
   119   ajaxGet(stdAjaxPrefix+'&_mode=getsource', function() {
   112       if(ajax.readyState == 4) {
   120       if(ajax.readyState == 4) {
   113         unsetAjaxLoading();
   121         unsetAjaxLoading();
   114         if(edit_open) {
   122         if(edit_open) {
   133   });
   141   });
   134 }
   142 }
   135 
   143 
   136 function ajaxShowPreview()
   144 function ajaxShowPreview()
   137 {
   145 {
       
   146   // IE <6 pseudo-compatibility
       
   147   if ( KILL_SWITCH )
       
   148     return true;
   138   goBusy('Loading preview...');
   149   goBusy('Loading preview...');
   139   var text = ajaxEscape($('ajaxEditArea').getContent());
   150   var text = ajaxEscape($('ajaxEditArea').getContent());
   140   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
   151   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
   141   else minor='';
   152   else minor='';
   142   ajaxPost(stdAjaxPrefix+'&_mode=preview', 'summary='+document.getElementById('ajaxEditSummary').value+minor+'&text='+text, function() {
   153   ajaxPost(stdAjaxPrefix+'&_mode=preview', 'summary='+document.getElementById('ajaxEditSummary').value+minor+'&text='+text, function() {
   146       document.getElementById('mdgPreviewContainer').innerHTML = ajax.responseText;
   157       document.getElementById('mdgPreviewContainer').innerHTML = ajax.responseText;
   147     }
   158     }
   148   });
   159   });
   149 }
   160 }
   150 
   161 
   151 function ajaxSavePage() {
   162 function ajaxSavePage()
       
   163 {
       
   164   // IE <6 pseudo-compatibility
       
   165   if ( KILL_SWITCH )
       
   166     return true;
   152   goBusy('Saving page...');
   167   goBusy('Saving page...');
   153   var text = ajaxEscape($('ajaxEditArea').getContent());
   168   var text = ajaxEscape($('ajaxEditArea').getContent());
   154   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
   169   if(document.mdgAjaxEditor.minor.checked) minor='&minor';
   155   else minor='';
   170   else minor='';
   156   ajaxPost(stdAjaxPrefix+'&_mode=savepage', 'summary='+document.getElementById('ajaxEditSummary').value+minor+'&text='+text, function() {
   171   ajaxPost(stdAjaxPrefix+'&_mode=savepage', 'summary='+document.getElementById('ajaxEditSummary').value+minor+'&text='+text, function() {
   162       unselectAllButtonsMinor();
   177       unselectAllButtonsMinor();
   163     }
   178     }
   164   });
   179   });
   165 }
   180 }
   166 
   181 
   167 function ajaxDiscard() {
   182 function ajaxDiscard()
       
   183 {
       
   184   // IE <6 pseudo-compatibility
       
   185   if ( KILL_SWITCH )
       
   186     return true;
   168   c = confirm('Do you really want to discard your changes?');
   187   c = confirm('Do you really want to discard your changes?');
   169   if(!c) return;
   188   if(!c) return;
   170   ajaxReset();
   189   ajaxReset();
   171 }
   190 }
   172 
   191 
   173 function ajaxReset() {
   192 function ajaxReset()
       
   193 {
       
   194   // IE <6 pseudo-compatibility
       
   195   if ( KILL_SWITCH )
       
   196     return true;
   174   enableUnload();
   197   enableUnload();
   175   setAjaxLoading();
   198   setAjaxLoading();
   176   ajaxGet(stdAjaxPrefix+'&_mode=getpage&noheaders', function() {
   199   ajaxGet(stdAjaxPrefix+'&_mode=getpage&noheaders', function() {
   177     if(ajax.readyState == 4) {
   200     if(ajax.readyState == 4) {
   178       unsetAjaxLoading();
   201       unsetAjaxLoading();
   185 }
   208 }
   186 
   209 
   187 // Miscellaneous AJAX applets
   210 // Miscellaneous AJAX applets
   188 
   211 
   189 function ajaxProtect(l) {
   212 function ajaxProtect(l) {
       
   213   // IE <6 pseudo-compatibility
       
   214   if ( KILL_SWITCH )
       
   215     return true;
   190   if(shift) {
   216   if(shift) {
   191     r = 'NO_REASON';
   217     r = 'NO_REASON';
   192   } else {
   218   } else {
   193     r = prompt('Reason for (un)protecting:');
   219     r = prompt('Reason for (un)protecting:');
   194     if(!r || r=='') return;
   220     if(!r || r=='') return;
   205         alert(ajax.responseText);
   231         alert(ajax.responseText);
   206     }
   232     }
   207   });
   233   });
   208 }
   234 }
   209 
   235 
   210 function ajaxRename() {
   236 function ajaxRename()
       
   237 {
       
   238   // IE <6 pseudo-compatibility
       
   239   if ( KILL_SWITCH )
       
   240     return true;
   211   r = prompt('What title should this page be renamed to?\nNote: This does not and will never change the URL of this page, that must be done from the admin panel.');
   241   r = prompt('What title should this page be renamed to?\nNote: This does not and will never change the URL of this page, that must be done from the admin panel.');
   212   if(!r || r=='') return;
   242   if(!r || r=='') return;
   213   setAjaxLoading();
   243   setAjaxLoading();
   214   ajaxPost(stdAjaxPrefix+'&_mode=rename', 'newtitle='+escape(r), function() {
   244   ajaxPost(stdAjaxPrefix+'&_mode=rename', 'newtitle='+escape(r), function() {
   215     if(ajax.readyState == 4) {
   245     if(ajax.readyState == 4) {
   217       alert(ajax.responseText);
   247       alert(ajax.responseText);
   218     }
   248     }
   219   });
   249   });
   220 }
   250 }
   221 
   251 
   222 function ajaxMakePage() {
   252 function ajaxMakePage()
       
   253 {
       
   254   // IE <6 pseudo-compatibility
       
   255   if ( KILL_SWITCH )
       
   256     return true;
   223   setAjaxLoading();
   257   setAjaxLoading();
   224   ajaxPost(ENANO_SPECIAL_CREATEPAGE, ENANO_CREATEPAGE_PARAMS, function() {
   258   ajaxPost(ENANO_SPECIAL_CREATEPAGE, ENANO_CREATEPAGE_PARAMS, function() {
   225     if(ajax.readyState == 4) {
   259     if(ajax.readyState == 4) {
   226       unsetAjaxLoading();
   260       unsetAjaxLoading();
   227       window.location.reload();
   261       window.location.reload();
   228     }
   262     }
   229   });
   263   });
   230 }
   264 }
   231 
   265 
   232 function ajaxDeletePage() {
   266 function ajaxDeletePage()
       
   267 {
       
   268   // IE <6 pseudo-compatibility
       
   269   if ( KILL_SWITCH )
       
   270     return true;
   233   var reason = prompt('Please enter your reason for deleting this page.');
   271   var reason = prompt('Please enter your reason for deleting this page.');
   234   if ( !reason || reason == '' )
   272   if ( !reason || reason == '' )
   235   {
   273   {
   236     return false;
   274     return false;
   237   }
   275   }
   248       window.location.reload();                                                                           
   286       window.location.reload();                                                                           
   249     }
   287     }
   250   });
   288   });
   251 }
   289 }
   252 
   290 
   253 function ajaxDelVote() {
   291 function ajaxDelVote()
       
   292 {
       
   293   // IE <6 pseudo-compatibility
       
   294   if ( KILL_SWITCH )
       
   295     return true;
   254   c = confirm('Are you sure that you want to vote that this page be deleted?');
   296   c = confirm('Are you sure that you want to vote that this page be deleted?');
   255   if(!c) return;
   297   if(!c) return;
   256   setAjaxLoading();
   298   setAjaxLoading();
   257   ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() {
   299   ajaxGet(stdAjaxPrefix+'&_mode=delvote', function() {
   258     if(ajax.readyState == 4) {
   300     if(ajax.readyState == 4) {
   260       alert(ajax.responseText);
   302       alert(ajax.responseText);
   261     }
   303     }
   262   });
   304   });
   263 }
   305 }
   264 
   306 
   265 function ajaxResetDelVotes() {
   307 function ajaxResetDelVotes()
       
   308 {
       
   309   // IE <6 pseudo-compatibility
       
   310   if ( KILL_SWITCH )
       
   311     return true;
   266   c = confirm('This will reset the number of votes against this page to zero. Do you really want to do this?');
   312   c = confirm('This will reset the number of votes against this page to zero. Do you really want to do this?');
   267   if(!c) return;
   313   if(!c) return;
   268   setAjaxLoading();
   314   setAjaxLoading();
   269   ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() {
   315   ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function() {
   270     if(ajax.readyState == 4) {
   316     if(ajax.readyState == 4) {
   279     }
   325     }
   280   });
   326   });
   281 }
   327 }
   282 
   328 
   283 function ajaxSetWikiMode(val) {
   329 function ajaxSetWikiMode(val) {
       
   330   // IE <6 pseudo-compatibility
       
   331   if ( KILL_SWITCH )
       
   332     return true;
   284   setAjaxLoading();
   333   setAjaxLoading();
   285   document.getElementById('wikibtn_0').style.textDecoration = 'none';
   334   document.getElementById('wikibtn_0').style.textDecoration = 'none';
   286   document.getElementById('wikibtn_1').style.textDecoration = 'none';
   335   document.getElementById('wikibtn_1').style.textDecoration = 'none';
   287   document.getElementById('wikibtn_2').style.textDecoration = 'none';
   336   document.getElementById('wikibtn_2').style.textDecoration = 'none';
   288   document.getElementById('wikibtn_'+val).style.textDecoration = 'underline';
   337   document.getElementById('wikibtn_'+val).style.textDecoration = 'underline';
   299 
   348 
   300 // Editing/saving category information
   349 // Editing/saving category information
   301 // This was not easy to write, I hope enjoy it, and dang I swear I'm gonna
   350 // This was not easy to write, I hope enjoy it, and dang I swear I'm gonna
   302 // find someone to work on just the Javascript part of Enano...
   351 // find someone to work on just the Javascript part of Enano...
   303 
   352 
   304 function ajaxCatEdit() {
   353 function ajaxCatEdit()
       
   354 {
       
   355   // IE <6 pseudo-compatibility
       
   356   if ( KILL_SWITCH )
       
   357     return true;
   305   setAjaxLoading();
   358   setAjaxLoading();
   306   ajaxGet(stdAjaxPrefix+'&_mode=catedit', function() {
   359   ajaxGet(stdAjaxPrefix+'&_mode=catedit', function() {
   307     if(ajax.readyState == 4) {
   360     if(ajax.readyState == 4) {
   308       unsetAjaxLoading();
   361       unsetAjaxLoading();
   309       edit_open = false;
   362       edit_open = false;
   312   });
   365   });
   313 }
   366 }
   314 
   367 
   315 function ajaxCatSave()
   368 function ajaxCatSave()
   316 {
   369 {
       
   370   // IE <6 pseudo-compatibility
       
   371   if ( KILL_SWITCH )
       
   372     return true;
   317   if(!catlist)
   373   if(!catlist)
   318   {
   374   {
   319     alert('Var catlist has no properties');
   375     alert('Var catlist has no properties');
   320     return;
   376     return;
   321   }
   377   }
   338   });
   394   });
   339 }
   395 }
   340 
   396 
   341 // History stuff
   397 // History stuff
   342 
   398 
   343 function ajaxHistory() {
   399 function ajaxHistory()
       
   400 {
       
   401   // IE <6 pseudo-compatibility
       
   402   if ( KILL_SWITCH )
       
   403     return true;
   344   setAjaxLoading();
   404   setAjaxLoading();
   345   ajaxGet(stdAjaxPrefix+'&_mode=histlist', function() {
   405   ajaxGet(stdAjaxPrefix+'&_mode=histlist', function() {
   346     if(ajax.readyState == 4) {
   406     if(ajax.readyState == 4) {
   347       unsetAjaxLoading();
   407       unsetAjaxLoading();
   348       edit_open = false;
   408       edit_open = false;
   353     }
   413     }
   354   });
   414   });
   355 }
   415 }
   356 
   416 
   357 function ajaxHistView(oldid, tit) {
   417 function ajaxHistView(oldid, tit) {
       
   418   // IE <6 pseudo-compatibility
       
   419   if ( KILL_SWITCH )
       
   420     return true;
   358   if(!tit) tit=title;
   421   if(!tit) tit=title;
   359   setAjaxLoading();
   422   setAjaxLoading();
   360   ajaxGet(append_sid(scriptPath+'/ajax.php?title='+tit+'&_mode=getpage&oldid='+oldid), function() {
   423   ajaxGet(append_sid(scriptPath+'/ajax.php?title='+tit+'&_mode=getpage&oldid='+oldid), function() {
   361     if(ajax.readyState == 4) {
   424     if(ajax.readyState == 4) {
   362       unsetAjaxLoading();
   425       unsetAjaxLoading();
   365     }
   428     }
   366   });
   429   });
   367 }
   430 }
   368 
   431 
   369 function ajaxRollback(id) {
   432 function ajaxRollback(id) {
       
   433   // IE <6 pseudo-compatibility
       
   434   if ( KILL_SWITCH )
       
   435     return true;
   370   setAjaxLoading();
   436   setAjaxLoading();
   371   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
   437   ajaxGet(stdAjaxPrefix+'&_mode=rollback&id='+id, function() {
   372     if(ajax.readyState == 4) {
   438     if(ajax.readyState == 4) {
   373       unsetAjaxLoading();
   439       unsetAjaxLoading();
   374       alert(ajax.responseText);
   440       alert(ajax.responseText);
   375     }
   441     }
   376   });
   442   });
   377 }
   443 }
   378 
   444 
   379 function ajaxClearLogs() {
   445 function ajaxClearLogs()
       
   446 {
       
   447   // IE <6 pseudo-compatibility
       
   448   if ( KILL_SWITCH )
       
   449     return true;
   380   c = confirm('You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?');
   450   c = confirm('You are about to DESTROY all log entries for this page. As opposed to (example) deleting this page, this action is completely IRREVERSIBLE and should not be used except in dire circumstances. Do you REALLY want to do this?');
   381   if(!c) return;
   451   if(!c) return;
   382   c = confirm('You\'re ABSOLUTELY sure???');
   452   c = confirm('You\'re ABSOLUTELY sure???');
   383   if(!c) return;
   453   if(!c) return;
   384   setAjaxLoading();
   454   setAjaxLoading();
   448   }
   518   }
   449 }
   519 }
   450 
   520 
   451 function ajaxHistDiff()
   521 function ajaxHistDiff()
   452 {
   522 {
       
   523   // IE <6 pseudo-compatibility
       
   524   if ( KILL_SWITCH )
       
   525     return true;
   453   var id1=false;
   526   var id1=false;
   454   var id2=false;
   527   var id2=false;
   455   for ( i = 0; i < arrDiff1Buttons.length; i++ )
   528   for ( i = 0; i < arrDiff1Buttons.length; i++ )
   456   {
   529   {
   457     k = i + '';
   530     k = i + '';
   474 
   547 
   475 // Change the user's preferred style/theme
   548 // Change the user's preferred style/theme
   476 
   549 
   477 function ajaxChangeStyle()
   550 function ajaxChangeStyle()
   478 {
   551 {
       
   552   // IE <6 pseudo-compatibility
       
   553   if ( KILL_SWITCH )
       
   554     return true;
   479   var inner_html = '';
   555   var inner_html = '';
   480   inner_html += '<p><label>Theme: ';
   556   inner_html += '<p><label>Theme: ';
   481   inner_html += '  <select id="chtheme_sel_theme" onchange="ajaxGetStyles(this.value);">';
   557   inner_html += '  <select id="chtheme_sel_theme" onchange="ajaxGetStyles(this.value);">';
   482   inner_html += '    <option value="_blank" selected="selected">[Select]</option>';
   558   inner_html += '    <option value="_blank" selected="selected">[Select]</option>';
   483   inner_html +=      ENANO_THEME_LIST;
   559   inner_html +=      ENANO_THEME_LIST;
   487   chtheme_mb.onbeforeclick['OK'] = ajaxChangeStyleComplete;
   563   chtheme_mb.onbeforeclick['OK'] = ajaxChangeStyleComplete;
   488 }
   564 }
   489 
   565 
   490 function ajaxGetStyles(id)
   566 function ajaxGetStyles(id)
   491 {
   567 {
       
   568   // IE <6 pseudo-compatibility
       
   569   if ( KILL_SWITCH )
       
   570     return true;
   492   var thediv = document.getElementById('chtheme_sel_style_parent');
   571   var thediv = document.getElementById('chtheme_sel_style_parent');
   493   if ( thediv )
   572   if ( thediv )
   494   {
   573   {
   495     thediv.parentNode.removeChild(thediv);
   574     thediv.parentNode.removeChild(thediv);
   496   }
   575   }
   545     });
   624     });
   546 }
   625 }
   547 
   626 
   548 function ajaxChangeStyleComplete()
   627 function ajaxChangeStyleComplete()
   549 {
   628 {
       
   629   // IE <6 pseudo-compatibility
       
   630   if ( KILL_SWITCH )
       
   631     return true;
   550   var theme = $('chtheme_sel_theme');
   632   var theme = $('chtheme_sel_theme');
   551   var style = $('chtheme_sel_style');
   633   var style = $('chtheme_sel_style');
   552   if ( !theme.object || !style.object )
   634   if ( !theme.object || !style.object )
   553   {
   635   {
   554     alert('Please select a theme from the list.');
   636     alert('Please select a theme from the list.');
   601 }
   683 }
   602 
   684 
   603 /*
   685 /*
   604 function ajaxChangeStyle()
   686 function ajaxChangeStyle()
   605 {
   687 {
       
   688   // IE <6 pseudo-compatibility
       
   689   if ( KILL_SWITCH )
       
   690     return true;
   606   var win = document.getElementById("cn2");
   691   var win = document.getElementById("cn2");
   607   win.innerHTML = ' \
   692   win.innerHTML = ' \
   608     <form action="'+ENANO_SPECIAL_CHANGESTYLE+'" onsubmit="jws.closeWin(\'root2\');" method="post" style="text-align: center"> \
   693     <form action="'+ENANO_SPECIAL_CHANGESTYLE+'" onsubmit="jws.closeWin(\'root2\');" method="post" style="text-align: center"> \
   609     <h3>Select a theme...</h3>\
   694     <h3>Select a theme...</h3>\
   610     <select id="mdgThemeID" name="theme" onchange="ajaxGetStyles(this.value);"> \
   695     <select id="mdgThemeID" name="theme" onchange="ajaxGetStyles(this.value);"> \
   638     }
   723     }
   639   });
   724   });
   640 }
   725 }
   641 */
   726 */
   642 
   727 
   643 function ajaxSwapCSS() {
   728 function ajaxSwapCSS()
       
   729 {
       
   730   // IE <6 pseudo-compatibility
       
   731   if ( KILL_SWITCH )
       
   732     return true;
   644   setAjaxLoading();
   733   setAjaxLoading();
   645   if(_css) {
   734   if(_css) {
   646     document.getElementById('mdgCss').href = main_css;
   735     document.getElementById('mdgCss').href = main_css;
   647     _css = false;
   736     _css = false;
   648   } else {
   737   } else {
   653   menuOff();
   742   menuOff();
   654 }
   743 }
   655 
   744 
   656 function ajaxSetPassword()
   745 function ajaxSetPassword()
   657 {
   746 {
       
   747   // IE <6 pseudo-compatibility
       
   748   if ( KILL_SWITCH )
       
   749     return true;
   658   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   750   pass = hex_sha1(document.getElementById('mdgPassSetField').value);
   659   setAjaxLoading();
   751   setAjaxLoading();
   660   ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function()
   752   ajaxPost(stdAjaxPrefix+'&_mode=setpass', 'password='+pass, function()
   661     {
   753     {
   662       unsetAjaxLoading();
   754       unsetAjaxLoading();
   668   );
   760   );
   669 }
   761 }
   670 
   762 
   671 function ajaxWikiEditHelp()
   763 function ajaxWikiEditHelp()
   672 {
   764 {
       
   765   // IE <6 pseudo-compatibility
       
   766   if ( KILL_SWITCH )
       
   767     return true;
   673   jws.openWin('root3', 640, 480);
   768   jws.openWin('root3', 640, 480);
   674   setAjaxLoading();
   769   setAjaxLoading();
   675   ajaxGet(stdAjaxPrefix+'&_mode=wikihelp', function() {
   770   ajaxGet(stdAjaxPrefix+'&_mode=wikihelp', function() {
   676       if(ajax.readyState==4)
   771       if(ajax.readyState==4)
   677       {
   772       {
   681     });
   776     });
   682 }
   777 }
   683 
   778 
   684 function ajaxStartLogin()
   779 function ajaxStartLogin()
   685 {
   780 {
       
   781   // IE <6 pseudo-compatibility
       
   782   if ( KILL_SWITCH )
       
   783     return true;
   686   ajaxPromptAdminAuth(function(k) {
   784   ajaxPromptAdminAuth(function(k) {
   687       window.location.reload();
   785       window.location.reload();
   688     }, 2);
   786     }, 2);
   689 }
   787 }
   690 
   788 
   691 function ajaxAdminPage()
   789 function ajaxAdminPage()
   692 {
   790 {
       
   791   // IE <6 pseudo-compatibility
       
   792   if ( KILL_SWITCH )
       
   793     return true;
   693   if ( auth_level < USER_LEVEL_ADMIN )
   794   if ( auth_level < USER_LEVEL_ADMIN )
   694   {
   795   {
   695     ajaxPromptAdminAuth(function(k) {
   796     ajaxPromptAdminAuth(function(k) {
   696       ENANO_SID = k;
   797       ENANO_SID = k;
   697       auth_level = USER_LEVEL_ADMIN;
   798       auth_level = USER_LEVEL_ADMIN;
   707   window.location = loc;
   808   window.location = loc;
   708 }
   809 }
   709 
   810 
   710 function ajaxDisableEmbeddedPHP()
   811 function ajaxDisableEmbeddedPHP()
   711 {
   812 {
       
   813   // IE <6 pseudo-compatibility
       
   814   if ( KILL_SWITCH )
       
   815     return true;
   712   if ( !confirm('Are you really sure you want to do this? Some pages might not function if this emergency-only feature is activated.') )
   816   if ( !confirm('Are you really sure you want to do this? Some pages might not function if this emergency-only feature is activated.') )
   713     return false;
   817     return false;
   714   var $killdiv = $dynano('php_killer');
   818   var $killdiv = $dynano('php_killer');
   715   if ( !$killdiv.object )
   819   if ( !$killdiv.object )
   716   {
   820   {