当前位置: 首页>>代码示例>>PHP>>正文


PHP html::add_form_field方法代码示例

本文整理汇总了PHP中html::add_form_field方法的典型用法代码示例。如果您正苦于以下问题:PHP html::add_form_field方法的具体用法?PHP html::add_form_field怎么用?PHP html::add_form_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在html的用法示例。


在下文中一共展示了html::add_form_field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    $data = $base_instance->get_data("SELECT default_link_category FROM {$base_instance->entity['USER']['MAIN']} WHERE ID='{$userid}'");
    $category_id = $data[1]->default_link_category;
}
#
$select_box = $misc_instance->build_category_select_box(0, $userid, 0, $category_id);
if (!$select_box) {
    $cat_title = 'New Category:';
    $select_category = '&nbsp;<input type="text" name="new_category" size="50" value="' . $new_category . '">';
} else {
    $cat_title = 'Category:';
    $select_category = '&nbsp;<select name="category_id"><option selected value=0>-- Choose Category --' . $select_box . '</select> or

<tr><td align="right"><b>New Category:</b></td><td align="left">&nbsp;<input type="text" name="new_category" size="50" value="' . $new_category . '"></td></tr>';
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Add Link &nbsp;&nbsp; <a href="help-link.php" target="_blank">[Help]</a>', 'TEXT_CENTER' => $text, 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:self.focus();document.form1.url.focus()"', 'INNER_TABLE_WIDTH' => '500', 'TD_WIDTH' => '25%', 'BUTTON_TEXT' => 'Save Link'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'url', 'VALUE' => "{$url}", 'SIZE' => 50, 'TEXT' => 'URL'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => "{$cat_title}", 'TEXT2' => "{$select_category}", 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => "{$title}", 'SIZE' => 50, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'subtitle', 'VALUE' => "{$subtitle}", 'SIZE' => 50, 'TEXT' => 'Subtitle'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'speed', 'VALUE' => "{$speed}", 'OPTION' => 'speed_array', 'TEXT' => 'Ascent Speed', 'DO_NO_SORT_ARRAY' => 1));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'sequence', 'VALUE' => "{$sequence}", 'SIZE' => 10, 'TEXT' => 'Sequence ID'));
$html_instance->add_form_field(array('TYPE' => 'radio', 'NAME' => 'public', 'FIELD_ARRAY' => 'public_array', 'VALUE' => "{$public}", 'TEXT' => 'Link is'));
if (!$number_of_days && !$number_of_hours && !$number_of_mins) {
    $number_of_days = 30;
}
if ($mode == 1) {
    $m1_checked = ' CHECKED';
} else {
    $m1_checked = '';
}
if ($mode == 2) {
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-link.php

示例2: base

require 'class.base.php';
require 'class.html.php';
$base_instance = new base();
$html_instance = new html();
$userid = $base_instance->get_userid();
if (isset($_POST['save'])) {
    $error = '';
    $title = $_POST['title'];
    if (!$title) {
        $error .= '<li> Title cannot be left blank';
    } else {
        $title = trim($title);
        if (strlen($title) > 50) {
            $error .= '<li> Title is too long (Max. 50 Characters)';
        }
        $title = str_replace('"', '&quot;', $title);
    }
    if (!$error) {
        $title = sql_safe($title);
        $html_instance->check_for_duplicates_by_title('NOTE', 'CATEGORY', $title, $userid);
        $base_instance->query('INSERT INTO ' . $base_instance->entity['NOTE']['CATEGORY'] . ' (title,user) VALUES ("' . $title . '",' . $userid . ')');
        $cat_id = mysqli_insert_id($base_instance->db_link);
        $base_instance->show_message('Notes Category saved', '<a href="add-note.php?category_id=' . $cat_id . '">[Add Note]</a> &nbsp;&nbsp; <a href="add-note-category.php">[Add Category]</a> &nbsp;&nbsp; <a href="edit-note-category.php?category_id=' . $cat_id . '">[Edit]</a> &nbsp;&nbsp; <a href="javascript:void(window.open(\'delete-note-category.php?category_id=' . $cat_id . '\',\'\',\'width=450,height=200,top=100,left=100\'))">[Delete]</a><p><a href="show-note-categories.php">[Show Notes Categories]</a>');
    } else {
        $html_instance->error_message = $error;
        $title = stripslashes($title);
    }
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Add Notes Category', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:document.form1.title.focus()"', 'INNER_TABLE_WIDTH' => '400', 'TD_WIDTH' => '20%', 'BUTTON_TEXT' => 'Save Category'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => '', 'SIZE' => 35, 'TEXT' => 'Title'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-note-category.php

示例3: base

<?php

require 'class.base.php';
require 'class.html.php';
$base_instance = new base();
$html_instance = new html();
$userid = $base_instance->get_userid();
$category_id = isset($_REQUEST['category_id']) ? (int) $_REQUEST['category_id'] : exit;
if (isset($_POST['save_it'])) {
    $title_text_field = sql_safe($_POST['title_text_field']);
    $base_instance->query("INSERT INTO {$base_instance->entity['DATABASE']['TEXT_FIELDS']} (user,title,category_id) VALUES ({$userid},'{$title_text_field}',{$category_id})");
    $field_id = mysqli_insert_id($base_instance->db_link);
    $base_instance->show_message('Field saved', '<a href="add-database-number-field.php?category_id=' . $category_id . '">[Add Number Field]</a>&nbsp;&nbsp; <a href="add-database-text-field.php?category_id=' . $category_id . '">[Add Text Field]</a><p>
<a href="add-database-select-field.php?category_id=' . $category_id . '">[Add Select Field]</a> &nbsp;&nbsp; <a href="add-database-checkbox-field.php?category_id=' . $category_id . '">[Add Checkbox Field]</a><p><a href="add-database-data.php?category_id=' . $category_id . '">[Add Data]</a> &nbsp;&nbsp; <a href="edit-database-text-field.php?text_field_id=' . $field_id . '">[Edit Field]</a> &nbsp;&nbsp; <a href="show-database-data.php?category_id=' . $category_id . '">[Show all Data]</a>');
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Add Text Field', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'INNER_TABLE_WIDTH' => '400', 'TD_WIDTH' => '30%', 'BUTTON_TEXT' => 'Save Field'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'save_it', 'VALUE' => 1));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'category_id', 'VALUE' => "{$category_id}"));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title_text_field', 'VALUE' => '', 'SIZE' => 35, 'TEXT' => 'Name of Field'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:20,代码来源:add-database-text-field.php

示例4: VALUES

                $base_instance->query("INSERT INTO {$base_instance->entity['DATABASE']['SELECT_ITEMS']} (title,user,select_field_id) VALUES ('{$name_item}',{$userid},{$select_field_id})");
            }
        }
        $base_instance->show_message('Field saved', '<a href="add-database-number-field.php?category_id=' . $category_id . '">[Add Number Field]</a>&nbsp;&nbsp; <a href="add-database-text-field.php?category_id=' . $category_id . '">[Add Text Field]</a><p>
<a href="add-database-select-field.php?category_id=' . $category_id . '">[Add Select Field]</a> &nbsp;&nbsp; <a href="add-database-checkbox-field.php?category_id=' . $category_id . '">[Add Checkbox Field]</a><p><a href="add-database-data.php?category_id=' . $category_id . '">[Add Data]</a> &nbsp;&nbsp; <a href="edit-database-select-field.php?select_field_id=' . $select_field_id . '">[Edit Field]</a> &nbsp;&nbsp; <a href="show-database-data.php?category_id=' . $category_id . '">[Show all Data]</a>');
    }
}
if (empty($number_of_fields)) {
    $number_of_fields = 5;
}
if (isset($_POST['title_select_field'])) {
    $title_select_field = sql_safe($_POST['title_select_field']);
} else {
    $title_select_field = '';
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Add Select Fields', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'INNER_TABLE_WIDTH' => '400', 'TD_WIDTH' => '30%', 'BUTTON_TEXT' => 'Save Field'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'save_it', 'VALUE' => 1));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'number_of_fields', 'VALUE' => "{$number_of_fields}"));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'category_id', 'VALUE' => "{$category_id}"));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title_select_field', 'VALUE' => "{$title_select_field}", 'SIZE' => 35, 'TEXT' => 'Name of Field'));
for ($index = 1; $index <= $number_of_fields; $index++) {
    $name = 'name_select_field_item_' . $index;
    if (isset($item_value[$index])) {
        $value = $item_value[$index];
    } else {
        $value = '';
    }
    $html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => $name, 'VALUE' => $value, 'SIZE' => 35, 'TEXT' => 'Name Item ' . $index));
}
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<input type="submit" name="add_fields" value="More Item Fields">'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-database-select-field.php

