Location: PHPKode > projects > Course-manager > courseman-0.1.1/data-structuring.php
<?php
  function submitted_data_record($input,$arguments) {
    global $debug;
    if($debug["old-debug"]) {
?>
<pre>
submitted_data_record
</pre>
<?php
    }
    if (!$input['calls']($input,'server_input_check_condition',array())
    	&& $input['calls']($input,'server_side_relevance',array())) {
      $value = $_REQUEST[$input['field']];
    } else {
      $value = '';
    }
    return array($input['table'] => array($input['column'] => $value));
  }
  function submitted_predefined_data_record($input,$arguments) {
    global $debug,$table_registration;
    if (!$input['calls']($input,'server_input_check_condition',array())
    	&& $input['calls']($input,'server_side_relevance',array())) {
      $ind_tabelle = $input['table'];
      $column = $table_registration[$ind_tabelle]['registration_column'];
      return array(
		$input['table'] => array(
			$column => $_REQUEST[$input['field']]));
    } else {
      return array();
    }
  }
  function merged_data_records($one,$other) {
    global $debug;
    if($debug["old-debug"]) {
?>
<pre>
merged_data_records
</pre>
<?php
    }
    $merged = array();
    foreach($one as $table => $column) {
      if(isset($other[$table])) {
        $merged[$table] = array_merge($column,$other[$table]);
      } else {
        $merged[$table] = $column;
      }
    }
    foreach($other as $table => $column) {
      if(!isset($one[$table])) {
        $merged[$table] = $column;
      }
    }
    return $merged;
  }
?>
Return current item: Course-manager