application/models/Checklistcategory_model.php
/**
     * Creates or modifies a checklist category object.
     */
Creates or modifies a checklist category object.
Creates or modifies a checklist category object .
public function store($post) {
        $now = date('Y-m-d h:i:s');
        $checklistcategory = ($post['checklistcategory_id']==0 ? R::dispense('checklistcategory') : R::load('checklistcategory', $post['checklistcategory_id']));
        $checklistcategory->category = $post['category'];
        if($post['checklistcategory_id']==0) {
            $checklistcategory->created = $now;
            $checklistcategory->created_by = $_SESSION['user_id'];
        } else {
            $checklistcategory->modified = $now;
            $checklistcategory->modified_by = $_SESSION['user_id'];
        }
        R::store($checklistcategory);
    }
public function store ( $ post ) { $ now = date ( 'Y-m-d h:i:s' ) ; $ checklistcategory = ( $ post [ 'checklistcategory_id' ] == 0 ? R :: dispense ( 'checklistcategory' ) : R :: load ( 'checklistcategory' , $ post [ 'checklistcategory_id' ] ) ) ; $ checklistcategory -> category = $ post [ 'category' ] ; if ( $ post [ 'checklistcategory_id' ] == 0 ) { $ checklistcategory -> created = $ now ; $ checklistcategory -> created_by = $ _SESSION [ 'user_id' ] ; } else { $ checklistcategory -> modified = $ now ; $ checklistcategory -> modified_by = $ _SESSION [ 'user_id' ] ; } R :: store ( $ checklistcategory ) ; }
Creates or modifies a checklist category object.
Creates or modifies a checklist category object .