示例5: isset

$category_id = isset($_GET['category_id']) ? $_GET['category_id'] : '';
# build category section
$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['FILE']['CATEGORY']} WHERE user='{$userid}' ORDER BY title");
if (!$data) {
    $cat_title = 'New Category:';
    $select_category = '&nbsp;<input type="text" name="new_category" value="' . $new_category . '">';
} else {
    $cat_title = 'Category:';
    $select_category = '&nbsp;<select name="category_id">';
    for ($index = 1; $index <= sizeof($data); $index++) {
        $category_title = $data[$index]->title;
        $ID = $data[$index]->ID;
        if ($ID == $category_id) {
            $select_category .= "<option selected value={$ID}>{$category_title}";
        } else {
            $select_category .= "<option value={$ID}>{$category_title}";
        }
    }
    $select_category .= '</select> or <b>New Category:</b> <input type="text" name="new_category" value="' . $new_category . '" size="12">';
}
#
$title = isset($_POST['title']) ? $_POST['title'] : '';
$text = isset($_POST['text']) ? $_POST['text'] : '';
$source = isset($_POST['source']) ? $_POST['source'] : '';
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Upload Image by URL', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:document.form1.source.focus()"', 'BUTTON_TEXT' => 'Upload File'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'source', 'VALUE' => "{$source}", 'SIZE' => 55, 'TEXT' => 'Image URL'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => "{$title}", 'SIZE' => 55, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Category:', 'TEXT2' => "{$select_category}", 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'textarea', 'NAME' => 'text', 'VALUE' => "{$text}", 'COLS' => 50, 'ROWS' => 3, 'TEXT' => 'Notes', 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'radio', 'NAME' => 'public', 'FIELD_ARRAY' => 'public_array', 'VALUE' => "{$public}", 'TEXT' => 'File is'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-file-by-url.php

