Login   Register  
PHP Classes
elePHPant
Icontem

File: EasyCron.js

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of NaiFPHP  >  Easy Cron  >  EasyCron.js  >  Download  
File: EasyCron.js
Role: Auxiliary data
Content type: text/plain
Description: some JavaScript for EasyCron
Class: Easy Cron
Schedule site down time period
Author: By
Last change: update
Date: 2006-09-13 19:40
Size: 3,251 bytes
 

Contents

Class file image Download
/****************************************************************************************
=========================================================================================
| @ Script Name             : EasyCorn
| @ Version                 : 1.0
| @ Description             : Open and Close your website in fixed times .
| @ All rights reserved to  : NaiF PHP
| @ Created In              : 8-9-2006
| @ Support Site            : http://www.naifphp.net
=========================================================================================
*****************************************************************************************/

function checker(fm)
{


   if(fm.Cstart.value == "")
    {
           alert(" Please selected the time it started close !");
           return false;
    }

   if(fm.Rstart.value == "")
    {
           alert(" Please selected the time it started open !");
           return false;
    }



}

function InsertTime(numbric) {

      var STime = document.getElementById('s');
      var ETime = document.getElementById('e');
      var ETime2 = document.getElementById('Rstart');
      var STime2 = document.getElementById('Cstart');
      var resrt1 = document.getElementById('r1');
      var resrt2 = document.getElementById('r2');
      var WA1 = document.getElementById('whereadd1');
      var WA2 = document.getElementById('whereadd2');


      if (numbric)
       {
         if (!(WA1.checked) && !(WA2.checked))
         {
           alert(" please select where you want to add this time !! ");
         }
         else if(WA1.checked)
         {
           if(STime.value!="")
           {
             STime.value = STime.value +"~"+ numbric;
             STime2.value = STime2.value +"~"+ numbric;
             resrt1.disabled = false;
           }
           else
           {
             STime.value = numbric;
             STime2.value = numbric;
             resrt1.disabled = false;
           }
         }
         else if(WA2.checked)
         {
           if(ETime.value!="")
           {
             ETime.value = ETime.value +"~"+ numbric;
             ETime2.value = ETime2.value +"~"+ numbric;
             resrt2.disabled = false;
           }
           else
           {
             ETime.value = numbric;
             ETime2.value = numbric;
             resrt2.disabled = false;
           }
         }
    }
}

window.onload = function()
{
       var resrt1 = document.getElementById('r1');
       var resrt2 = document.getElementById('r2');

     resrt1.disabled = true;
     resrt2.disabled = true;
     //resrt2.style.visibility='hidden';
}

function resrt(x)
{
    var STime = document.getElementById('s');
    var ETime = document.getElementById('e');
    var resrt1 = document.getElementById('r1');
    var resrt2 = document.getElementById('r2');
    var ETime2 = document.getElementById('Rstart');
    var STime2 = document.getElementById('Cstart');

 if(x==1)
 {
         STime.value = "";
         STime2.value = "";
         resrt1.disabled = true;
 }

 if(x==2)
 {
         ETime.value = "";
         ETime2.value = "";
         resrt2.disabled = true;
 }
}