Location: PHPKode > scripts > PHP calendar with AJAX driven agenda > MyWeb20Agenda/MyWeb20Agenda/class/agenda.extform.class.php
<?php
class ShowForm
{
	private $day;
	private $m;
	private $y;
	private $formurl;
	private $formethod;
	private $formname;
	private $tableTitle;
	private $tableWidth;
	private $tableHeight;
	private $columnWidth;
	private $FirstcolWidth;
	private $TitleCellHeight;
	private $titleclass;
	private $formclass;
	private $buttonclass;
	private $closecass;
	private $tabletitle;
	private $tdf;
	private $tde;
	private $hiddenparts;
	private $inputparts;
	private $passwparts;
	private $textareapart;
	private $menupart;
	private $menusize;
	private $menusel;
	private $menutitel;
	private $menufill;
	private $radioparts;
	private $radiotitle;
	private $checkparts;
	private $checktitle;
	private $mfirstrow;
	private $mfirstvalue;
	private $formvalues;
	private $resetName;
	private $resetText;
	private $NameSubmitButton;
	private $TextSubmitButton;
	private $resetSubmitType;	
	private $inputfield;
	private $passwfield;
	private $hiddenfield;
	private $textareafield;
	private $menufield;
	private $radiofield;
	private $checkfield;
	private $submitfield;
	private $resetfield;
	private $val;
	private $key;
	private $formevent;
	private $listfield;
	private $listtitle;
	private $listsize;
	private $listpart;
	private $listsel;
	private $multiple;
	private $listdisabled;
	
	function __construct($day,$m,$y,$formurl,$formethod,$formname,$tableTitle,$tableWidth,
					$columnWidth,$FirstcolWidth,$titleclass,$formclass,$buttonclass,
					$hiddenparts,$inputparts,$textareapart,$menupart,$menusize,$menutitle,
					$menusel,$mfirstrow,$mfirstvalue,$formvalues,$resetName,$resetText,
					$closecass,$NameSubmitButton,$TextSubmitButton,$resetSubmitType,
					$menufill,	$radioparts,$checkparts,$radiotitle,$checktitle,$inputfield,$hiddenfield,
					$textareafield,$menufield,$radiofield,$checkfield,$submitfield,$resetfield,
					$passwfield,$passwparts,$tableHeight,$TitleCellHeight,$tabletitle,$tdf,$tde,
					$formevent,$listfield,$listtitle,$listsize,$listpart,$listsel,$multiple,$listdisabled)
	 {
	 	$this->day		= $day;
	 	$this->m			= $m;
	 	$this->y			= $y;
	 	$this->val			= $val;
	 	$this->key		= $key;
	 	$this->furl		= $formurl;
	 	$this->fmethod	= $formethod;
	 	$this->fname		= $formname;
	 	$this->tabtitle		= $tableTitle;
	 	$this->tabwidth	= $tableWidth;
	 	$this->tabHeight	= $tableHeight;
	 	$this->colwidth	= $columnWidth;
	 	$this->fcolwidth	= $FirstcolWidth;
	 	$this->TitCHeight	= $TitleCellHeight;
	 	$this->titclass		= $titleclass;
	 	$this->fclass		= $formclass;
	 	$this->buclass	= $buttonclass;
	 	$this->closecass	= $closecass;
	 	$this->tabletitle	= $tabletitle;
	 	$this->tdf			= $tdf;
	 	$this->tde		= $tde;
	 	$this->hiddenparts	= $hiddenparts;
	 	$this->inputparts	= $inputparts;
	 	$this->passwparts	= $passwparts;
	 	$this->tapart		= $textareapart;
	 	$this->menupart	= $menupart;
	 	$this->menusize	= $menusize;
	 	$this->menutitle	= $menutitle;
	 	$this->menufill	= $menufill;
	 	$this->menusel	= $menusel;
	 	$this->mfirstrow	= $mfirstrow;
	 	$this->mfirstvalue	= $mfirstvalue;
	 	$this->radioparts	= $radioparts;
	 	$this->radiotitle	= $radiotitle;
	 	$this->checkparts	= $checkparts;
	 	$this->checktitle	= $checktitle;
	 	$this->fvalues		= $formvalues;
	 	$this->resetN		= $resetName;
	 	$this->resetT		= $resetText;	 		
	 	$this->ressubT	= $resetSubmitType;
	 	$this->submitB	= $NameSubmitButton;
	 	$this->submitT	= $TextSubmitButton;
	 	$this->inputfield	= $inputfield;
	 	$this->passwfield	= $passwfield;
	 	$this->hiddenfield	= $hiddenfield;
	 	$this->textareafield	= $textareafield;
	 	$this->menufield	= $menufield;
	 	$this->radiofield	= $radiofield;
	 	$this->checkfield	= $checkfield;
	 	$this->submitfield	= $submitfield;
	 	$this->resetfield	= $resetfield;
	 	$this->formevent	= $formevent;
	 	$this->listfield		= $listfield;
	 	$this->listtitle		= $listtitle;
	 	$this->listsize		= $listsize;
	 	$this->listpart		= $listpart;
	 	$this->listsel		= $listsel;
	 	$this->multiple	= $multiple;
	 	$this->listdisabled = $listdisabled;
	 }
	
