Ejemplo n.º 1
0
function display_s_item_type_insert_form($HTTP_VARS)
{
    $sat_results = fetch_sfieldtype_attribute_type_rs(array('TITLE', 'CATEGORY', 'STATUSTYPE', 'STATUSCMNT', 'DURATION'));
    while ($attribute_type_r = db_fetch_assoc($sat_results)) {
        $s_attribute_type_list_rs[] = $attribute_type_r;
    }
    db_free_result($sat_results);
    echo get_s_attribute_type_tooltip_array($s_attribute_type_list_rs);
    echo "\n<table>";
    // s_item_type
    echo get_input_field("s_item_type", NULL, "Item Type", "text(10,10)", "Y", $HTTP_VARS['s_item_type']);
    //description
    echo get_input_field("description", NULL, "Description", "text(30,60)", "Y", $HTTP_VARS['description']);
    //image
    echo get_input_field("image", NULL, "Image", "url(15,*,\"gif,jpg,png\",N)", "N", $HTTP_VARS['image']);
    echo "\n</table>";
    echo "<h4>Field Type Attributes</h4>";
    echo "\n<table>";
    display_item_type_insert_field('Title', 'TITLE');
    display_item_type_insert_field('Category', 'CATEGORY');
    display_item_type_insert_field('Status Type', 'STATUSTYPE');
    display_item_type_insert_field('Status Comment', 'STATUSCMNT');
    if (get_opendb_config_var('borrow', 'enable') !== FALSE && get_opendb_config_var('borrow', 'duration_support') !== FALSE) {
        display_item_type_insert_field('Borrow Duration', 'DURATION');
    }
    echo "\n</table>";
}
Ejemplo n.º 2
0
// Reload edit page after an update.
if ($HTTP_VARS['op'] == 'edit' || $HTTP_VARS['op'] == 'update') {
    echo get_javascript("admin/s_item_type/sattooltips.js");
    echo "<p>[<a href=\"{$PHP_SELF}?type=s_address_type&op=edit_types\">Back to Main</a>]</p>";
    $address_type_r = fetch_s_address_type_r($HTTP_VARS['s_address_type']);
    if ($address_type_r !== FALSE) {
        echo "\n<h3>" . $item_type_r['s_address_type'] . " System Address Attributes</h3>";
        if (is_not_empty_array($errors)) {
            echo format_error_block($errors);
        }
        $column_count = 6;
        echo "\n<form name=\"s_addr_attribute_type_rltshp\" action=\"{$PHP_SELF}\" method=\"POST\">";
        echo "\n<input type=\"hidden\" name=\"op\" value=\"update\">" . "\n<input type=\"hidden\" name=\"type\" value=\"" . $HTTP_VARS['type'] . "\">" . "\n<input type=\"hidden\" name=\"s_address_type\" value=\"" . $HTTP_VARS['s_address_type'] . "\">";
        echo "<table>";
        echo "<tr class=\"navbar\">" . "<th>Delete</th>" . "<th>Order</th>" . "<th colspan=2>Attribute Type</th>" . "<th>Prompt</th>" . "<th>Closed</th>" . "</tr>";
        $sat_results = fetch_sfieldtype_attribute_type_rs('ADDRESS');
        while ($attribute_type_r = db_fetch_assoc($sat_results)) {
            $s_attribute_type_list_rs[] = $attribute_type_r;
        }
        db_free_result($sat_results);
        echo get_s_attribute_type_tooltip_array($s_attribute_type_list_rs);
        $results = fetch_s_addr_attribute_type_rltshp_rs($HTTP_VARS['s_address_type']);
        if ($results) {
            // value, display, img, checked_ind, order_no
            $row = 0;
            while ($s_addr_attribute_type_rltshp_r = db_fetch_assoc($results)) {
                display_s_addr_attribute_type_rltshp_row($HTTP_VARS['s_address_type'], $s_addr_attribute_type_rltshp_r, $row, FALSE, $s_attribute_type_list_rs);
                $row++;
            }
            db_free_result($results);
        }