application/models/Checklist_model.php
/**
	 * Creates or modifies a checklist object.
	 */
Creates or modifies a checklist object.
Creates or modifies a checklist object .
public function store($post) {
		$now = date('Y-m-d h:i:s');
		$checklist = ($post['checklist_id']==0 ? R::dispense('checklist') : R::load('checklist', $post['checklist_id']));
		$checklist->equipmenttype_id = $post['equipmenttype_id'];
		$checklist->checklist_json = $post['checklist_json'];
		if($post['checklist_id']==0) {
			$checklist->created = $now;
			$checklist->created_by = $_SESSION['user_id'];
		} else {
			$checklist->modified = $now;
			$checklist->modified_by = $_SESSION['user_id'];
		}
		R::store($checklist);
	}
public function store ( $ post ) { $ now = date ( 'Y-m-d h:i:s' ) ; $ checklist = ( $ post [ 'checklist_id' ] == 0 ? R :: dispense ( 'checklist' ) : R :: load ( 'checklist' , $ post [ 'checklist_id' ] ) ) ; $ checklist -> equipmenttype_id = $ post [ 'equipmenttype_id' ] ; $ checklist -> checklist_json = $ post [ 'checklist_json' ] ; if ( $ post [ 'checklist_id' ] == 0 ) { $ checklist -> created = $ now ; $ checklist -> created_by = $ _SESSION [ 'user_id' ] ; } else { $ checklist -> modified = $ now ; $ checklist -> modified_by = $ _SESSION [ 'user_id' ] ; } R :: store ( $ checklist ) ; }
Creates or modifies a checklist object.
Creates or modifies a checklist object .
//		echo '<pre>'; //		var_dump($post); //		var_dump($checklist); //		echo '</pre>'; //		exit();