示例6:

            } else {
                $feed = '';
            }
            if (isset($_POST['max_items' . $index])) {
                $max_items = $_POST['max_items' . $index];
            } else {
                $max_items = '';
            }
            $text .= '<tr><td align="right"><b>Feed Title ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="title' . $index . '" size="65" value="' . $title . '"></td></tr><tr><td align="right"><b>Feed URL ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="feed' . $index . '" size="65" value="' . $feed . '"></td></tr><tr><td align="right"><b>Max Items ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="max_items' . $index . '" size="5" value="' . $max_items . '"></td></tr>';
        }
        $text .= '<tr><td></td><td><input type="SUBMIT" value="More Fields" name="more_fields"></td></tr></table>

<input type="Hidden" name="number_of_fields" value="' . $number_of_fields . '">';
    } else {
        $text = '<table>';
        $number_of_fields = 5;
        for ($index = 1; $index < $number_of_fields + 1; $index++) {
            $text .= '<tr><td align="right"><b>Feed Title ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="title' . $index . '" size="65" value=""></td></tr>

<tr><td align="right"><b>Feed URL ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="feed' . $index . '" size="65" value=""></td></tr>

<tr><td align="right"><b>Max Items ' . $index . ':</b></td><td align="left">&nbsp;<input type="text" name="max_items' . $index . '" size="5" value=""></td></tr>';
        }
        $text .= '<tr><td></td><td><input type="SUBMIT" value="More Feeds" name="more_fields"></td></tr></table>

<input type="Hidden" name="number_of_fields" value="' . $number_of_fields . '">';
    }
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Add RSS Feeds', 'INNER_TABLE_WIDTH' => '60%', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BODY' => 'onLoad="javascript:document.form1.title1.focus()"', 'BUTTON_TEXT' => 'Save RSS Feeds'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => $text));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-rss-feeds.php

