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


PHP form_confirm函数代码示例

本文整理汇总了PHP中form_confirm函数的典型用法代码示例。如果您正苦于以下问题:PHP form_confirm函数的具体用法?PHP form_confirm怎么用?PHP form_confirm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: input_remove

function input_remove()
{
    if (read_config_option("remove_verification") == "on" && !isset($_GET["confirm"])) {
        require_once CACTI_BASE_PATH . "/include/top_header.php";
        form_confirm(_("Are You Sure?"), _("Are you sure you want to delete the input item") . " <strong>'" . db_fetch_cell("select name from graph_template_item_input where id=" . $_GET["id"]) . "'</strong>? NOTE: Deleting this input will <strong>not</strong> affect graphs that use this template.", "graph_templates.php?action=edit&id=" . $_GET["graph_template_id"], "graph_templates_inputs.php?action=remove&id=" . $_GET["id"] . "&graph_template_id=" . $_GET["graph_template_id"]);
        require_once CACTI_BASE_PATH . "/include/bottom_footer.php";
        exit;
    }
    if (read_config_option("remove_verification") == "" || isset($_GET["confirm"])) {
        api_graph_template_item_input_remove($_GET["id"]);
    }
}
开发者ID:songchin,项目名称:Cacti,代码行数:12,代码来源:graph_templates_inputs.php

示例2: gprint_presets_remove

function gprint_presets_remove()
{
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var("id"));
    /* ==================================================== */
    if (read_config_option("deletion_verification") == "on" && !isset($_GET["confirm"])) {
        include_once "./include/top_header.php";
        form_confirm("Are You Sure?", "Are you sure you want to delete the GPRINT preset <strong>'" . htmlspecialchars(db_fetch_cell("select name from graph_templates_gprint where id=" . $_GET["id"])) . "'</strong>? This could affect every graph that uses this preset, make sure you know what you are doing first!", htmlspecialchars("gprint_presets.php"), htmlspecialchars("gprint_presets.php?action=remove&id=" . $_GET["id"]));
        exit;
    }
    if (read_config_option("deletion_verification") == "" || isset($_GET["confirm"])) {
        db_execute("delete from graph_templates_gprint where id=" . $_GET["id"]);
    }
}
开发者ID:resmon,项目名称:resmon-cacti,代码行数:14,代码来源:gprint_presets.php

示例3: host_remove

function host_remove()
{
    if (read_config_option("remove_verification") == "on" && !isset($_GET["confirm"])) {
        require_once CACTI_BASE_PATH . "/include/top_header.php";
        form_confirm(_("Are You Sure?"), _("Are you sure you want to delete the host <strong>'") . db_fetch_cell("select description from host where id=" . $_GET["id"]) . "'</strong>?", "devices.php", "devices.php?action=remove&id=" . $_GET["id"]);
        require_once CACTI_BASE_PATH . "/include/bottom_footer.php";
        exit;
    }
    if (read_config_option("remove_verification") == "" || isset($_GET["confirm"])) {
        api_device_remove($_GET["id"]);
    }
}
开发者ID:songchin,项目名称:Cacti,代码行数:12,代码来源:devices.php

示例4: mactrack_site_remove

function mactrack_site_remove()
{
    global $config;
    /* ================= input validation ================= */
    get_filter_request_var('site_id');
    /* ==================================================== */
    if (read_config_option('remove_verification') == 'on' && !isset_request_var('confirm')) {
        top_header();
        form_confirm(__('Are You Sure?'), __("Are you sure you want to delete the site <strong>'%s'</strong>?", db_fetch_cell('SELECT description FROM host WHERE id=' . get_request_var('device_id'))), 'mactrack_sites.php', 'mactrack_sites.php?action=remove&site_id=' . get_request_var('site_id'));
        bottom_footer();
        exit;
    }
    if (read_config_option('remove_verification') == '' || isset_request_var('confirm')) {
        api_mactrack_site_remove(get_request_var('site_id'));
    }
}
开发者ID:Cacti,项目名称:plugin_mactrack,代码行数:16,代码来源:mactrack_sites.php

示例5: host_remove

function host_remove() {
	global $config;

	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the host <strong>'" . db_fetch_cell("select description from host where id=" . $_GET["id"]) . "'</strong>?", "host.php", "host.php?action=remove&id=" . $_GET["id"]);
		include("./include/bottom_footer.php");
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		api_device_remove($_GET["id"]);
	}
}
开发者ID:songchin,项目名称:Cacti,代码行数:14,代码来源:host.php

示例6: data_query_remove

