Location: PHPKode > projects > MyDB > webide/ffsavoptions.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 **/

	/****
	 * Sauve the options 
	 */
  require("mydbconfig.inc.php");  
 
$query = "delete from $conx->registryTable where rtable='$tablename' and rfield='$fieldname' and (rtype='label' or rtype='required' or rtype='readonly' or rtype='default' or rtype='email' or rtype='hidden' or rtype='currency' or rtype='language' or rtype='caracteristic' or rtype='categorie' or rtype='showpicture' or rtype='picture' or rtype='datef')" ; 
$rdelete = mysql_db_query($conx->db,$query, $idconx); 

if (strlen($label)>1) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'label', '$label')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if (strlen($default)>1) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'default', '$default')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($required == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'required', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($readonly == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'readonly', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($hidden == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'hidden', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($emailtype == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'email', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if (strlen($currencytype)>0) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'currency', '$currencytype')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if (strlen($languagetype)>0) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'language', '$languagetype')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($caracteristic == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'caracteristic', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($categorie == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'categorie', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($showpicture == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'showpicture', '1')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if (strlen($picturedir)>0) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'picture', '$picturedir')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if ($login == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'access', 'login')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }
if ($password == "yes") {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'access', 'password')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
 }

if (strlen($dateformat) > 0) {
 $query = "insert into $conx->registryTable values('', '$tablename', '$fieldname', 'datef', '$dateformat')" ;
  $rinsertregistry = mysql_db_query($conx->db, $query, $idconx); 
}

 header("Location: ./formbuilder.php"); 
?>
Return current item: MyDB