Ejemplo n.º 1
0
 /**
  * 	getTypeFormDescription
  *
  * 	produces a view header
  *
  * @param int $id
  * 	object id
  * @param string $type
  * 	object type
  * @param string $fields
  * 	fields to select
  * @param string $format
  * 	format to apply
  * @param string $spanclass
  * 	span class to apply
  *
  * @return string
  * 	html text
  */
 function getTypeFormDescription($id, $type, $fields = NULL, $format = NULL, $spanclass = 'formdescription')
 {
     $fields = isset($fields) ? $fields : 'Description';
     $obj = EasyContactFormsClassLoader::getObject($type);
     $tablename = $obj->getTableName();
     $query = 'SELECT ' . $fields . ' FROM ' . $tablename . ' WHERE id = %d';
     return EasyContactFormsUtils::getFormDescription($id, $query, $format, $spanclass);
 }