<?php
$configCombo['FieldType'][46][0]= "Textbox";
$configCombo['FieldType'][46][1]= "Textarea";
$configCombo['FieldType'][46][2]= "CheckBox";
$configCombo['FieldType'][46][3]= "Radio Button";
$configCombo['FieldType'][46][4]= "Combobox";
$configCombo['FieldType'][46][5]= "DateField";

$configCombo['DataType'][46][0]= "varchar (255)";
$configCombo['DataType'][46][1]= "varchar (150)";
$configCombo['DataType'][46][2]= "varchar (50)";
$configCombo['DataType'][46][3]= "varchar (10)";
$configCombo['DataType'][46][4]= "integer";
$configCombo['DataType'][46][5]= "tinyint";
$configCombo['DataType'][46][6]= "text";
$configCombo['DataType'][46][7]= "boolean";
$configCombo['DataType'][46][8]= "date";
$configCombo['DataType'][46][9]= "datetime";

/**
 * Return a SQL readable string for each data type!!!
 *
 * @param int $type - the index of the data type!
 * @return unknown
 */
function getDataType($type) 
	{
		switch ($type) {
			case 0:
			$dataType = 'VARCHAR(255)';
			break;
			case 1:
			$dataType = 'VARCHAR(150)';
			break;
			case 2:
			$dataType = 'VARCHAR(50)';
			break;
			case 3:
			$dataType = 'VARCHAR(10)';
			break;
			case 4:
			$dataType = 'INTEGER(10)';
			break;
			case 5:
			$dataType = 'TINYINT(3)';
			break;
			case 6:
			$dataType = 'TEXT';
			break;
			case 7:
			$dataType = 'BOOL';
			break;
			case 8:
			$dataType = 'DATE';
			break;
			case 9:
			$dataType = 'DATETIME';
			break;
			
		}
		return $dataType;
	}
/**
 * Return a the length of a datatype!!!
 *
 * @param int $type - the index of the data type!
 * @return unknown
 */
function getDataLength($type) 
	{
		switch ($type) {
			case 0:
			$dataType = 255;
			break;
			case 1:
			$dataType = 150;
			break;
			case 2:
			$dataType = 50;
			break;
			case 3:
			$dataType = 10;
			break;
			case 4:
			$dataType = 4;
			break;
			case 5:
			$dataType = 2;
			break;
			case 6:
			$dataType = 0;
			break;
			case 7:
			$dataType = 1;
			break;
			case 8:
			$dataType = 3;
			break;
			
		}
		return $dataType;
	}
?>