home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / JanaSetup.exe / admin / pruefen_js / htaccess.js < prev    next >
Encoding:
Text File  |  2006-05-08  |  2.3 KB  |  125 lines

  1. function feld_disabled()
  2. {
  3.     with (document.formular)
  4.     {
  5.         if (elements['R1'][0].checked == true)
  6.             T5.disabled = true;
  7.         else
  8.             T5.disabled = false;
  9.     }
  10. }
  11.  
  12. /**/
  13.  
  14. function send()
  15. {
  16.     if (pruefen() == true)
  17.         document.formular.submit();
  18. }
  19.  
  20. /**/
  21.  
  22. function pruefen()
  23. {
  24.     var f2 = document.formular.T2.value;
  25.     var f3 = document.formular.T3.value;
  26.     var f4 = document.formular.T4.value;
  27.     var f5 = document.formular.T5.value;
  28.     var r1 = document.forms[0].elements[5].checked;
  29.     var r2 = document.forms[0].elements[6].checked;
  30.     var fe = new Array('T2', 'T3', 'T4');
  31.     var va = new Array('\'', '"');
  32.  
  33.     for (i = 0; i < fe.length; i++)
  34.     {
  35.         for (j = 0; j < va.length; j++)
  36.         {
  37.             var ei = document.formular.elements[fe[i]];
  38.  
  39.             if (ei.value.indexOf(va[j]) != -1)
  40.             {
  41.                 alert(txt[5][7] + va[j] + txt[5][8]);
  42.                 ei.select();
  43.                 ei.focus();
  44.                 return false;
  45.             }
  46.         }
  47.     }
  48.  
  49.     if ((f2.length < 4) || (f2.indexOf(':') != -1))
  50.     {
  51.         alert(txt[19][9] + txt[36][0] + txt[27][20] + '\n\n' + txt[68][6]);
  52.         document.formular.T2.select();
  53.         document.formular.T2.focus();
  54.         return false;
  55.     }
  56.  
  57.     if (f3.length < 4)
  58.     {
  59.         alert(txt[5][5] + ' 4' + txt[5][9]);
  60.         document.formular.T3.select();
  61.         document.formular.T3.focus();
  62.         return false;
  63.     }
  64.  
  65.     if (f3 != f4)
  66.     {
  67.         alert(txt[5][6]);
  68.         document.formular.T3.select();
  69.         document.formular.T3.focus();
  70.         return false;
  71.     }
  72.  
  73.     if (r1 == true)
  74.     {
  75.         if (f5 != '')
  76.         {
  77.             alert(txt[68][7]);
  78.             document.formular.T5.select();
  79.             document.formular.T5.focus();
  80.             return false;
  81.         }
  82.     }
  83.     else
  84.     {
  85.         if (f5.charAt(f5.length - 1) == '\\')
  86.         {
  87.             alert(f5 + '\n\n' + txt[28][26]);
  88.             document.formular.T5.select();
  89.             document.formular.T5.focus();
  90.             return false;
  91.         }
  92.  
  93.         var tea = f5.split('\\');
  94.  
  95.         if (f5.substr(0, 2) != '\\\\')
  96.         {
  97.             if (/^([c-zC-Z])+([:])$/.test(tea[0]) == false)
  98.             {
  99.                 alert(tea[0] + '\n\n' + txt[28][22]);
  100.                 document.formular.T5.select();
  101.                 document.formular.T5.focus();
  102.                 return false;
  103.             }
  104.         }
  105.  
  106.         var z =(f5.substr(0, 2) != '\\\\') ? 1 : 2;
  107.  
  108.         for (k = z; k < tea.length; k++)
  109.         {
  110.             if (/^([_a-zA-Z0-9- .]+)$/.test(tea[k]) == false)
  111.             {
  112.                 alert(tea[k] + '\n\n' + txt[28][23]);
  113.                 document.formular.T5.select();
  114.                 document.formular.T5.focus();
  115.                 return false;
  116.             }
  117.         }
  118.     }
  119.  
  120.     return true;
  121. }
  122.  
  123. /**/
  124.  
  125. var min_laenge = '';