	function createFormTable()
	{		
		echo ("<form action='$this->furl' method='$this->fmethod' name='$this->fname'>
			<table width='$this->tabwidth' height='$this->tabHeight' border='0' cellspacing='2' cellpadding='0'>
				<tr>
					<td colspan='2' height='$this->TitCHeight' class='$this->tabletitle'>&nbsp;<span class=$this->titclass>$this->tabtitle</span></td><td class='$this->closecass'><a href='#' onClick='closeAgendaForm();'>x</a></td>
				</tr>
				<tr>
					<td colspan='2'>&nbsp;</td>
				</tr>
				"); ?>	
					
				<!--- Start inputzone -->
				<?php
					if($this->inputfield == '1')
					{
				?>			
				<?php	
					while(list($this->key, $this->val) = each($this->inputparts))
					{		
					echo ('<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->val[0].'</td>
							<td><input type="text" class="'.$this->fclass.'" name="'.$this->val[1].'" value="'.$this->val[2].'" size="'.$this->val[3].'" '.$this->val[4].' '.$this->val[5].'></td>
						</tr>');
					}				
				?>
				<?php
					}
				?>
				<!--- End inputzone -->
				<!--- Start passwordzone -->
				<?php
					if($this->passwfield == '1')
					{
				?>			
				<?php	
					while(list($this->key, $this->val) = each($this->passwparts))
					{		
					echo ('<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->val[0].'</td>
							<td><input type="password" class="'.$this->fclass.'" name="'.$this->val[1].'" value="'.$this->val[2].'" size="'.$this->val[3].'" '.$this->val[4].' '.$this->val[5].'></td>
						</tr>');
					}				
				?>
				<?php
					}
				?>
				<!--- End passwordzone -->
				<!--- Start radiobuttonzone -->
				<?php
					if($this->radiofield == '1')
					{
				?>
				<?php
					echo '<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->radiotitle.'</td>
							<td>';
						?>
						<?php
							while(list($this->key, $this->val) = each($this->radioparts))
							{
								echo ('<span class="'.$this->tde.'">'.$this->val[0].'</span><input type="radio" name="'.$this->val[1].'" value="'.$this->val[2].'" border="'.$this->val[3].'" '.$this->val[4].' '.$this->val[5].'>&nbsp;');
							};
						?>							
						<?php echo '</td>
					</tr>';
				?>
				<?php
					}
				?>
				<!--- End radiobuttonzone -->
				<!--- Start checkboxzone -->
				<?php
					if($this->checkfield == '1')
					{
				?>
				<?php
					echo '<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->checktitle.'</td>
							<td>';
						?>
						<?php
							while(list($this->key, $this->val) = each($this->checkparts))
							{
								echo ('<span class="'.$this->tde.'">'.$this->val[0].'</span><input type="checkbox" name="'.$this->val[1].'" value="'.$this->val[2].'" border="'.$this->val[3].'" '.$this->val[4].' '.$this->val[5].'>&nbsp;');
							};
						?>							
						<?php echo '</td>
					</tr>';
				?>
				<?php
					}
				?>
				<!--- End checkboxzone -->
				<!--- Start menuzone -->
				<?php
					if($this->menufield == '1')
					{
				?>
				<?php
					echo '<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->menutitle.'</td>
							<td>';
						?>
						<?php
							while(list($this->key, $this->val) = each($this->menupart))
							{
								echo '<select name="'.$this->val[0].'" size="'.$this->menusize.'" class="'.$this->fclass.'">
								<option '.$this->menusel.' value="'.$this->val[1].'">'.$this->val[2].'</option>';
									 echo $this->val[3];
								echo '</select>';
							};
						?>							
						<?php echo '</td>
					</tr>';
				?>
				<?php
					}
				?>
				<!--- End menuzone -->
				<!--- Start listzone -->
				<?php
					if($this->listfield == '1')
					{
				?>
				<?php
					echo '<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->listtitle.'</td>
							<td>';
						?>
						<?php
							while(list($this->key, $this->val) = each($this->listpart))
							{
								echo '<select name="'.$this->val[0].'" size="'.$this->listsize.'" class="'.$this->fclass.'" '.$this->multiple.' '.$this->listdisabled.'>
								<option '.$this->listsel.' value="'.$this->val[1].'">'.$this->val[2].'</option>';									
									 echo $this->val[3];
								echo '</select>';
							};
						?>							
						<?php echo '</td>
					</tr>';
				?>
				<?php
					}
				?>
				<!--- End listzone -->
				<!--- Start textareazone -->
				<?php
					if($this->textareafield == '1')
					{
				?>
				<?php
					while(list($this->key, $this->val) = each($this->tapart))
					{	
					echo ('<tr>
							<td width="'.$this->fcolwidth.'" class="'.$this->tdf.'">'.$this->val[0].'</td>
							<td><textarea class="'.$this->fclass.'" name="'.$this->val[1].'" rows="'.$this->val[2].'" cols="'.$this->val[3].'" '.$this->val[5].' '.$this->val[6].'>'.$this->val[4].'</textarea></td>
						</tr>');
					}
				?>
				<?php
					}
				?>	
				<!--- End textareazone -->
				<!--- Start resetzone -->			
				<?php
					if($this->resetfield == '1')
					{
				?>
				<?php echo ('
						<td width="'.$this->fcolwidth.'"  class="'.$this->tdf.'"><input type="'.$this->ressubT.'" class="'.$this->buclass.'" name="'.$this->resetN.'" value="'.$this->resetT.'">
						');
					?>
					<?php
					}
				?>
				<!--- End resetzone -->
				<!--- Start hiddenzone -->	
				<?php
					if($this->hiddenfield == '1')
					{
				?>
					<?php
						while(list($this->key, $this->val) = each($this->hiddenparts))
						{
							echo ('<input type="hidden" name="'.$this->val[0].'" value="'.$this->val[1].'">');		
						}
					?>
				<?php
					}
				?>
				<!--- End hiddenzone -->
				<!--- Start submitzone -->
				<?php
					if($this->submitfield == '1')
					{
					?>	
					<?php echo ('
						</td>
							<td><input type="submit" class="'.$this->buclass.'" name="'.$this->submitB.'" value="'.$this->submitT.'"  onClick="'.$this->formevent.'"></td>
						</tr>');
				?>
				<!--- End submitzone -->
				<?php
					}
				?>
					
				<?php
				echo ("</table>
		</form>");
	}
}
?>
Return current item: PHP calendar with AJAX driven agenda