示例7:

} else { newHeight=50; what.style.height="50px"; }
}

</script>';
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Edit Knowledge', 'HEAD' => $js, 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Update Knowledge'));
# build category select box
$select_box = '&nbsp;<select name="category_id">';
$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['KNOWLEDGE']['CATEGORY']} WHERE user='{$userid}' ORDER BY title");
for ($index = 1; $index <= sizeof($data); $index++) {
    $category_title = $data[$index]->title;
    $ID = $data[$index]->ID;
    if ($ID == $category_id) {
        $select_box .= "<option selected value={$ID}>{$category_title}";
    } else {
        $select_box .= "<option value={$ID}>{$category_title}";
    }
}
$select_box .= '</select> or <b>New Category:</b> <input type="text" name="new_category" value="">';
#
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'knowledge_id', 'VALUE' => "{$knowledge_id}"));
if (empty($error)) {
    $html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Added:', 'TEXT2' => $datetime_converted, 'SECTIONS' => 2));
}
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => $title, 'SIZE' => 65, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Category:', 'TEXT2' => $select_box, 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'value', 'VALUE' => $value, 'SIZE' => 3, 'TEXT' => 'Value'));
$html_instance->add_form_field(array('TYPE' => 'textarea', 'NAME' => 'text', 'VALUE' => $text, 'COLS' => 120, 'ROWS' => 12));
$html_instance->add_form_field(array('TYPE' => 'radio', 'NAME' => 'public', 'FIELD_ARRAY' => 'public_array', 'VALUE' => $public, 'TEXT' => 'Knowledge is'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<span class="fakelink" onclick="bigger(document.form1.text,100);">[+]</span>
<span class="fakelink" onclick="smaller(document.form1.text,100);">[-]</span>'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-knowledge.php

示例8: header

            $background = 1;
        }
        if (!$font_size) {
            $font_size = 2;
        }
        $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET font_face_main='{$font_face_main}',font_face_navigation='{$font_face_navigation}',font_size={$font_size},color_navigation='{$color_navigation}',color_main='{$color_main}',background='{$background}' WHERE ID={$userid}");
        $sid = (int) $_COOKIE['sid'];
        $base_instance->query("UPDATE {$base_instance->entity['SESSION']['MAIN']} SET font_face_main={$font_face_main},font_face_navigation={$font_face_navigation},font_size={$font_size},color_main={$color_main},color_navigation={$color_navigation},background={$background} WHERE session_id={$sid}");
        header('Location: start.php');
        exit;
    } else {
        $html_instance->error_message = $error;
    }
}
$data = $user_instance->get_userinfo($userid);
$font_face_navigation = $data[1]->font_face_navigation;
$font_face_main = $data[1]->font_face_main;
$font_size = $data[1]->font_size;
$color_navigation = $data[1]->color_navigation;
$color_main = $data[1]->color_main;
$background = $data[1]->background;
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Edit Theme', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'FORM_ATTRIB' => 'target="_top"', 'TD_WIDTH' => '30%', 'BUTTON_TEXT' => 'Save Theme'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'font_face_main', 'VALUE' => "{$font_face_main}", 'OPTION' => 'font_face_array', 'TEXT' => 'Font Face<br>(Main)'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'font_face_navigation', 'VALUE' => "{$font_face_navigation}", 'OPTION' => 'font_face_array', 'TEXT' => 'Font Face<br>(Navigation)'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'font_size', 'VALUE' => "{$font_size}", 'OPTION' => 'font_size_array', 'TEXT' => 'Font Size'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'background', 'VALUE' => "{$background}", 'OPTION' => 'background_array', 'TEXT' => 'Background<br>(Main)'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'color_main', 'VALUE' => "{$color_main}", 'OPTION' => 'color_array', 'TEXT' => 'Font Color<br>(Main)'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'color_navigation', 'VALUE' => "{$color_navigation}", 'OPTION' => 'color_array', 'TEXT' => 'Font Color<br>(Navigation)'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => '', 'TEXT2' => 'Or choose a preset here:', 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'theme_preset', 'VALUE' => '', 'OPTION' => 'theme_presets_array', 'TEXT' => 'Theme Presets'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-theme.php

