install/includes/stages/website.php
changeset 876 aed15c337b72
parent 801 eb8b23f11744
child 878 ecc764c10138
equal deleted inserted replaced
864:09c3ba4f6fbf 876:aed15c337b72
    54       {
    54       {
    55         ajaxMrwSet('shortened');
    55         ajaxMrwSet('shortened');
    56       }
    56       }
    57       else
    57       else
    58       {
    58       {
       
    59         ajaxGet(scriptPath + '/install/install.php?/tiny&do=modrewrite_test', __ajaxMrwTest_chain_tiny);
       
    60       }
       
    61     }
       
    62   }
       
    63   var __ajaxMrwTest_chain_tiny = function()
       
    64   {
       
    65     if ( ajax.readyState == 4 )
       
    66     {
       
    67       if ( ajax.responseText == 'good_tiny' )
       
    68       {
       
    69         ajaxMrwSet('tiny');
       
    70       }
       
    71       else
       
    72       {
    59         ajaxGet(scriptPath + '/install/install.php?do=modrewrite_test&str=standard', __ajaxMrwTest_chain_standard);
    73         ajaxGet(scriptPath + '/install/install.php?do=modrewrite_test&str=standard', __ajaxMrwTest_chain_standard);
    60       }
    74       }
    61     }
    75     }
    62   }
    76   }
    63   var __ajaxMrwTest_chain_standard = function()
    77   var __ajaxMrwTest_chain_standard = function()
    76     }
    90     }
    77   }
    91   }
    78   function ajaxMrwSet(level)
    92   function ajaxMrwSet(level)
    79   {
    93   {
    80     install_unset_ajax_loading();
    94     install_unset_ajax_loading();
    81     if ( !in_array(level, ['rewrite', 'shortened', 'standard']) )
    95     if ( !in_array(level, ['rewrite', 'shortened', 'standard', 'tiny']) )
    82       return false;
    96       return false;
    83     
    97     
    84     document.getElementById('url_radio_rewrite').checked = false;
    98     document.getElementById('url_radio_rewrite').checked = false;
    85     document.getElementById('url_radio_shortened').checked = false;
    99     document.getElementById('url_radio_shortened').checked = false;
    86     document.getElementById('url_radio_standard').checked = false;
   100     document.getElementById('url_radio_standard').checked = false;
       
   101     document.getElementById('url_radio_tiny').checked = false;
    87     document.getElementById('url_radio_' + level).checked = true;
   102     document.getElementById('url_radio_' + level).checked = true;
    88     document.getElementById('url_radio_' + level).focus();
   103     document.getElementById('url_radio_' + level).focus();
    89     
   104     
    90     switch ( level )
   105     switch ( level )
    91     {
   106     {
    93         var str = $lang.get('website_msg_bestmethod_rewrite');
   108         var str = $lang.get('website_msg_bestmethod_rewrite');
    94         break;
   109         break;
    95       case 'shortened':
   110       case 'shortened':
    96         var str = $lang.get('website_msg_bestmethod_shortened');
   111         var str = $lang.get('website_msg_bestmethod_shortened');
    97         break;
   112         break;
       
   113       case 'tiny':
       
   114         var str = $lang.get('website_msg_bestmethod_tiny');
       
   115         break;
    98       case 'standard':
   116       case 'standard':
    99         var str = $lang.get('website_msg_bestmethod_standard');
   117         var str = $lang.get('website_msg_bestmethod_standard');
   100         break;
   118         break;
   101     }
   119     }
   102     document.getElementById('mrw_report').className = 'info-box-mini';
   120     document.getElementById('mrw_report').className = 'info-box-mini';
   146   $https = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' );
   164   $https = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' );
   147   $scriptpath_full = 'http' . ( $https ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . scriptPath . '/';
   165   $scriptpath_full = 'http' . ( $https ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . scriptPath . '/';
   148   ?>
   166   ?>
   149   
   167   
   150   <?php
   168   <?php
   151   $patch_necessary = ( ( strtolower(PHP_OS) == 'win32' || strtolower(PHP_OS) == 'winnt' ) && substr(@$_SERVER['SERVER_SOFTWARE'], 'Apache/2.2') );
   169   $patch_necessary = ( ( strtolower(PHP_OS) == 'win32' || strtolower(PHP_OS) == 'winnt' ) && strstr(@$_SERVER['SERVER_SOFTWARE'], 'Apache/2.2') );
   152   if ( defined('WINDOWS_MOD_REWRITE_WORKAROUNDS') )
   170   if ( defined('WINDOWS_MOD_REWRITE_WORKAROUNDS') )
   153   {
   171   {
   154     ?>
   172     ?>
   155       <div class="usermessage">
   173       <div class="usermessage">
   156         <b><?php echo $lang->get('website_msg_modrewrite_enabled'); ?></b><br />
   174         <b><?php echo $lang->get('website_msg_modrewrite_enabled'); ?></b><br />
   262               </span>
   280               </span>
   263             </td>
   281             </td>
   264           </tr>
   282           </tr>
   265         </table>
   283         </table>
   266         
   284         
       
   285         <table border="0" cellpadding="10" cellspacing="0">
       
   286           <tr>
       
   287             <td valign="top">
       
   288               <input type="radio" name="url_scheme" value="tiny" id="url_radio_tiny" tabindex="5" />
       
   289             </td>
       
   290             <td>
       
   291               <label for="url_radio_tiny">
       
   292                 <b><?php echo $lang->get('website_field_urlscheme_opt_tiny'); ?></b>
       
   293               </label>
       
   294               <span id="hint_url_scheme_tiny" class="fieldtip">
       
   295                 <p><?php echo $lang->get('website_field_urlscheme_opt_tiny_hint'); ?></p>
       
   296                 <p><small><b><?php echo $lang->get('website_field_urlscheme_lbl_example'); ?></b> <tt><?php echo $scriptpath_full . '?/Page'; ?></tt></small></p>
       
   297               </span>
       
   298             </td>
       
   299           </tr>
       
   300         </table>
       
   301         
   267         <p>
   302         <p>
   268           <a href="#mrw_scan" onclick="ajaxMrwTest(); return false;" tabindex="4"><?php echo $lang->get('website_btn_urlscheme_detect'); ?></a>
   303           <a href="#mrw_scan" onclick="ajaxMrwTest(); return false;" tabindex="4"><?php echo $lang->get('website_btn_urlscheme_detect'); ?></a>
   269         </p>
   304         </p>
   270         
   305         
   271         <div id="mrw_report"></div>
   306         <div id="mrw_report"></div>