本文整理汇总了PHP中form_end函数的典型用法代码示例。如果您正苦于以下问题:PHP form_end函数的具体用法?PHP form_end怎么用?PHP form_end使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_end函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: page_admin_images
function page_admin_images($act = "", $id = "")
{
requires_admin();
use_template("admin");
if ($act == "add") {
if (form_file_uploaded("file")) {
$fname = $_FILES["file"]['name'];
db_query("INSERT INTO images (link) VALUES ('')");
$id = db_last_id();
$fname = $id . "." . fileext($fname);
form_file_uploaded_move("file", "img/" . $fname);
db_query("UPDATE images SET link='img/{$fname}' WHERE id=%d", $id);
redir("admin/images");
}
form_start("", "post", " enctype='multipart/form-data' ");
form_file("Файл", "file");
form_submit("Загрузить", "submit");
form_end();
$o = form();
return $o;
}
if ($act == "del") {
$im = db_object_get("images", $id);
@unlink("../{$im->link}");
}
$o = table_edit("images", "admin/images", $act, $id, "", "", "", "image_func");
return $o;
}
开发者ID:NazarK,项目名称:timedesk,代码行数:28,代码来源:images.php
示例2: wormhole_show_wormhole
function wormhole_show_wormhole($wormhole_id)
{
assert(!empty($wormhole_id));
global $_GALAXY;
if (!anomaly_is_wormhole($wormhole_id)) {
return;
}
$wormhole = anomaly_get_anomaly($wormhole_id);
$sector = sector_get_sector($wormhole['sector_id']);
$race = user_get_race($wormhole['user_id']);
$result = sql_query("SELECT * FROM w_wormhole WHERE id=" . $wormhole['id']);
$dst_wormhole = sql_fetchrow($result);
if ($race == "") {
$race = "-";
}
echo "<table border=1 width=500 align=center>\n";
echo " <tr><td align=center><b><i>Sector: " . $sector['name'] . " / Anomaly: " . $wormhole['name'] . "</i></b></td></tr>\n";
echo " <tr><td>\n";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>\n";
echo " <tr><td width=200>\n";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>\n";
echo " <tr><th>Anomaly View</th></tr>\n";
echo " <tr><td width=100%><center><img src=\"" . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/wormholes/" . $wormhole['image'] . ".jpg\" width=150 height=150></center></td></tr>\n";
echo " <tr><th> </th></tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " <td> </td>\n";
echo " <td nowrap valign=top>\n";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>\n";
echo " <tr><td nowrap width=40%><strong>Wormhole Name </strong></td><td nowrap width=1%><b>:</b></td>\n";
if ($wormhole['unknown'] == 1) {
form_start();
echo "<td nowrap>\n";
echo " <input type=hidden name=aid value=" . encrypt_get_vars($wormhole_id) . ">\n";
echo " <input type=hidden name=cmd value=" . encrypt_get_vars("claim") . ">\n";
echo " <input type=text size=15 maxlength=30 name=ne_name>\n";
echo " <input name=submit type=submit value=\"Claim\">\n";
echo "</td>\n";
form_end();
} else {
echo "<td nowrap>" . $wormhole['name'] . "</td>\n";
}
echo " </tr>\n";
echo " <tr><td colspan=3> </td></tr>\n";
echo " <tr><td nowrap width=40%><strong>Caretaker </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $race . "</td></tr>\n";
echo " <tr><td nowrap width=40%><strong>Radius </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $wormhole['radius'] . " km</td></tr>\n";
echo " <tr><td nowrap width=40%><strong>Distance to sun </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $wormhole['distance'] . " km (10<sup>6</sup>)</td></tr>\n";
echo " <tr><td colspan=3> </td></tr>\n";
echo " <tr><td nowrap width=40%><strong>Destination </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $dst_wormhole['distance'] . " / " . $dst_wormhole['angle'] . "</td></tr>\n";
echo " <tr><td nowrap width=40%><strong>Stability </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . wormhole_get_wormhole_stability($dst_wormhole['next_jump']) . " </td></tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<br><br>\n";
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:59,代码来源:global_wormhole.php
示例3: parse
public function parse($orig_name)
{
global $CORE;
ob_start();
if (is_action()) {
try {
$name = post('name');
if (!$name) {
throw new FieldInputError('name', l('Please provide a map name.'));
}
if (!preg_match(MATCH_MAP_NAME, $name)) {
throw new FieldInputError('name', l('This is not a valid map name (need to match [M])', array('M' => MATCH_MAP_NAME)));
}
if (count($CORE->getAvailableMaps('/^' . $name . '$/')) > 0) {
throw new FieldInputError('name', l('A map with this name already exists.'));
}
// Read the old config
$MAPCFG = new GlobalMapCfg($orig_name);
$MAPCFG->readMapConfig();
// Create a new map config
$NEW = new GlobalMapCfg($name);
$NEW->createMapConfig();
foreach ($MAPCFG->getMapObjects() as $object_id => $cfg) {
$NEW->addElement($cfg['type'], $cfg, $perm = true, $object_id);
}
success(l('The map has been created.'));
reload(cfg('paths', 'htmlbase') . '/frontend/nagvis-js/index.php?mod=Map&show=' . $name, 1);
} catch (FieldInputError $e) {
form_error($e->field, $e->msg);
} catch (NagVisException $e) {
form_error(null, $e->message());
} catch (Exception $e) {
if (isset($e->msg)) {
form_error(null, $e->msg);
} else {
throw $e;
}
}
}
echo $this->error;
echo '<div class="simple_form">' . N;
js_form_start('to_new_map');
input('name');
submit(l('Save'));
focus('name');
// Keep the view parameters the users has set
$params = ltrim(req('view_params'), '&');
if ($params) {
$parts = explode('&', $params);
foreach ($parts as $part) {
list($key, $val) = explode('=', $part);
hidden($key, $val);
}
}
form_end();
echo '</div>' . N;
return ob_get_clean();
}
开发者ID:rlugojr,项目名称:nagvis,代码行数:58,代码来源:ViewToNewMap.php
示例4: starbase_show_starbase
function starbase_show_starbase($starbase_id)
{
assert(!empty($starbase_id));
global $_GALAXY;
if (!anomaly_is_starbase($starbase_id)) {
return;
}
$starbase = anomaly_get_anomaly($starbase_id);
$sector = sector_get_sector($starbase['sector_id']);
$race = user_get_race($starbase['user_id']);
if ($race == "") {
$race = "-";
}
echo "<table border=1 width=500 align=center>";
echo " <tr><td align=center><b><i>Starbase: " . $starbase['name'] . "</i></b></td></tr>";
echo " <tr><td>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><td width=200>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><th>Starbase View</th></tr>";
echo " <tr><td width=100%><center><img src=\"" . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/starbase/" . $starbase['image'] . ".jpg\" width=150 height=150></center></td></tr>";
echo " <tr><th> </th></tr>";
echo " </table>";
echo " </td>";
echo " <td> </td>";
echo " <td nowrap valign=top>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><td nowrap width=40%><strong>Starbase Name </strong></td><td nowrap width=1%><b>:</b></td>";
if ($starbase['unknown'] == 1) {
form_start();
echo "<td nowrap>";
echo " <input type=hidden name=aid value=" . encrypt_get_vars($starbase_id) . ">";
echo " <input type=hidden name=cmd value=" . encrypt_get_vars("claim") . ">";
echo " <input type=text size=15 maxlength=30 name=ne_name> ";
echo " <input name=submit type=submit value=\"Claim\">";
echo "</td>";
form_end();
} else {
echo "<td nowrap>" . $starbase['name'] . "</td>";
}
echo " </tr>";
echo " <tr><td colspan=3> </td></tr>";
echo " <tr><td nowrap width=40%><strong>Caretaker </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $race . "</td></tr>";
echo " <tr><td colspan=3> </td></tr>";
echo " <tr><td nowrap width=40%><strong>Attack </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $starbase['cur_attack'] . "</td></tr>";
echo " <tr><td nowrap width=40%><strong>Defense </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $starbase['cur_defense'] . "</td></tr>";
echo " <tr><td nowrap width=40%><strong>Strength </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $starbase['cur_strength'] . "</td></tr>";
echo " <tr><td colspan=3> </td></tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:57,代码来源:global_starbase.php
示例5: listSearchesGUI
function listSearchesGUI()
{
global $months;
h3("Vis artikler fra gitt måned");
form_start_post();
select_open("month");
for ($i = 1; $i < 10; $i++) {
option_open("0" . $i);
echo $months[$i];
option_close();
}
for ($i = 10; $i < 13; $i++) {
option_open($i);
echo $months[$i];
option_close();
}
select_close();
form_hidden("m_c", "monthSearchResultGUI");
form_select_number("year", 2004, date("Y"), date("Y"));
form_submit("submit", "Søk");
form_end();
br();
br();
h3("Fritekstsøk");
$author_usernames = array();
$author_names = array();
$author_usernames[] = "0";
$author_names[] = "(ikke begrens)";
$author_usernames = array_merge($author_usernames, getAllAuthorsUsernames());
$author_names = array_merge($author_names, getAllAuthorsNames());
form_start_post();
form_textfield("text", "");
br();
echo "Sjekk mot hele ord ";
form_checkbox("nopartialmatch", "1", "1");
br();
echo "Søk i kommentarer ";
form_checkbox("searchcomments", "1", "0");
form_hidden("m_c", "textSearchResultGUI");
br();
echo "Begrens til én forfatter ";
form_dropdown("author", $author_usernames, $author_names, 0);
br();
form_submit("submit", "Fritekstsøk");
form_end();
br();
br();
h3("Vis alle kommentarer av gitt bruker");
$author_usernames = getAllUsersUsernames();
$author_names = getAllUsersNames();
form_start_post();
echo "Velg forfatter ";
form_dropdown("author", $author_usernames, $author_names, 0);
form_submit("submit", "Vis kommentarer");
form_hidden("m_c", "listCommentsSearchResultGUI");
form_end();
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:57,代码来源:searchGUI.php
示例6: blackhole_show_blackhole
function blackhole_show_blackhole($blackhole_id)
{
assert(is_numeric($blackhole_id));
global $_GALAXY;
if (!anomaly_is_blackhole($blackhole_id)) {
return;
}
$blackhole = anomaly_get_anomaly($blackhole_id);
$race = user_get_race($blackhole['user_id']);
$sector = sector_get_sector($blackhole['sector_id']);
if ($race == "") {
$race = "-";
}
echo "<table border=1 width=500 align=center>";
echo " <tr><td align=center><b><i>Sector: " . $sector['name'] . " / Anomaly: " . $blackhole['name'] . "</i></b></td></tr>";
echo " <tr><td>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><td width=200>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><th>Anomaly View</th></tr>";
echo " <tr><td width=100%><center><img src=\"" . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/blackholes/" . $blackhole['image'] . ".jpg\" width=150 height=150></center></td></tr>";
echo " <tr><th> </th></tr>";
echo " </table>";
echo " </td>";
echo " <td> </td>";
echo " <td nowrap valign=top>";
echo " <table border=0 cellpadding=0 cellspacing=0 width=100%>";
echo " <tr><td nowrap width=40%><strong>Blackhole Name </strong></td><td nowrap width=1%><b>:</b></td>";
if ($blackhole['unknown'] == 1) {
form_start();
echo "<td nowrap>";
echo " <input type=hidden name=aid value=" . encrypt_get_vars($blackhole_id) . ">";
echo " <input type=hidden name=cmd value=" . encrypt_get_vars("claim") . ">";
echo " <input type=text size=15 maxlength=30 name=ne_name> ";
echo " <input name=submit type=submit value=\"Claim\">";
echo "</td>";
form_end();
} else {
echo "<td nowrap>" . $blackhole['name'] . "</td>";
}
echo " </tr>";
echo " <tr><td colspan=3> </td></tr>";
echo " <tr><td nowrap width=40%><strong>Caretaker </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $race . "</td></tr>";
echo " <tr><td nowrap width=40%><strong>Radius </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $blackhole['radius'] . " km</td></tr>";
echo " <tr><td nowrap width=40%><strong>Distance to sun </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . $blackhole['distance'] . " km (10<sup>6</sup>)</td></tr>";
echo " <tr><td colspan=3> </td></tr>";
echo " <tr><td nowrap width=40%><strong>Fatalities </strong></td><td nowrap width=1%><b>:</b> </td><td nowrap>" . blackhole_get_fatalities($blackhole_id) . " ship(s)</td></tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "<br><br>";
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:56,代码来源:global_blackhole.php
示例7: page_admin_images
function page_admin_images($act = "", $id = "")
{
requires_admin();
use_layout("admin");
form_start("", "post", " enctype='multipart/form-data' ");
form_file("Файл", "file");
$caption = "Загрузить картинку";
if ($act == "edit") {
$caption = "Изменить картинку";
}
form_submit($caption, "submit");
form_end();
$upload = form();
if (form_file_uploaded("file")) {
$fname = $_FILES["file"]['name'];
$ext = strtolower(fileext($fname));
if (!($ext == "swf" || $ext == "jpg" || $ext == "gif" || $ext == "png" || $ext == "bmp" || $ext == "jpeg" || $ext == "pdf")) {
$o = "Данный тип файла не является картинкой";
return $o;
} else {
if ($act == "add") {
db_query("INSERT INTO images (link) VALUES ('')");
$id = db_last_id();
} else {
@unlink(db_result(db_query("SELECT link FROM images WHERE id=%d", $id)));
}
$fname = $id . "." . fileext($fname);
form_file_uploaded_move("file", "img/" . $fname);
db_query("UPDATE images SET link='img/{$fname}' WHERE id=%d", $id);
redir("admin/images/edit/{$id}");
}
}
if ($act == "add") {
$o = $upload;
return $o;
}
if ($act == "del") {
$im = db_object_get("images", $id);
@unlink("{$im->link}");
}
$o = table_edit("images", "admin/images", $act, $id, "", "", "", "image_func");
if ($act == 'edit') {
$im = db_object_get("images", $id);
$o .= "<img width=100px src={$im->link}><br>{$upload}";
}
return $o;
}
开发者ID:NazarK,项目名称:sqp,代码行数:47,代码来源:images.php
示例8: edit_description
function edit_description($anomaly_id)
{
assert(is_numeric($anomaly_id));
$anomaly = anomaly_get_anomaly($anomaly_id);
print_subtitle("Edit description for " . $anomaly['name']);
echo " <center>\n";
form_start();
echo " <input type=hidden name=aid value=" . encrypt_get_vars($anomaly_id) . ">\n";
echo " <input type=hidden name=cmd value=" . encrypt_get_vars("description2") . ">\n";
echo " <textarea name=ne_description maxlength=255 rows=10 cols=80>";
echo px2html4edit($anomaly['description']);
echo "</textarea>\n";
echo " <input name=submit type=submit value=\"Change Description\">\n";
form_end();
echo " </center>\n";
create_submenu(array("Back to planet view" => "anomaly.php?cmd=" . encrypt_get_vars("show") . "&aid=" . encrypt_get_vars($anomaly_id)));
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:17,代码来源:anomaly.php
示例9: package
function package() {
$menu_items = array(
"remove" => "Remove",
"duplicate" => "Duplicate"
);
$filter_array = array();
/* search field: filter (searches package name) */
if (isset_get_var("search_filter")) {
$filter_array["name"] = get_get_var("search_filter");
}
/* get a list of all packages on this page */
$packages = api_package_list($filter_array);
form_start("packages.php");
$box_id = "1";
html_start_box("<strong>" . _("Template Packages") . "</strong>", "packages.php?action=new");
html_header_checkbox(array(_("Name"), _("Author"), _("Category")), $box_id);
$i = 0;
if (sizeof($packages) > 0) {
foreach ($packages as $package) {
?>
<tr class="item" id="box-<?php echo $box_id;?>-row-<?php echo $package["id"];?>" onClick="display_row_select('<?php echo $box_id;?>',document.forms[0],'box-<?php echo $box_id;?>-row-<?php echo $package["id"];?>', 'box-<?php echo $box_id;?>-chk-<?php echo $package["id"];?>')" onMouseOver="display_row_hover('box-<?php echo $box_id;?>-row-<?php echo $package["id"];?>')" onMouseOut="display_row_clear('box-<?php echo $box_id;?>-row-<?php echo $package["id"];?>')">
<td class="title">
<a onClick="display_row_block('box-<?php echo $box_id;?>-row-<?php echo $package["id"];?>')" href="packages.php?action=view&id=<?php echo $package["id"];?>"><span id="box-<?php echo $box_id;?>-text-<?php echo $package["id"];?>"><?php echo html_highlight_words(get_get_var("search_filter"), $package["name"]);?></span></a>
</td>
<td>
Ian Berry
</td>
<td>
<?php echo $package["category"];?>
</td>
<td class="checkbox" align="center">
<input type='checkbox' name='box-<?php echo $box_id;?>-chk-<?php echo $package["id"];?>' id='box-<?php echo $box_id;?>-chk-<?php echo $package["id"];?>' title="<?php echo $package["name"];?>">
</td>
</tr>
<?php
}
}else{
?>
<tr class="empty">
<td colspan="6">
No template packages found.
</td>
</tr>
<?php
}
html_box_toolbar_draw($box_id, "0", "3", HTML_BOX_SEARCH_NONE);
html_end_box(false);
//html_box_actions_menu_draw($box_id, "0", $menu_items);
html_box_actions_area_create($box_id);
form_hidden_box("action_post", "package_list");
form_end();
echo "<br />\n";
form_start("packages.php", "import_package", true);
html_start_box("<strong>" . _("Import Package") . "</strong>");
_package_import_field__file("import_package_file");
_package_import_field__text("import_package_text");
?>
<tr>
<td style="border-top: 1px solid #b5b5b5; padding: 1px;" colspan="2">
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td align="right">
<input type="image" src="<?php echo html_get_theme_images_path('button_import.gif');?>" alt="<?php echo _('Import');?>" name="package_import" align="absmiddle">
</td>
</tr>
</table>
</td>
</tr>
<?php
html_end_box();
form_hidden_box("action", "save");
form_hidden_box("action_post", "package_import");
form_end();
//print_a(htmlspecialchars(package_export("1")));
?>
<script language="JavaScript">
<!--
function action_area_handle_type(box_id, type, parent_div, parent_form) {
if (type == 'remove') {
parent_div.appendChild(document.createTextNode('Are you sure you want to remove these data templates?'));
parent_div.appendChild(action_area_generate_selected_rows(box_id));
//.........这里部分代码省略.........
开发者ID:songchin,项目名称:Cacti,代码行数:101,代码来源:packages.php
示例10: showModulesDropDown
function showModulesDropDown($module = "")
{
$table = getModules();
div_open();
form_start_post();
form_select("module");
if ($table) {
while ($row = nextResultInTable($table)) {
if ($module == $row['module']) {
form_option($row['module'], $row['module'], "true");
} else {
form_option($row['module'], $row['module']);
}
}
} else {
// no modules with settings available
form_option("-", "");
}
form_select_end();
// this module
form_hidden("m_c", "showSettingsGUI");
// button
form_submit("submit", getString("settings_show_settings", "Vis innstillinger"));
form_end();
div_close();
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:26,代码来源:settingsGUI.php
示例11: deleteForm
private function deleteForm()
{
global $CORE;
echo '<h2>' . l('Delete Shape') . '</h2>';
if (is_action() && post('mode') == 'delete') {
try {
$name = post('name');
if (!$name) {
throw new FieldInputError('name', l('Please choose a shape'));
}
$shapes = $CORE->getAvailableShapes();
if (!isset($shapes[$name])) {
throw new FieldInputError('name', l('The shape does not exist.'));
}
// Check whether or not the shape is in use
$using = array();
foreach ($CORE->getAvailableMaps() as $map) {
$MAPCFG = new GlobalMapCfg($map);
try {
$MAPCFG->readMapConfig();
} catch (Exception $e) {
continue;
// don't fail on broken map configs
}
foreach ($MAPCFG->getDefinitions('shape') as $key => $obj) {
if (isset($obj['icon']) && $obj['icon'] == $name) {
$using[] = $MAPCFG->getName();
}
}
}
if ($using) {
throw new FieldInputError('name', l('Unable to delete this shape, because it is ' . 'currently used by these maps: [M].', array('M' => implode(',', $using))));
}
$path = path('sys', '', 'shapes', $name);
if ($path !== '') {
unlink($path);
}
success(l('The shape has been deleted.'));
//reload(null, 1);
} catch (FieldInputError $e) {
form_error($e->field, $e->msg);
} catch (Exception $e) {
if (isset($e->msg)) {
form_error(null, $e->msg);
} else {
throw $e;
}
}
}
echo $this->error;
js_form_start('delete_shape');
hidden('mode', 'delete');
echo '<table class="mytable">';
echo '<tr><td class="tdlabel">' . l('Shape') . '</td>';
echo '<td class="tdfield">';
$shapes = array('' => l('Choose a shape'));
foreach ($CORE->getAvailableShapes() as $name) {
$shapes[$name] = $name;
}
select('name', $shapes);
echo '</td></tr>';
echo '</table>';
submit(l('Delete'));
form_end();
}
开发者ID:rbarraud,项目名称:nagvis,代码行数:65,代码来源:ViewManageShapes.php
示例12: template
//.........这里部分代码省略.........
?>
')">
<td class="title">
<a onClick="display_row_block('box-<?php
echo $box_id;
?>
-row-<?php
echo $data_template["id"];
?>
')" href="data_templates.php?action=edit&id=<?php
echo $data_template["id"];
?>
"><span id="box-<?php
echo $box_id;
?>
-text-<?php
echo $data_template["id"];
?>
"><?php
echo html_highlight_words(get_get_var("search_filter"), $data_template["template_name"]);
?>
</span></a>
</td>
<td>
<?php
echo $data_input_types[$data_template["data_input_type"]];
?>
</td>
<td>
<?php
if ($data_template["active"] == "1") {
echo _("Active");
} else {
echo _("Disabled");
}
?>
</td>
<td class="checkbox" align="center">
<input type='checkbox' name='box-<?php
echo $box_id;
?>
-chk-<?php
echo $data_template["id"];
?>
' id='box-<?php
echo $box_id;
?>
-chk-<?php
echo $data_template["id"];
?>
' title="<?php
echo $data_template["template_name"];
?>
">
</td>
</tr>
<?php
}
} else {
?>
<tr class="empty">
<td colspan="6">
No data templates found.
</td>
</tr>
<?php
}
html_box_toolbar_draw($box_id, "0", "3", HTML_BOX_SEARCH_NO_ICON);
html_end_box(false);
html_box_actions_menu_draw($box_id, "0", $menu_items);
html_box_actions_area_create($box_id);
form_hidden_box("action_post", "data_template_list");
form_end();
?>
<script language="JavaScript">
<!--
function action_area_handle_type(box_id, type, parent_div, parent_form) {
if (type == 'remove') {
parent_div.appendChild(document.createTextNode('Are you sure you want to remove these data templates?'));
parent_div.appendChild(action_area_generate_selected_rows(box_id));
action_area_update_header_caption(box_id, 'Remove Data Template');
action_area_update_submit_caption(box_id, 'Remove');
action_area_update_selected_rows(box_id, parent_form);
}else if (type == 'duplicate') {
parent_div.appendChild(document.createTextNode('Are you sure you want to duplicate these data templates?'));
parent_div.appendChild(action_area_generate_selected_rows(box_id));
parent_div.appendChild(action_area_generate_input('text', 'box-' + box_id + '-action-area-txt1', ''));
action_area_update_header_caption(box_id, 'Duplicate Data Templates');
action_area_update_submit_caption(box_id, 'Duplicate');
action_area_update_selected_rows(box_id, parent_form);
}
}
-->
</script>
<?php
}
开发者ID:songchin,项目名称:Cacti,代码行数:101,代码来源:data_templates.php
示例13: webseer_urls
//.........这里部分代码省略.........
</td>
<td>
<label for='associated'><?php
print __('Associated');
?>
</label>
</td>
<td>
<input type='button' value='<?php
print __('Go');
?>
' onClick='applyFilter()' title='<?php
print __('Set/Refresh Filters');
?>
'>
</td>
<td>
<input type='button' name='clear' value='<?php
print __('Clear');
?>
' onClick='clearFilter()' title='<?php
print __('Clear Filters');
?>
'>
</td>
</tr>
</table>
<input type='hidden' name='page' value='<?php
print get_request_var('page');
?>
'>
<input type='hidden' name='id' value='<?php
print get_request_var('id');
?>
'>
</form>
</td>
</tr>
<?php
html_end_box();
/* form the 'where' clause for our main sql query */
if (strlen(get_request_var('filter'))) {
$sql_where = "WHERE ((u.url LIKE '%" . get_request_var('filter') . "%') \n\t\t\tOR (u.display_name LIKE '%" . get_request_var('filter') . "%') \n\t\t\tOR (u.ip LIKE '%" . get_request_var('filter') . "%'))";
} else {
$sql_where = '';
}
if (get_request_var('associated') == 'false') {
$sql_where .= (strlen($sql_where) ? ' AND ' : 'WHERE ') . ' (pmh.type=2 OR pmh.type IS NULL)';
} else {
$sql_where .= (strlen($sql_where) ? ' AND ' : 'WHERE ') . ' pmh.type=2 AND pmh.schedule=' . get_request_var('id');
}
$total_rows = db_fetch_cell("SELECT\n\t\tCOUNT(*)\n\t\tFROM plugin_webseer_urls AS u\n\t\tLEFT JOIN plugin_maint_hosts AS pmh\n\t\tON u.id=pmh.host\n\t\t{$sql_where}");
$sql_query = "SELECT u.*, pmh.host AS associated, pmh.type AS maint_type\n\t\tFROM plugin_webseer_urls AS u\n\t\tLEFT JOIN plugin_maint_hosts AS pmh\n\t\tON u.id=pmh.host\n\t\t{$sql_where} \n\t\tLIMIT " . $rows * (get_request_var('page') - 1) . ',' . $rows;
$urls = db_fetch_assoc($sql_query);
$nav = html_nav_bar('notify_lists.php?action=edit&id=' . get_request_var('id'), MAX_DISPLAY_PAGES, get_request_var('page'), $rows, $total_rows, 13, __('Lists'), 'page', 'main');
form_start('maint.php', 'chk');
print $nav;
html_start_box('', '100%', '', '3', 'center', '');
$display_text = array(__('Description'), __('ID'), __('Associated Schedules'), __('Enabled'), __('Hostname'), __('URL'));
html_header_checkbox($display_text);
if (sizeof($urls)) {
foreach ($urls as $url) {
form_alternate_row('line' . $url['id']);
form_selectable_cell(strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "<span class='filteredValue'>\\1</span>", htmlspecialchars($url['display_name'])) : htmlspecialchars($url['display_name']), $url['id'], 250);
form_selectable_cell(round($url['id'], 2), $url['id']);
if ($url['associated'] != '' && $url['maint_type'] == '2') {
form_selectable_cell('<span class="deviceUp">' . __('Current Schedule') . '</span>', $url['id']);
} else {
if (sizeof($lists = db_fetch_assoc('SELECT name FROM plugin_maint_schedules INNER JOIN plugin_maint_hosts ON plugin_maint_schedules.id=plugin_maint_hosts.schedule WHERE type=2 AND host=' . $url['id']))) {
$names = '';
foreach ($lists['name'] as $name) {
$names .= (strlen($names) ? ', ' : '') . "<span class='deviceRecovering'>{$name}</span>";
}
form_selectable_cell($names, $url['id']);
} else {
form_selectable_cell('<span class="deviceUnknown">' . __('No Schedules') . '</span>', $url['id']);
}
}
form_selectable_cell($url['enabled'] == 'on' ? __('Enabled') : __('Disabled'), $url['id']);
if (empty($url['ip'])) {
$url['ip'] = __('USING DNS');
}
form_selectable_cell(strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "<span class='filteredValue'>\\1</span>", '<i>' . htmlspecialchars($url['ip'])) . '</i>' : '<i>' . htmlspecialchars($url['ip']) . '</i>', $url['id']);
form_selectable_cell(strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "<span class='filteredValue'>\\1</span>", htmlspecialchars($url['url'])) : htmlspecialchars($url['url']), $url['id']);
form_checkbox_cell($url['display_name'], $url['id']);
form_end_row();
}
} else {
print "<tr><td><em>" . __('No Associated WebSeer URL\'s Found') . "</em></td></tr>";
}
html_end_box(false);
if (sizeof($urls)) {
print $nav;
}
form_hidden_box('id', get_request_var('id'), '');
form_hidden_box('save_webseer', '1', '');
/* draw the dropdown containing a list of available actions for this form */
draw_actions_dropdown($assoc_actions);
form_end();
}
开发者ID:Cacti,项目名称:plugin_maint,代码行数:101,代码来源:maint.php
示例14: mod_pick_style
function mod_pick_style()
{
$styles = array("Standardstil" => "css/aviscms.css", "Thormod" => "http://www.stud.ntnu.no/~nordram/thorstyle.css", "Heimegut" => "http://www.festsiden.org/_tore/heimegut.css", "Blogspot" => "http://www.festsiden.org/_tore/blogspot.css", "Galápagos" => "css/galapagos.css");
global $stylestatus, $layout, $css_file, $languageChoice;
echo '<div class="options"><div class="optionsheader">Stilvelger</div>';
form_start_get();
echo '<select name="chosenstyle">';
foreach ($styles as $stylename => $stylefile) {
if ($stylefile == $css_file) {
echo '<option value="' . $stylefile . '" selected="selected">' . $stylename . '</option>';
} else {
echo '<option value="' . $stylefile . '">' . $stylename . '</option>';
}
}
echo "</select>";
form_hidden("module_right_2", "mod_pick_style");
form_hidden("styleselect", "styleselect");
echo "<br/>";
echo "<br/>";
echo '<div class="optionsheader">Velg layout</div>';
?>
<select name="chosenlayout">
<?php
echo '<option value="1">En kolonne</option>';
echo '<option value="2">To kolonner</option>';
echo '<option value="3">Tre kolonner</option>';
echo '<option value="4">Fire kolonne</option>';
?>
</select>
<?php
form_hidden("redirect", "true");
form_hidden("module_right_2", "mod_pick_style");
form_hidden("layoutselect", "layoutselect");
echo "<br/>";
echo "<br/>";
echo '<div class="optionsheader">Velg språk</div>';
$arrayWithAllLanguageIds = getAllLanguageIds();
$arrayWithAllLanguageNames = getAllLanguageNames();
// Add a choice for viewing articles in all languages
array_unshift($arrayWithAllLanguageIds, "-1");
array_unshift($arrayWithAllLanguageNames, "Alle språk");
debug("fra cookie..:" . $languageChoice . "!");
debug("fra cookie..:" . $_REQUEST['languageChoice'] . "!");
form_dropdown("languageChoice", $arrayWithAllLanguageIds, $arrayWithAllLanguageNames, $languageChoice + 1);
echo "<br/>";
echo "<br/>";
form_submit("submitlayout", "Endre");
form_end();
echo "</div>";
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:50,代码来源:mod_cookies.php
示例15: negative
negative($errors);
}
} else {
neutral(array('<strong>Zmiana tych parametrów może sparaliżować całą witrynę!</strong>', 'Poniższe ustawienia są zapisane w pliku config.php', $lang_system['REQUIRED']));
}
// Form
echo '<form action="' . local_url . 'admin/system/server" method="post"><table class="form">
<tr class="top title"><th> </th><td class="title">Baza danych</td></tr>
<tr><th><label for="f_db_host"><span class="required">*</span> Serwer</label></th><td><input type="text" name="db_host" value="' . $form['db_host'] . '" class="big' . ($errors[1] ? ' error' : '') . '" id="f_db_host" /></td></tr>
<tr><th><label for="f_db_name"><span class="required">*</span> Nazwa</label></th><td><input type="text" name="db_name" value="' . $form['db_name'] . '" class="big' . ($errors[2] ? ' error' : '') . '" id="f_db_name" /></td></tr>
<tr><th><label for="f_db_user"><span class="required">*</span> Użytkownik</label></th><td><input type="text" name="db_user" value="' . $form['db_user'] . '" class="big' . ($errors[3] ? ' error' : '') . '" id="
|
请发表评论