示例9: timezone

if ($timezone == 19) {
    $select_box .= '<option selected value=19>Asia Jakarta';
} else {
    $select_box .= '<option value=19>Asia Jakarta';
}
if ($timezone == 20) {
    $select_box .= '<option selected value=20>Asia Hong Kong';
} else {
    $select_box .= '<option value=20>Asia Hong Kong';
}
if ($timezone == 21) {
    $select_box .= '<option selected value=21>Asia Japan';
} else {
    $select_box .= '<option value=21>Asia Japan';
}
if ($timezone == 22) {
    $select_box .= '<option selected value=22>Israel';
} else {
    $select_box .= '<option value=22>Israel';
}
$select_box .= '</select>';
$test = @putenv('TZ=Europe/London');
if ($test != 1) {
    $warning = '<font color="#ff0000">Warning: Your server runs with safe mode on. In this case timezones can not be customized here.<br>Please correct this if necessary.</font>';
} else {
    $warning = '';
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Change Date and Time', 'INNER_TABLE_WIDTH' => '60%', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'FORM_ATTRIB' => 'target="_top"', 'TEXT_CENTER' => 'Choose the current time of your timezone (24h format).<p>' . $warning, 'TD_WIDTH' => '30%', 'BUTTON_TEXT' => 'Save Settings'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'dateformat', 'VALUE' => $dateformat, 'OPTION' => 'date_format_array', 'TEXT' => 'Date format'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Timezone:', 'TEXT2' => $select_box, 'SECTIONS' => 2));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-timezone.php

示例10: floor

    $number_of_hours = floor($frequency / 3600);
    $hours_in_second = $number_of_hours * 3600;
    $frequency = $frequency - $hours_in_second;
    $number_of_mins = floor($frequency / 60);
    $mins_in_second = $number_of_mins * 60;
}
$select_box = '&nbsp;<select name="category_id"><option selected value=0>-- Choose Category --';
$select_box .= $misc_instance->build_category_select_box(0, $userid, 0, $category_id);
$select_box .= '</select> or';
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Edit Link &nbsp;&nbsp; <a href="help-link.php" target="_blank">[Help]</a>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'INNER_TABLE_WIDTH' => '500', 'TD_WIDTH' => '25%', 'BUTTON_TEXT' => 'Update Link'));
if (stristr($url, '://')) {
    $url2 = $url;
} else {
    $url2 = 'http://' . $url;
}
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'link_id', 'VALUE' => $link_id));
if (empty($error)) {
    $html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Added:', 'TEXT2' => $datetime_converted, 'SECTIONS' => '2'));
}
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'url', 'VALUE' => $url2, 'SIZE' => 50, 'TEXT' => 'URL'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Category:', 'TEXT2' => $select_box, 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'new_category', 'VALUE' => $new_category, 'SIZE' => 50, 'TEXT' => 'New Category'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => $title, 'SIZE' => 50, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'subtitle', 'VALUE' => $subtitle, 'SIZE' => 50, 'TEXT' => 'Subtitle'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'speed', 'VALUE' => $speed, 'OPTION' => 'speed_array', 'TEXT' => 'Ascent Speed', 'DO_NO_SORT_ARRAY' => 1));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'sequence', 'VALUE' => $sequence, 'SIZE' => 10, 'TEXT' => 'Sequence ID'));
#$html_instance->add_form_field(array('TYPE'=>'radio','NAME'=>'public','FIELD_ARRAY'=>'public_array','VALUE'=>"$public",'TEXT'=>'Link is'));
if ($mode == 1) {
    $m1_checked = ' CHECKED';
} else {
    $m1_checked = '';
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-link.php

示例11: base

<?php

require 'class.base.php';
require 'class.html.php';
$base_instance = new base();
$html_instance = new html();
$userid = $base_instance->get_userid();
$text_field_id = isset($_REQUEST['text_field_id']) ? (int) $_REQUEST['text_field_id'] : exit;
if (isset($_POST['save'])) {
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['TEXT_FIELDS']} WHERE ID={$text_field_id} AND user='{$userid}'");
    $base_instance->query("DELETE FROM {$base_instance->entity['DATABASE']['TEXT_VALUES']} WHERE text_field_id={$text_field_id} AND user='{$userid}'");
    header('Location: close-me.php');
    exit;
}
$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['DATABASE']['TEXT_FIELDS']} WHERE ID={$text_field_id}");
if (!$data) {
    $base_instance->show_message('Database field not found');
    exit;
}
$title = $data[1]->title;
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => '<font color="#ff0000">Delete this field?</font>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Delete Field'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'text_field_id', 'VALUE' => "{$text_field_id}"));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<div align="center"><b>' . $title . '</b></div>'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:24,代码来源:delete-database-text-field.php

