// 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) {
        // add hidden element as a flag that we dont change group data
        $form->addHidden('noChangeGroup', '1');
        // user group
        $group_query = $dbs->query('SELECT group_id, group_name FROM
            user_group WHERE group_id != 1');
        // initiliaze group options
        $group_options = array();
        while ($group_data = $group_query->fetch_row()) {
            $group_options[] = array($group_data[0], $group_data[1]);
        }
        $form->addCheckBox('groups', __('Group(s)'), $group_options, unserialize($rec_d['groups']));
    }
    // user password
    $form->addTextField('password', 'passwd1', __('New Password') . '*', '', 'style="width: 50%;"');
    // user password confirm
    $form->addTextField('password', 'passwd2', __('Confirm New Password') . '*', '', 'style="width: 50%;"');
    // edit mode messagge
    if ($form->edit_mode) {
        echo '<div class="infoBox">' . __('You are going to edit user profile'), ' : <b>' . $rec_d['realname'] . '</b> <br />' . __('Last Update') . $rec_d['last_update'] . ' //mfc
            <br />' . __('Leave Password field blank if you don\'t want to change the password') . '</div>';
    }
    // print out the form object
    echo $form->printOut();
} else {
    /* USER LIST */
    // table spec
Exemple #2
0
            $repodir_options[] = array($dir, $dir);
        }
    }
    // add repo directory options to select list
    $form->addSelectList('fileDir', __('Repo. Directory'), $repodir_options);
    // file upload
    $str_input = simbio_form_element::textField('file', 'file2attach');
    $str_input .= ' Maximum ' . $sysconf['max_upload'] . ' KB';
    $form->addAnything(__('File To Attach'), $str_input);
}
// file url
$form->addTextField('textarea', 'fileURL', __('URL'), $file_attach_d['file_url'], 'rows="1" style="width: 100%; overflow: auto;"');
// file description
$form->addTextField('textarea', 'fileDesc', __('Description'), $file_attach_d['file_desc'], 'rows="2" style="width: 100%; overflow: auto;"');
// file access
$acctype_options[] = array('public', __('Public'));
$acctype_options[] = array('private', __('Private'));
$form->addSelectList('accessType', __('Access'), $acctype_options, $file_attach_d['access_type']);
// file access limit if set to public
$group_query = $dbs->query('SELECT member_type_id, member_type_name FROM mst_member_type');
$group_options = array();
while ($group_data = $group_query->fetch_row()) {
    $group_options[] = array($group_data[0], $group_data[1]);
}
$form->addCheckBox('accLimit', __('Access Limit by Member Type'), $group_options, !empty($file_attach_d['access_limit']) ? unserialize($file_attach_d['access_limit']) : null);
// print out the object
echo $form->printOut();
/* main content end */
$content = ob_get_clean();
// include the page template
require SENAYAN_BASE_DIR . '/admin/' . $sysconf['admin_template']['dir'] . '/notemplate_page_tpl.php';
} 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();
}