Example #1
0
        }
    }
}
// create new instance
$form = new simbio_form_table('mainForm', $_SERVER['PHP_SELF'] . '?biblioID=' . $biblioID, 'post');
$form->submit_button_attr = 'name="upload" value="' . __('Upload Now') . '" class="button"';
// form table attributes
$form->table_attr = 'align="center" id="dataList" cellpadding="5" cellspacing="0"';
$form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
$form->table_content_attr = 'class="alterCell2"';
// query
$file_attach_q = $dbs->query("SELECT fl.*, batt.* FROM files AS fl\r\n    LEFT JOIN biblio_attachment AS batt ON fl.file_id=batt.file_id\r\n    WHERE batt.biblio_id={$biblioID} AND batt.file_id={$fileID}");
$file_attach_d = $file_attach_q->fetch_assoc();
// edit mode
if ($file_attach_d['biblio_id'] and $file_attach_d['file_id']) {
    $form->addHidden('updateBiblioID', $file_attach_d['biblio_id']);
    $form->addHidden('updateFileID', $file_attach_d['file_id']);
} else {
    if ($biblioID) {
        $form->addHidden('updateBiblioID', $biblioID);
    }
}
// file title
$form->addTextField('text', 'fileTitle', __('Title') . '*', $file_attach_d['file_title'], 'style="width: 100%; overflow: auto;"');
// file attachment
if ($file_attach_d['file_name']) {
    $form->addAnything('Attachment', $file_attach_d['file_dir'] . '/' . $file_attach_d['file_name']);
} else {
    // file upload dir
    // create simbio directory object
    $repo = new simbio_directory(REPO_BASE_DIR);
        $form->addTextField('text', 'exemplar', __('Total Exemplar Expected') . '*', '1');
    }
    // serial periode name
    $form->addTextField('text', 'period', __('Period Name') . '*', $rec_d['period'], 'style="width: 100%;"');
    // serial notes
    $form->addTextField('textarea', 'notes', __('Subscription Notes'), $rec_d['notes'], 'style="width: 100%;" rows="3"');
    // serial gmd
    // get gmd data related to this record from database
    $gmd_q = $dbs->query('SELECT gmd_id, gmd_name FROM mst_gmd');
    $gmd_options = array();
    while ($gmd_d = $gmd_q->fetch_row()) {
        $gmd_options[] = array($gmd_d[0], $gmd_d[1]);
    }
    $form->addSelectList('gmdID', __('GMD'), $gmd_options, $rec_d['gmd_id']);
    // serial biblio ID
    $form->addHidden('biblioID', $biblioID);
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit Subscription data') . ' : <b>' . $rec_d['period'] . '</b><div><i>' . $rec_d['notes'] . '</i></div></div>';
        //mfc
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* SUBSCRIPTION LIST */
    function serialTitle($obj_db, $array_data)
    {
        $_output = '';
        $_output .= '<div style="font-weight: bold; font-size: 110%;">' . $array_data[1] . '</div>';
        $_output .= '<div style="font-weight: bold; font-size: 90%;"><a href="' . MODULES_WEB_ROOT_DIR . 'serial_control/kardex.php?serialID=' . $array_data[0] . '" title="' . __('View/Edit Kardex Detail') . '">' . __('View/Edit Kardex Detail') . '</a></div>';
        return $_output;
Example #3
0
 $rec_d = $rec_q->fetch_assoc();
 // create new instance
 $form = new simbio_form_table('mainForm', $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'], 'post');
 $form->submit_button_attr = 'name="saveData" value="' . __('Save') . '" class="button"';
 // form table attributes
 $form->table_attr = 'align="center" class="dataList" cellpadding="5" cellspacing="0"';
 $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
 $form->table_content_attr = 'class="alterCell2"';
 // edit mode flag set
 if ($rec_q->num_rows > 0) {
     $form->edit_mode = true;
     // record ID for delete process
     if (!$in_pop_up) {
         $form->record_id = $itemID;
     } else {
         $form->addHidden('updateRecordID', $itemID);
         $form->back_button = false;
     }
     // form record title
     $form->record_title = $rec_d['title'];
     // submit button attribute
     $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"';
     // default biblio title and biblio ID
     $b_title = $rec_d['title'];
     $b_id = $rec_d['biblio_id'];
     if (trim($rec_d['call_number']) == '') {
         $biblio_q = $dbs->query('SELECT call_number FROM biblio WHERE biblio_id=' . $rec_d['biblio_id']);
         $biblio_d = $biblio_q->fetch_assoc();
         $rec_d['call_number'] = $biblio_d['call_number'];
     }
 } else {
 // create new instance
 $form = new simbio_form_table('mainForm', $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'], 'post');
 $form->submit_button_attr = 'name="saveData" value="' . __('Save') . '" class="button"';
 // form table attributes
 $form->table_attr = 'align="center" class="dataList" cellpadding="5" cellspacing="0"';
 $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
 $form->table_content_attr = 'class="alterCell2"';
 // edit mode flag set
 if ($rec_q->num_rows > 0) {
     $form->edit_mode = true;
     // record ID for delete process
     if (!$changecurrent) {
         // form record id
         $form->record_id = $itemID;
     } else {
         $form->addHidden('updateRecordID', $itemID);
         $form->back_button = false;
     }
     // form record title
     $form->record_title = $rec_d['realname'];
     // submit button attribute
     $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"';
 }
 /* Form Element(s) */
 // user name
 $form->addTextField('text', 'userName', __('Login Username') . '*', $rec_d['username'], 'style="width: 50%;"');
 // user real name
 $form->addTextField('text', 'realName', __('Real Name') . '*', $rec_d['realname'], 'style="width: 50%;"');
 // user group
 // only appear by user who hold system module privileges
 if (!$changecurrent and $can_read and $can_write) {
} else {
    ?>
    <fieldset class="menuBox">
    <div class="menuBoxInner errorIcon">
    <strong style="color: #FF0000;"><?php 
    echo strtoupper(__('Finish Stock Take'));
    ?>
<hr />
    <?php 
    echo __('Are you sure to end current stock take proccess? Once it finished there is no way you can rollback this stock take');
    ?>
    </strong>
    </div>
    </fieldset>
<?php 
    // create new instance
    $form = new simbio_form_table('stockTakeForm', $_SERVER['PHP_SELF'], 'post');
    $form->submit_button_attr = 'value="' . __('Finish Stock Take') . '" class="button" style="color: #FF0000; border-color: #FF0000;"';
    // form table attributes
    $form->table_attr = 'align="center" class="dataList" cellpadding="5" cellspacing="0"';
    $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
    $form->table_content_attr = 'class="alterCell2"';
    /* Form Element(s) */
    // purge lost item
    $purge_options[] = array('1', __('Yes'));
    $form->addCheckBox('purge', __('Purge Lost Item'), $purge_options);
    // hidden item
    $form->addHidden('confirmFinish', 'true');
    // print out the object
    echo $form->printOut();
}
Example #6
0
 $form = new simbio_form_table('mainForm', $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'], 'post');
 $form->submit_button_attr = 'name="saveData" value="' . __('Save') . '" class="button"';
 // form table attributes
 $form->table_attr = 'align="center" class="formTable" cellpadding="5" cellspacing="0"';
 $form->table_header_attr = 'class="alterCell" style="font-weight: bold;"';
 $form->table_content_attr = 'class="alterCell2"';
 $visibility = 'makeVisible';
 // edit mode flag set
 if ($rec_q->num_rows > 0) {
     $form->edit_mode = true;
     // record ID for delete process
     if (!$in_pop_up) {
         // form record id
         $form->record_id = $itemID;
     } else {
         $form->addHidden('updateRecordID', $itemID);
         $form->addHidden('itemCollID', $_POST['itemCollID']);
         $form->back_button = false;
     }
     // form record title
     $form->record_title = $rec_d['title'];
     // submit button attribute
     $form->submit_button_attr = 'name="saveData" value="' . __('Update') . '" class="button"';
     // element visibility class toogle
     $visibility = 'makeHidden';
 }
 /* Form Element(s) */
 // biblio title
 $form->addTextField('textarea', 'title', __('Title') . '*', $rec_d['title'], 'rows="1" style="width: 100%; overflow: auto;"');
 // biblio edition
 $form->addTextField('text', 'edition', __('Edition'), $rec_d['edition'], 'style="width: 40%;"');