示例12:

if ($year == 0) {
    $select_box .= '<option selected value=0>Every Year';
} else {
    $select_box .= '<option value=0>Every Year';
}
for ($index = $this_year; $index <= $max_year; $index++) {
    if ($index == $year) {
        $select_box .= "<option selected value={$index}>{$index}";
    } else {
        $select_box .= "<option value={$index}>{$index}";
    }
}
$select_box .= '</select>';
#
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Edit Reminder', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Update Reminder', 'HEAD' => '<script language="JavaScript" type="text/javascript">function tick_box(){document.form1.popup.checked=true;}</script>'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'reminder_id', 'VALUE' => $reminder_id));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => $title, 'SIZE' => 50, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'textarea', 'NAME' => 'text', 'VALUE' => $text, 'COLS' => 50, 'ROWS' => 3, 'TEXT' => 'Notes', 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'day', 'VALUE' => $day, 'OPTION' => 'day_array', 'TEXT' => 'Day', 'DO_NO_SORT_ARRAY' => 1));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'month', 'VALUE' => $month, 'OPTION' => 'month_array', 'TEXT' => 'Month', 'DO_NO_SORT_ARRAY' => 1));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => 'Year:', 'TEXT2' => $select_box, 'SECTIONS' => 2));
if ($email_alert) {
    $cb = '<input type="Checkbox" name="email_alert" value="1" checked id="tick_email_alert">';
} else {
    $cb = '<input type="Checkbox" name="email_alert" value="1" id="tick_email_alert">';
}
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => '', 'TEXT2' => "{$cb} <label for=\"tick_email_alert\">Send Email Alert on that day</label>", 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => '<hr color="#ececec" width="95%">'));
if ($homepage) {
    $cb = '<input type="Checkbox" name="homepage" value="1" checked id="tick_homepage">';
} else {
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-reminder-date.php

示例13: base

require 'class.base.php';
require 'class.html.php';
require 'class.user.php';
$base_instance = new base();
$html_instance = new html();
$user_instance = new user();
$userid = $base_instance->get_userid();
if (isset($_POST['save'])) {
    $error = '';
    $online_status = (int) $_POST['online_status'];
    if (!$online_status) {
        $error .= '<li> Online Status cannot be left blank';
    }
    if (!$error) {
        $sid = (int) $_COOKIE['sid'];
        $base_instance->query("UPDATE {$base_instance->entity['SESSION']['MAIN']} SET online_status={$online_status} WHERE session_id={$sid}");
        if ($online_status == 3) {
            $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET online_status={$online_status} WHERE ID={$userid}");
        } else {
            $base_instance->query("UPDATE {$base_instance->entity['USER']['MAIN']} SET online_status=1 WHERE ID={$userid}");
        }
        $base_instance->show_message('Online Status changed', '<a href="edit-online-status.php">[Edit Online Status]</a>');
    } else {
        $html_instance->error_message = $error;
    }
}
$data = $base_instance->get_data("SELECT online_status FROM {$base_instance->entity['SESSION']['MAIN']} WHERE user={$userid} ORDER BY ID DESC LIMIT 1");
$online_status = $data[1]->online_status;
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Change Online Status &nbsp;&nbsp; <a href="help-live-help.php">[Help]</a>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'TD_WIDTH' => '50%', 'BUTTON_TEXT' => 'Save Status'));
$html_instance->add_form_field(array('TYPE' => 'select', 'NAME' => 'online_status', 'VALUE' => "{$online_status}", 'OPTION' => 'online_status_array', 'TEXT' => 'Online Status'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:edit-online-status.php

示例14:

$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['FILE']['CATEGORY']} WHERE user='{$userid}' ORDER BY title");
if (!$data) {
    $cat_title = 'New Category:';
    $select_category = '&nbsp;<input type="text" name="new_category" value="' . $new_category . '">';
} else {
    $cat_title = 'Category:';
    $select_category = '&nbsp;<select name="category_id">';
    for ($index = 1; $index <= sizeof($data); $index++) {
        $category_title = $data[$index]->title;
        $ID = $data[$index]->ID;
        if ($ID == $category_id) {
            $select_category .= "<option selected value={$ID}>{$category_title}";
        } else {
            $select_category .= "<option value={$ID}>{$category_title}";
        }
    }
    $select_category .= '</select> or <b>New Category:</b> <input type="text" name="new_category" value="' . $new_category . '" size="12">';
}
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => 'Upload File', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'FORM_ATTRIB' => 'enctype="multipart/form-data"', 'BUTTON_TEXT' => 'Upload File'));
$html_instance->add_form_field(array('TYPE' => 'file', 'NAME' => 'file1', 'SIZE' => 45, 'TEXT' => 'File'));
if ($overwrite) {
    $cb = '<input type="Checkbox" name="overwrite" value="1" checked id="tick_overwrite">';
} else {
    $cb = '<input type="Checkbox" name="overwrite" value="1" id="tick_overwrite">';
}
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => '', 'TEXT2' => "{$cb} <label for=\"tick_overwrite\">Overwrite if same filename</label>", 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'text', 'NAME' => 'title', 'VALUE' => "{$title}", 'SIZE' => 50, 'TEXT' => 'Title'));
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT1' => "{$cat_title}", 'TEXT2' => "{$select_category}", 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'textarea', 'NAME' => 'text', 'VALUE' => "{$text}", 'COLS' => 50, 'ROWS' => 3, 'TEXT' => 'Notes', 'SECTIONS' => 2));
$html_instance->add_form_field(array('TYPE' => 'radio', 'NAME' => 'public', 'FIELD_ARRAY' => 'public_array', 'VALUE' => "{$public}", 'TEXT' => 'File is'));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:31,代码来源:add-file.php