function data_query_remove() {
	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the Data Query <strong>'" . db_fetch_cell("select name from snmp_query where id=" . $_GET["id"]) . "'</strong>?", "data_queries.php", "data_queries.php?action=remove&id=" . $_GET["id"]);
		include("./include/bottom_footer.php");
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		$snmp_query_graph = db_fetch_assoc("select id from snmp_query_graph where snmp_query_id=" . $_GET["id"]);

		if (sizeof($snmp_query_graph) > 0) {
		foreach ($snmp_query_graph as $item) {
			db_execute("delete from snmp_query_graph_rrd where snmp_query_graph_id=" . $item["id"]);
		}
		}

		db_execute("delete from snmp_query where id=" . $_GET["id"]);
		db_execute("delete from snmp_query_graph where snmp_query_id=" . $_GET["id"]);
		db_execute("delete from host_template_snmp_query where snmp_query_id=" . $_GET["id"]);
		db_execute("delete from host_snmp_query where snmp_query_id=" . $_GET["id"]);
		db_execute("delete from host_snmp_cache where snmp_query_id=" . $_GET["id"]);
	}
}
开发者ID:songchin,项目名称:Cacti,代码行数:24,代码来源:data_queries.php

示例7: user_remove

function user_remove() {
	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the user <strong>'" . db_fetch_cell("select username from user_auth where id=" . $_GET["id"]) . "'</strong>?", "user_admin.php", "user_admin.php?action=user_remove&id=" . $_GET["id"]);
		include("./include/bottom_footer.php");
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		db_execute("delete from user_auth where id=" . $_GET["id"]);
		db_execute("delete from user_auth_realm where user_id=" . $_GET["id"]);
		db_execute("delete from user_auth_perms where user_id=" . $_GET["id"]);
		db_execute("delete from settings_graphs where user_id=" . $_GET["id"]);
	}
}
开发者ID:songchin,项目名称:Cacti,代码行数:15,代码来源:user_admin.php

示例8: item_remove

function item_remove()
{
    if (read_config_option("remove_verification") == "on" && !isset($_GET["confirm"])) {
        $graph_tree_item = db_fetch_row("select title,local_graph_id,host_id from graph_tree_items where id=" . $_GET["id"]);
        if (!empty($graph_tree_item["local_graph_id"])) {
            $text = "Are you sure you want to delete the graph item <strong>'" . db_fetch_cell("select title_cache from graph where id=" . $graph_tree_item["local_graph_id"]) . "'</strong>?";
        } elseif ($graph_tree_item["title"] != "") {
            $text = "Are you sure you want to delete the header item <strong>'" . $graph_tree_item["title"] . "'</strong>?";
        } elseif (!empty($graph_tree_item["host_id"])) {
            $text = "Are you sure you want to delete the host item <strong>'" . db_fetch_cell("select CONCAT_WS('',description,' (',hostname,')') as hostname from host where id=" . $graph_tree_item["host_id"]) . "'</strong>?";
        }
        require_once CACTI_BASE_PATH . "/include/top_header.php";
        form_confirm("Are You Sure?", $text, "graph_trees.php?action=edit&id=" . $_GET["tree_id"], "graph_trees.php?action=item_remove&id=" . $_GET["id"] . "&tree_id=" . $_GET["tree_id"]);
        require_once CACTI_BASE_PATH . "/include/bottom_footer.php";
        exit;
    }
    if (read_config_option("remove_verification") == "" || isset($_GET["confirm"])) {
        delete_branch($_GET["id"]);
    }
    header("Location: graph_trees.php?action=edit&id=" . $_GET["tree_id"]);
    exit;
}
开发者ID:songchin,项目名称:Cacti,代码行数:22,代码来源:graph_trees_items.php

示例9: cdef_remove

function cdef_remove()
{
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var("id"));
    /* ==================================================== */
    if (read_config_option("remove_verification") == "on" && !isset($_GET["confirm"])) {
        include "./include/top_header.php";
        form_confirm("Are You Sure?", "Are you sure you want to delete the CDEF <strong>'" . db_fetch_cell("select name from cdef where id=" . $_GET["id"]) . "'</strong>?", "cdef.php", "cdef.php?action=remove&id=" . $_GET["id"]);
        include "./include/bottom_footer.php";
        exit;
    }
    if (read_config_option("remove_verification") == "" || isset($_GET["confirm"])) {
        db_execute("delete from cdef where id=" . $_GET["id"]);
        db_execute("delete from cdef_items where cdef_id=" . $_GET["id"]);
    }
}
开发者ID:BackupTheBerlios,项目名称:odp-svn,代码行数:16,代码来源:cdef.php

示例10: rra_remove

function rra_remove() {
	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include_once("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the round robin archive <strong>'" . db_fetch_cell("select name from rra where id=" . $_GET["id"]) . "'</strong>?", "rra.php", "rra.php?action=remove&id=" . $_GET["id"]);
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		db_execute("delete from rra where id=" . $_GET["id"]);
		db_execute("delete from rra_cf where rra_id=" . $_GET["id"]);
    	}
}
开发者ID:songchin,项目名称:Cacti,代码行数:12,代码来源:rra.php

示例11: cdef_remove

function cdef_remove() {
	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the CDEF <strong>'" . db_fetch_cell("select name from cdef where id=" . $_GET["id"]) . "'</strong>?", "cdef.php", "cdef.php?action=remove&id=" . $_GET["id"]);
		include("./include/bottom_footer.php");
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		db_execute("delete from cdef where id=" . $_GET["id"]);
		db_execute("delete from cdef_items where cdef_id=" . $_GET["id"]);
	}
}
开发者ID:songchin,项目名称:Cacti,代码行数:13,代码来源:cdef.php

