Example #1
0
function api_graph_template_item_moveup($graph_template_item_id) {
	require_once(CACTI_BASE_PATH . "/lib/sys/sequence.php");

	$graph_template_id = db_fetch_cell("select graph_template_id from graph_template_item where id = $graph_template_item_id");

	$last_item = seq_get_item("graph_template_item", "sequence", $graph_template_item_id, "graph_template_id = $graph_template_id", "previous");

	seq_move_item("graph_template_item", $graph_template_item_id, "graph_template_id = $graph_template_id", "up");

	db_execute("update graph_item set sequence = " . db_fetch_cell("select sequence from graph_template_item where id = $graph_template_item_id") . " where graph_template_item_id = $graph_template_item_id");
	db_execute("update graph_item set sequence = " . db_fetch_cell("select sequence from graph_template_item where id = $last_item") . " where graph_template_item_id = $last_item");
}
Example #2
0
function sv_moveup()
{
    seq_move_item("data_template_suggested_value", $_GET["id"], "data_template_id = " . $_GET["data_template_id"] . " and field_name = 'name'", "up");
}
Example #3
0
function sv_moveup()
{
    seq_move_item("graph_template_suggested_value", $_GET["id"], "graph_template_id = " . $_GET["graph_template_id"] . " and field_name = 'title'", "up");
}