示例15: base

require 'class.base.php';
require 'class.html.php';
require 'class.user.php';
$base_instance = new base();
$html_instance = new html();
$user_instance = new user();
$user_instance->check_for_admin();
$news_id = isset($_REQUEST['news_id']) ? (int) $_REQUEST['news_id'] : exit;
if (isset($_POST['save'])) {
    $base_instance->query("DELETE FROM {$base_instance->entity['NEWS']['MAIN']} WHERE ID='{$news_id}'");
    header('Location: close-me.php');
    exit;
}
$data = $base_instance->get_data("SELECT * FROM {$base_instance->entity['NEWS']['MAIN']} WHERE ID='{$news_id}'");
if (!$data) {
    $base_instance->show_message('News not found');
    exit;
}
$datetime = $data[1]->datetime;
$text = $data[1]->text;
$title = $data[1]->title;
$text2 = substr($text, 0, 50);
$datetime_converted = $base_instance->convert_date($datetime . ' 00:00:00');
$html_instance->add_parameter(array('ACTION' => 'show_form', 'HEADER' => '<font color="#ff0000">Delete this News?</font>', 'FORM_ACTION' => $_SERVER['PHP_SELF'], 'BUTTON_TEXT' => 'Delete News'));
$html_instance->add_form_field(array('TYPE' => 'hidden', 'NAME' => 'news_id', 'VALUE' => "{$news_id}"));
if ($title) {
    $text2 = "<b>{$title}</b>: {$text2}";
}
$html_instance->add_form_field(array('TYPE' => 'label', 'TEXT' => "<strong>Added:</strong> {$datetime_converted}<p>{$text2}"));
$html_instance->process();
开发者ID:vijo,项目名称:Blue-Smiley-Organizer,代码行数:30,代码来源:delete-news.php


注:本文中的html::add_form_field方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。