示例12: host_remove

function host_remove()
{
    global $config;
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var("id"));
    /* ==================================================== */
    /* modify for multi user start */
    if (!check_host($_GET["id"])) {
        access_denied();
    }
    /* modify for multi user end */
    if (read_config_option("deletion_verification") == "on" && !isset($_GET["confirm"])) {
        include "./include/top_header.php";
        form_confirm("Are You Sure?", "Are you sure you want to delete the host <strong>'" . htmlspecialchars(db_fetch_cell("select description from host where id=" . $_GET["id"])) . "'</strong>?", htmlspecialchars("host.php"), htmlspecialchars("host.php?action=remove&id=" . $_GET["id"]));
        include "./include/bottom_footer.php";
        exit;
    }
    if (read_config_option("deletion_verification") == "" || isset($_GET["confirm"])) {
        api_device_remove($_GET["id"]);
    }
}
开发者ID:resmon,项目名称:resmon-cacti,代码行数:21,代码来源:host.php

示例13: mactrack_utilities_recreate_aggregated_data

function mactrack_utilities_recreate_aggregated_data() {
	global $config, $colors;

	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete and recreate all the Aggregated Port to MAC to IP results from the system?", "mactrack_utilities.php", "mactrack_utilities.php?action=mactrack_utilities_recreate_aggregated_data");
		include("./include/bottom_footer.php");
		exit;
	}


	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		$old_rows = db_fetch_cell("SELECT COUNT(*) FROM mac_track_aggregated_ports");
		db_execute("TRUNCATE TABLE mac_track_aggregated_ports");

		db_execute("INSERT INTO mac_track_aggregated_ports
			(site_id, device_id, hostname, device_name,
			vlan_id, vlan_name, mac_address, vendor_mac, ip_address, dns_hostname,
			port_number, port_name, date_last, first_scan_date, count_rec, authorized)
			SELECT site_id, device_id, hostname, device_name,
			vlan_id, vlan_name, mac_address, vendor_mac, ip_address, dns_hostname,
			port_number, port_name, max(scan_date), min(scan_date), count(*), authorized
			FROM mac_track_ports
			GROUP BY site_id,device_id, mac_address, port_number, ip_address, vlan_id, authorized");

		$new_rows = db_fetch_cell("SELECT COUNT(*) FROM mac_track_aggregated_ports");

		include("./include/top_header.php");
		mactrack_utilities();
		html_start_box("<strong>Device Tracking Database Results</strong>", "100%", $colors["header"], "3", "center", "");
		?>
		<td>
			The following number of records have been removed from the aggergated table: <?php print $old_rows;?>. And <?php print $new_rows;?> number of record will be added.
		</td>
		<?php
		html_end_box();
	}
}
开发者ID:avillaverdec,项目名称:cacti,代码行数:38,代码来源:mactrack_utilities.php

示例14: mactrack_site_remove

function mactrack_site_remove() {
	global $config;

	/* ================= input validation ================= */
	input_validate_input_number(get_request_var("site_id"));
	/* ==================================================== */

	if ((read_config_option("remove_verification") == "on") && (!isset($_GET["confirm"]))) {
		include("./include/top_header.php");
		form_confirm("Are You Sure?", "Are you sure you want to delete the site <strong>'" . db_fetch_cell("select description from host where id=" . $_GET["device_id"]) . "'</strong>?", "mactrack_sites.php", "mactrack_sites.php?action=remove&site_id=" . $_GET["site_id"]);
		include("./include/bottom_footer.php");
		exit;
	}

	if ((read_config_option("remove_verification") == "") || (isset($_GET["confirm"]))) {
		api_mactrack_site_remove($_GET["site_id"]);
	}
}
开发者ID:avillaverdec,项目名称:cacti,代码行数:18,代码来源:mactrack_sites.php

示例15: mactrack_device_remove

function mactrack_device_remove()
{
    global $config;
    /* ================= input validation ================= */
    get_filter_request_var('device_id');
    get_filter_request_var('type_id');
    /* ==================================================== */
    if (read_config_option('remove_verification') == 'on' && !isset_request_var('confirm')) {
        top_header();
        form_confirm(__('Are You Sure?'), __('Are you sure you want to delete the host %s', db_fetch_cell_prepared('SELECT device_name FROM host WHERE id = ?', array(get_request_var('device_id')))), 'mactrack_devices.php', 'mactrack_devices.php?action=remove&id=' . get_request_var('device_id'));
        bottom_footer();
        exit;
    }
    if (read_config_option('remove_verification') == '' || isset_request_var('confirm')) {
        api_mactrack_device_remove(get_request_var('device_id'));
    }
}
开发者ID:Cacti,项目名称:plugin_mactrack,代码行数:17,代码来源:mactrack_devices.php


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