php myAdmin mysql <? ?>

BROWSER-BASED * PHP5 SUPPORT * MYSQL 4.1 AND MYSQL 5.0 SUPPORT * OPEN SOURCE
PHP ve MySQL - En Yararlı Türkçe Kaynak
Kullanıcı Adınız : Kullanıcı Parolanız : Hatırla :    Kayıt   Şifremi Unuttum

Tarihi Seçim Kutularında Göstermek

Eklenme Tarihi : 16.08.2008 | Okunma Sayısı : 378

<?
class dateForm {   
  var 
$day=31;   
  var 
$month=12;   
  var 
$year_s=2005;   
  var 
$year_f=2015;   
  var 
$dayname="gun";   
  var 
$monthname="ay";   
  var 
$yearname="yil";   
  var 
$style;   
  var 
$selectedday,$selectedmonth,$selectedyear=0;   
  var 
$display="";     
   
  function 
setDateForm($sv=0) {     
    if (
$sv<>0)         
      
$this->setSelectedValues($sv);     
      
$this->displayForm(1,$this->day,$this->dayname,$this->style,$this->selectedday);     
      
$this->displayForm(1,$this->month,$this->monthname,$this->style,$this->selectedmonth);     
      
$this->displayForm($this->year_s,$this->year_f,$this->yearname,$this->style,$this->selectedyear);     
        
//echo $this->display;   
    
}     
    function 
setSelectedValues($sv) {      
      
$date_array=split("-",$sv);      
      
$this->selectedyear=$date_array[0];      
      
$this->selectedmonth=$date_array[1];      
      
$this->selectedday=$date_array[2];   
    }     
    function 
dateStyle($style) {     
      
$this->style=$style;   
    }  
    
// function     
    
function setFormnames($dayname,$monthname,$yearname) {     
      
$this->dayname=$dayname;     
      
$this->monthname=$monthname;     
      
$this->yearname=$yearname;   
    }     
    function 
setDateValues($day,$month,$year_s,$year_f) {     
      
$this->day=$day;     
      
$this->month=$month;     
      
$this->year_s=$year_s;     
      
$this->year_f=$year_f;   
    }  
    
// function     
    
function displayForm($str,$lmt,$nm,$st,$selectedvalue=0) {     
      
$this->display.= "n";     
      
$this->display.= "---";     
      for (
$i=$str;$i<=$lmt;$i++) {       
        
$addition="";       
        if (
$i==$selectedvalue)         
          
$addition="selected";       
          
$this->display.= "$in";     
        }     
        
$this->display.= "  ";   
      } 
    }  
    
// class 

//KULLANIMI : 
$trh=new dateForm(); 
$trh->style="textnml"// Stil Vermek İçin Kullanılır 
$trh->setDateForm(date("Y-m-d")); // Seçili Halde Gelecek Tarih 
$trh1=$trh->display
echo 
$trh1

// İkinci Bir Form Lazımsa 
$trh->display=""
$trh->setFormnames("gun2","ay2","yil2"); // Form Elemanlarına İsim Verilir 
$trh->setDateForm(""); 
$trh2=$trh->display
echo 
$trh2
?>
Hepsini Görüntüle...

php mysql php oracle ajax apache xml cozumleri w3c xhtml w3c css JavaScript Object Notation
yetkili servis