".__('Not created. Error inserting data')."";
else {
echo "
".__('Created successfully')."
";
$id_sg = mysql_insert_id();
}
}
if (isset($_GET["update"])){ // if modified any parameter
$id_sg = entrada_limpia ($_GET["id_sg"]);
$name = entrada_limpia ($_POST["name"]);
$parent = entrada_limpia ($_POST["parent"]);
$sql_update ="UPDATE tnetwork_component_group
SET name = '$name', parent = '$parent'
WHERE id_sg = '$id_sg'";
$result=mysql_query($sql_update);
if (! $result)
echo "".__('Not updated. Error updating data')."
";
else
echo "".__('Updated successfully')."
";
}
if (isset($_GET["delete"])){ // if delete
$id_sg = entrada_limpia ($_GET["id_sg"]);
$sql_delete= "DELETE FROM tnetwork_component_group WHERE id_sg = ".$id_sg;
$result=mysql_query($sql_delete);
if (! $result)
echo "".__('Not deleted. Error deleting data')."
";
else
echo "".__('Deleted successfully')."
";
$result=mysql_query($sql_delete);
}
echo "".__('Module management')." > ";
echo __('Component group management')."
";
echo "";
echo "".__('Name')." | ";
echo "".__('Parent')." | ";
echo "".__('Delete')." | ";
$sql1='SELECT * FROM tnetwork_component_group ORDER BY parent';
$result=mysql_query($sql1);
$color=0;
while ($row=mysql_fetch_array($result)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
echo "
".$row["name"]."
|
".give_network_component_group_name ($row["parent"])."
|
|
";
}
echo "
";
echo '";
?>