Location: PHPKode > projects > MyDB > webide/ffeditfield.php
<?php 
/*************************************************************
 * The MyDB librairy and applications are product of SQLFusion
 * It may be used and/or distributed under the terms of the Q Public
 * License (QPL) version 1.0, enclosed in the file licence.txt.
 ****************************************************************/
/** MyDB IDE Version 0.4    **/ 
/** Author Philippe Lewicki **/

      require("mydbconfig.inc.php");  

      $reg = new ExecRegistry; 
      $reg->table = $tablename ; 
      $reg->field = $fieldname ; 
      $reg->getreg($conx) ; 

     include("hd_inc.php"); 

?>
         <!---- Debut du contenue de la page principal ---->       
<div class=titrearticle><?php echo $stroptionfield." : ".$fieldname;?></div>
 <FORM method="post" enctype="application/x-www-form-urlencoded" action="ffsavoptions.php">
<INPUT name="fieldname" value="<?php echo $fieldname; ?>" type="hidden">
 <INPUT name="Poe_Session" value="<?php echo $Poe_Session; ?>" type="hidden">
<?php echo  $strFBLabelLongFieldName;?> : 
<INPUT name="label" type="text" value = "<?php echo $reg->label[$fieldname] ; ?>">
<BR>
<?php echo  $strLabelRequiredField ; ?> : 
<INPUT name="required" value="yes" type="checkbox"<? if ($reg->required[$fieldname]) { echo " checked"; } ?>>
<BR>

<?php echo  $strLabelReadOnlyField ; ?> : 
<INPUT name="readonly" value="yes" type="checkbox"<? if ($reg->readonly[$fieldname]) { echo " checked"; } ?>>
<BR>
<?php echo  $strLabelHiddenField; ?> : 
<INPUT name="hidden" value="yes" type="checkbox"<? if ($reg->hidden[$fieldname]) { echo " checked"; } ?>><BR>
<BR>
<?php echo  $strFieldLanguage;?> : 
<INPUT name="languagetype" type="text" value = "<?php echo $reg->language[$fieldname] ; ?>" size=5>
<BR>
<? if (strlen($reg->picture[$fieldname]) > 0) { ?>
<?php echo  $strFieldImage;?> : 
<INPUT name="showpicture" value="yes" type="checkbox"<? if ($reg->showpicture[$fieldname]) { echo " checked"; } ?>>
<br>
<?php echo $strPictureDirectorie; ?> :
<INPUT name="picturedir" type="input" value="<? echo $reg->picture[$fieldname] ?>">
<BR>

<? } ?>

<? if (strlen($reg->datef[$fieldname]) > 0) { ?>
<?php echo $strDateFormat; ?> :
<INPUT name="dateformat" type="input" value="<? echo $reg->datef[$fieldname] ?>">
<BR>

<? } ?>

<?php echo  $strFieldLogin;?> : 
<INPUT name="login" value="yes" type="checkbox"<? if ($reg->access[$fieldname]=="login") { echo " checked"; } ?>>
<BR>

<?php echo  $strFieldPassword;?> : 
<INPUT name="password" value="yes" type="checkbox"<? if ($reg->access[$fieldname]=="password") { echo " checked"; } ?>>
<BR>


 <?php
    if($reg->optiontype["$fieldname"] == "listbox") {?>
<a href="ffeditlistbox.php?fieldname=<?php echo $fieldname; ?>"><?php echo $strLabelEditListBox; ?></a><BR>
<?
	} elseif ($reg->optiontype["$fieldname"] == "radiobutton") {
?>
<?php echo $strLabelDefaultValue; ?> : 
<INPUT name="default" type="text" value = "<? if ($reg->default[$fieldname]) { echo $reg->default[$fieldname]; } ?>">
<BR>
<a href="ffeditradiobutton.php?fieldname=<?php echo $fieldname; ?>"><?php echo $strLabelEditRadioButton; ?></a><BR>
<?php
	} elseif ($reg->list["$fieldname"]) {
?>
<?php echo $strFieldWithCaracteristic; ?> : 
<INPUT name="caracteristic" value="yes" type="checkbox"<? if ($reg->caracteristic[$fieldname]) { echo " checked"; } ?>><BR>
<?php echo $strFieldWithCategorie; ?> : 
<INPUT name="categorie" value="yes" type="checkbox"<? if ($reg->categorie[$fieldname]) { echo " checked"; } ?>><BR>

<a href="ffeditlistboxextern.php?fieldname=<?php echo $fieldname; ?>"><?php echo $strLabelEditListBoxT; ?></a><BR>
<?	
            } elseif ($reg->currency["$fieldname"]) {
?>
<?php echo $strIsItAnCurrencyType." : "; 

	$cur = new currency ; 
	$query = "select name from $cur->tbl_currency" ; 
               $rescur = mysql_db_query($conx->db, $query) ; 
	echo "<select name=currencytype>" ; 
	while( list ($name) = mysql_fetch_array($rescur) ) {
		echo "<option"; 
		if ($reg->currency["$fieldname"] == $name) { echo " selected"; }
		echo ">$name</option>"; 	
	} ?>
	</select>
<BR> 

<?
	} else {
?>
<?php echo $strLabelDefaultValue; ?> :  
<INPUT name="default" type="text" value = "<?php echo $reg->default[$fieldname];  ?>">
<BR>

<?php 
/***** Verfiy if its not already an email type.*******/
echo $strIsItAnEMailType; ?> :  

<INPUT name="emailtype" value="yes" type="checkbox"<? if ($reg->email[$fieldname]) { echo " checked"; } ?>><BR>

<?
	}
?>

<INPUT value="<?php echo  $strFBSubmitOptions; ?>" type="submit">
 </FORM>            

       <!--- Fin du contenue de la page Principale --->         

<?
include("ft_inc.php"); 

?>

Return current item: MyDB