2007-06-22 Raul Mateos <raulofpandora@gmail.com>
* include/languages/language_en.php: More strings. * pandoradb_data.sql: Solved small problem with language strings. * operation/visual_console/index.php: Added code to show text if no layout defined. * godmode/reporting/*builder.php: Added code to show text if no reporting defined. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@532 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
91b03f2aed
commit
f20d641d9e
|
@ -1,3 +1,15 @@
|
|||
2007-06-22 Raul Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* include/languages/language_en.php: More strings.
|
||||
|
||||
* pandoradb_data.sql: Solved small problem with language strings.
|
||||
|
||||
* operation/visual_console/index.php: Added code to show
|
||||
text if no layout defined.
|
||||
|
||||
* godmode/reporting/*builder.php: Added code to show text
|
||||
if no reporting defined.
|
||||
|
||||
2007-06-21 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/languages/language_en.php: More strings.
|
||||
|
@ -28,6 +40,8 @@
|
|||
* godmode/admin_access_logs.php: Added graph to header.
|
||||
|
||||
* godmode/reporting/map_builder.php: Removed debug stuff
|
||||
|
||||
2007-06-21 Raul Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* images/op*.gif, god*.gif: deleted. Also deleted several other
|
||||
GIF files.
|
||||
|
@ -709,7 +723,7 @@
|
|||
:(
|
||||
|
||||
* pandora_graphical_console_data.sql: Cleanup.
|
||||
|
||||
|
||||
* godmode/agentes/module_manager.php: Added wizard button.
|
||||
|
||||
* pandora_graphical_console.sql: Cleanup.
|
||||
|
@ -717,7 +731,7 @@
|
|||
|
||||
2007-05-02 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* pandoradb.sql: Fixed small problem with tgrupos
|
||||
* pandoradb.sql: Fixed small problem with tgrupos
|
||||
|
||||
2007-05-01 Raul Mateos <raulofpandora@gmail.com>
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ if (isset($_GET["update_module"])){
|
|||
$result = "<h3 class=suc>".$lang_label["modify_ok"]."</h3>";
|
||||
else {
|
||||
$result = "<h3 class=error>".$lang_label["modify_no"]."</h3>";
|
||||
echo $sql;
|
||||
echo "<br><br>";
|
||||
}
|
||||
echo $result;
|
||||
|
@ -144,8 +145,6 @@ if (isset($_GET["add_module"])){
|
|||
$result = "<h3 class=suc>".$lang_label["create_ok"]."</h3>";
|
||||
else {
|
||||
$result = "<h3 class=error>".$lang_label["create_no"]."</h3>";
|
||||
echo $sql;
|
||||
echo "<br><br>";
|
||||
}
|
||||
echo $result;
|
||||
}
|
||||
|
@ -157,6 +156,7 @@ if (isset($_POST["createmode"])){
|
|||
$map_background = entrada_limpia($_POST["map_background"]);
|
||||
$map_width = entrada_limpia($_POST["map_width"]);
|
||||
$map_height = entrada_limpia($_POST["map_height"]);
|
||||
|
||||
|
||||
// INSERT REPORT DATA
|
||||
if ($createmode == 1){
|
||||
|
@ -448,139 +448,150 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_map"]))) {
|
|||
echo "</form>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "<br></div>";
|
||||
|
||||
// Part 3 - List of already assigned report items
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
echo "<h2>".$lang_label["report_items"]."</h2>";
|
||||
echo "<table width=720 cellspacing=4 cellpadding=4 class='databox'>";
|
||||
echo "<tr><th>".$lang_label["type"]."</th>
|
||||
<th>".$lang_label["module_name"]."</th>
|
||||
<th>".$lang_label["label"]."</th>
|
||||
<th>".$lang_label["image"]."</th>
|
||||
<th>".$lang_label["pos_x"]."</th>
|
||||
<th>".$lang_label["pos_y"]."</th>
|
||||
<th>".$lang_label["width"]."</th>
|
||||
<th>".$lang_label["height"]."</th>
|
||||
<th>".$lang_label["delete"]."</th>
|
||||
<th>".$lang_label["update"]."</th>
|
||||
</tr>";
|
||||
$sql = "SELECT * FROM tlayout_data WHERE id_layout = $id_map";
|
||||
$res=mysql_query($sql);
|
||||
$color = 0;
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
// Calculate table line color
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
}
|
||||
else {
|
||||
$tdcolor = "datos2";
|
||||
$color = 1;
|
||||
}
|
||||
$id_layoutdata = $row["id"];
|
||||
$type = $row["type"];
|
||||
switch ($type){
|
||||
case "0": $type_desc = "Single graph"; break;
|
||||
case "1": $type_desc = "Module graph"; break;
|
||||
case "2": $type_desc = "Line"; break;
|
||||
}
|
||||
$id_element = $row["id"];
|
||||
$period = $row["period"];
|
||||
$id_am = $row["id_agente_modulo"];
|
||||
$x = $row["pos_x"];
|
||||
$y = $row["pos_y"];
|
||||
$myimage = $row["image"];
|
||||
$width= $row["width"];
|
||||
$height = $row["height"];
|
||||
$label = $row["label"];
|
||||
$name = "N/A";
|
||||
$agent_name = "N/A";
|
||||
if ($id_am != ""){
|
||||
$agent_name = dame_nombre_agente_agentemodulo ($id_am);
|
||||
$module_name = dame_nombre_modulo_agentemodulo ($id_am);
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<form method='POST' action='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map&update_module=$id_element'>";
|
||||
echo "<td class='$tdcolor'>".$type_desc."</td>";
|
||||
|
||||
echo "<td class='$tdcolor'>".$agent_name." / ";
|
||||
echo $module_name."</td>";
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='label' value='$label'></td>";
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo '<select name="image">';
|
||||
echo "<option>".$myimage;
|
||||
$ficheros = list_files('images/console/icons/', "",0, 0);
|
||||
$a=0;
|
||||
while (isset($ficheros[$a])){
|
||||
$myfichero = substr($ficheros[$a],0,strlen($ficheros[$a])-4);
|
||||
if ((strpos($myfichero,"_bad") == 0) && (strpos($myfichero,"_ok") == 0) && ($myfichero != "" ))
|
||||
echo "<option>".$myfichero."</option>";
|
||||
$a++;
|
||||
}
|
||||
echo '</select>';
|
||||
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name=pos_x value='$x'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name=pos_y value='$y'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='width' value='$width'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='height' value='$height'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map&delete=$id_layoutdata'><img src='images/cross.png'></a>";
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<input type=submit class='sub next' value='".$lang_label["update"]."'>";
|
||||
echo "</form>";
|
||||
}
|
||||
echo "</table>";
|
||||
if (mysql_num_rows($res)) {
|
||||
echo "<table width=720 cellspacing=4 cellpadding=4 class='databox'>";
|
||||
echo "<tr><th>".$lang_label["type"]."</th>
|
||||
<th>".$lang_label["module_name"]."</th>
|
||||
<th>".$lang_label["label"]."</th>
|
||||
<th>".$lang_label["image"]."</th>
|
||||
<th>".$lang_label["pos_x"]."</th>
|
||||
<th>".$lang_label["pos_y"]."</th>
|
||||
<th>".$lang_label["width"]."</th>
|
||||
<th>".$lang_label["height"]."</th>
|
||||
<th>".$lang_label["delete"]."</th>
|
||||
<th>".$lang_label["update"]."</th>
|
||||
</tr>";
|
||||
|
||||
$color = 0;
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
// Calculate table line color
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
}
|
||||
else {
|
||||
$tdcolor = "datos2";
|
||||
$color = 1;
|
||||
}
|
||||
$id_layoutdata = $row["id"];
|
||||
$type = $row["type"];
|
||||
switch ($type){
|
||||
case "0": $type_desc = "Single graph"; break;
|
||||
case "1": $type_desc = "Module graph"; break;
|
||||
case "2": $type_desc = "Line"; break;
|
||||
}
|
||||
$id_element = $row["id"];
|
||||
$period = $row["period"];
|
||||
$id_am = $row["id_agente_modulo"];
|
||||
$x = $row["pos_x"];
|
||||
$y = $row["pos_y"];
|
||||
$myimage = $row["image"];
|
||||
$width= $row["width"];
|
||||
$height = $row["height"];
|
||||
$label = $row["label"];
|
||||
$name = "N/A";
|
||||
$agent_name = "N/A";
|
||||
if ($id_am != ""){
|
||||
$agent_name = dame_nombre_agente_agentemodulo ($id_am);
|
||||
$module_name = dame_nombre_modulo_agentemodulo ($id_am);
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<form method='POST' action='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map&update_module=$id_element'>";
|
||||
echo "<td class='$tdcolor'>".$type_desc."</td>";
|
||||
|
||||
echo "<td class='$tdcolor'>".$agent_name." / ";
|
||||
echo $module_name."</td>";
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='label' value='$label'></td>";
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo '<select name="image">';
|
||||
echo "<option>".$myimage."</option>";
|
||||
$ficheros = list_files('images/console/icons/', "",0, 0);
|
||||
$a=0;
|
||||
while (isset($ficheros[$a])){
|
||||
$myfichero = substr($ficheros[$a],0,strlen($ficheros[$a])-4);
|
||||
if ((strpos($myfichero,"_bad") == 0) && (strpos($myfichero,"_ok") == 0) && ($myfichero != "" ))
|
||||
echo "<option>".$myfichero."</option>";
|
||||
$a++;
|
||||
}
|
||||
echo '</select></td>';
|
||||
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name=pos_x value='$x'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name=pos_y value='$y'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='width' value='$width'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<input type=text size=4 name='height' value='$height'></td>";
|
||||
echo "<td class='$tdcolor'>";
|
||||
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map&delete=$id_layoutdata'><img src='images/cross.png'></a>";
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<input type=submit class='sub next' value='".$lang_label["update"]."'>";
|
||||
echo "</form>";
|
||||
}
|
||||
echo "</table>";
|
||||
} else {
|
||||
echo "<div class='nf'>".$lang_label["no_repitem_def"]."</div>";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Map LIST Selection screen
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo "<h2>".$lang_label["reporting"]." > ";
|
||||
echo $lang_label["map_builder"]."</h2>";
|
||||
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox'>";
|
||||
echo "<tr>
|
||||
<th>".$lang_label["map_name"]."</th>
|
||||
<th>".$lang_label["background"]."</th>
|
||||
<th>".$lang_label["size"]."</th>
|
||||
<th>".$lang_label["Manage"]."</th>
|
||||
<th>".$lang_label["delete"]."</th>
|
||||
</tr>";
|
||||
|
||||
$color=1;
|
||||
$sql="SELECT * FROM tlayout";
|
||||
$res=mysql_query($sql);
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
if ((dame_admin($id_user)==1)){
|
||||
// Calculate table line color
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
|
||||
if (mysql_num_rows($res)) {
|
||||
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox'>";
|
||||
echo "<tr>
|
||||
<th>".$lang_label["map_name"]."</th>
|
||||
<th>".$lang_label["background"]."</th>
|
||||
<th>".$lang_label["size"]."</th>
|
||||
<th>".$lang_label["Manage"]."</th>
|
||||
<th>".$lang_label["delete"]."</th>
|
||||
</tr>";
|
||||
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
if ((dame_admin($id_user)==1)){
|
||||
// Calculate table line color
|
||||
if ($color == 1){
|
||||
$tdcolor = "datos";
|
||||
$color = 0;
|
||||
}
|
||||
else {
|
||||
$tdcolor = "datos2";
|
||||
$color = 1;
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["name"]."</td>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["background"]."</td>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["width"]."x".$row["height"]."</td>";
|
||||
$id_map = $row["id"];
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map'><img src='images/setup.png'></a></td>";
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&delete_map=$id_map'><img src='images/cross.png'></a></td></tr>";
|
||||
}
|
||||
else {
|
||||
$tdcolor = "datos2";
|
||||
$color = 1;
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["name"]."</td>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["background"]."</td>";
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["width"]."x".$row["height"]."</td>";
|
||||
$id_map = $row["id"];
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&id=$id_map'><img src='images/setup.png'></a>";
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/map_builder&delete_map=$id_map'><img src='images/cross.png'></a>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<table width=500 cellpadding=4 cellpadding=4>";
|
||||
} else {
|
||||
echo "<div class='nf'>".$lang_label["no_map_def"]."</div>";
|
||||
echo "<table>";
|
||||
}
|
||||
echo "</table>";
|
||||
echo "<table width=500 cellpadding=4 cellpadding=4>";
|
||||
echo "<form method=post action='index.php?sec=greporting&sec2=godmode/reporting/map_builder&create_map=1'>";
|
||||
echo "<tr><td align='right'>";
|
||||
echo "<input type=submit class='sub next' value='".$lang_label["add"]."'>";
|
||||
|
|
|
@ -48,9 +48,9 @@ if (isset($_GET["delete"])){
|
|||
$id_content = $_GET["delete"];
|
||||
$sql = "DELETE FROM treport_content WHERE id_rc = $id_content";
|
||||
if ($res=mysql_query($sql))
|
||||
$result = "<h3 class=suc>".$lang_label["delete_ok"]."</h3>";
|
||||
$result = "<h3 class='suc'>".$lang_label["delete_ok"]."</h3>";
|
||||
else
|
||||
$result = "<h3 class=error>".$lang_label["delete_no"]."</h3>";
|
||||
$result = "<h3 class='error'>".$lang_label["delete_no"]."</h3>";
|
||||
echo $result;
|
||||
}
|
||||
|
||||
|
@ -124,9 +124,9 @@ if (isset($_POST["createmode"])){
|
|||
$id_report = $form_id_report;
|
||||
$sql = "UPDATE treport SET name = '$form_report_name', description = '$form_report_description', private = '$form_report_private' WHERE id_report = $form_id_report";
|
||||
if ($res=mysql_query($sql))
|
||||
$result = "<h2 class=suc>".$lang_label["modify_ok"]."</h2>";
|
||||
$result = "<h3 class=suc>".$lang_label["modify_ok"]."</h3>";
|
||||
else
|
||||
$result = "<h2 class=error>".$lang_label["modify_no"]."</h2>";
|
||||
$result = "<h3 class=error>".$lang_label["modify_no"]."</h3>";
|
||||
}
|
||||
echo $result;
|
||||
if ($id_report != ""){
|
||||
|
@ -176,34 +176,35 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<table width=500 cellspacing=4 cellpading=4 class='databox_color'>";
|
||||
|
||||
echo "<tr><td class='datos2'>";
|
||||
echo $lang_label["report_name"];
|
||||
echo $lang_label["report_name"]."</td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo "<input type=text size=35 name='report_name' value='$form_report_name'>";
|
||||
|
||||
echo "<tr><td class='datos'>";
|
||||
echo $lang_label["private"];
|
||||
echo $lang_label["private"]."</td>";
|
||||
echo "<td class='datos'>";
|
||||
if ($form_report_private == 1)
|
||||
echo "<input type=checkbox name='report_private' value=1 CHECKED>";
|
||||
else
|
||||
echo "<input type=checkbox name='report_private' value=1>";
|
||||
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td class='datos2' valign='top'>";
|
||||
echo $lang_label["description"];
|
||||
echo $lang_label["description"]."</td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo "<textarea name='report_description' cols=40 rows=3>";
|
||||
echo $form_report_description;
|
||||
echo "</textarea>";
|
||||
|
||||
|
||||
// Button
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
|
||||
// Button
|
||||
echo "<table width=500 cellspacing=4 cellpading=4'>";
|
||||
echo "<tr><td align='right'>";
|
||||
if ($createmode == 0)
|
||||
echo "<input type='submit' class='sub next' value='".$lang_label["update"]."'>";
|
||||
else
|
||||
echo "<input type='submit' class='sub wand' value='".$lang_label["create"]."'>";
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
@ -221,8 +222,7 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<input type='hidden' name=id_report value='$id_report'>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td class='datos'><b>".$lang_label["source_agent"];
|
||||
echo "</b></td>";
|
||||
echo "<td class='datos'><b>".$lang_label["source_agent"]."</b></td>";
|
||||
echo "<td class='datos' colspan=2><select name='id_agent' style='width:180px;'>";
|
||||
if ($id_agent != 0)
|
||||
echo "<option value='$id_agent'>".dame_nombre_agente($id_agent);
|
||||
|
@ -247,6 +247,7 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
|
||||
echo "<tr><td class='datos2'>";
|
||||
echo "<b>".$lang_label["modules"]."</b>";
|
||||
echo "</td>";
|
||||
echo "<td class='datos2' colspan=3>";
|
||||
echo "<select name='id_module' size=1 style='width:180px;'>";
|
||||
echo "<option value=-1> -- </option>";
|
||||
|
@ -258,11 +259,11 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<option value=".$row["id_agente_modulo"].">".$row["nombre"]."</option>";
|
||||
}
|
||||
}
|
||||
echo "</select>";
|
||||
echo "</select></td></tr>";
|
||||
|
||||
// Component type
|
||||
echo "<tr><td class='datos'>";
|
||||
echo "<b>".$lang_label["reporting_type"]."</b>";
|
||||
echo "<b>".$lang_label["reporting_type"]."</b></td>";
|
||||
echo "<td class='datos' colspan=3>";
|
||||
echo "<select name='type' size=1 style='width:180px;'>";
|
||||
echo "<option value=0>".$lang_label["simple_graph"]."</option>";
|
||||
|
@ -274,25 +275,25 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<option value=6>".$lang_label["avg_value"]."</option>";
|
||||
echo "<option value=7>".$lang_label["max_value"]."</option>";
|
||||
echo "<option value=8>".$lang_label["min_value"]."</option>";
|
||||
echo "</select>";
|
||||
echo "</select></td></tr>";
|
||||
|
||||
// Custom graph
|
||||
// -----------------------
|
||||
echo "<tr><td class='datos2'>";
|
||||
echo "<b>".$lang_name["custom_graph_name"]."</b>";
|
||||
echo "<b>".$lang_name["custom_graph_name"]."</b></td>";
|
||||
echo "<td class='datos2' colspan=3>";
|
||||
echo "<select name='id_custom_graph' size=1 style='width:180px;'>";
|
||||
echo "<option value='-1'>".$row["N/A"];
|
||||
echo "<option value='-1'>".$row["N/A"]."</option>";
|
||||
$sql1="SELECT * FROM tgraph";
|
||||
$result = mysql_query($sql1);
|
||||
while ($row=mysql_fetch_array($result)){
|
||||
echo "<option value=".$row["id_graph"].">".$row["name"];
|
||||
echo "<option value=".$row["id_graph"].">".$row["name"]."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
// Period
|
||||
echo "<tr><td class='datos'>";
|
||||
echo "<b>".$lang_label["period"]."</b>";
|
||||
echo "<b>".$lang_label["period"]."</b></td>";
|
||||
echo "<td class='datos' colspan=3>";
|
||||
echo "<select name='period'>";
|
||||
echo "<option value=3600>"."Hour</option>";
|
||||
|
@ -307,7 +308,7 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<option value=2592000>"."Last Month</option>";
|
||||
echo "<option value=5184000>"."Two Month</option>";
|
||||
echo "<option value=15552000>"."Six Months</option>";
|
||||
echo "</select>";
|
||||
echo "</select></td></tr>";
|
||||
|
||||
// SLA Max
|
||||
echo "<tr><td class='datos2'>";
|
||||
|
@ -316,20 +317,21 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
echo "<input type=text size=6 name='sla_max'></td>";
|
||||
// SLA Min
|
||||
echo "<td class='datos2'>";
|
||||
echo "<b>".$lang_label["sla_min"]."</b>";
|
||||
echo "<b>".$lang_label["sla_min"]."</b></td>";
|
||||
echo "<td class='datos2'>";
|
||||
echo "<input type=text size=6 name='sla_min'></td>";
|
||||
|
||||
// SLA limit
|
||||
echo "<tr><td class='datos'>";
|
||||
echo "<b>".$lang_label["sla_limit"]."</b>";
|
||||
echo "<b>".$lang_label["sla_limit"]."</b></td>";
|
||||
echo "<td class='datos'>";
|
||||
echo "<input type='text' size='6' name='sla_limit'></td>";
|
||||
echo "</table>";
|
||||
echo "</tr></table>";
|
||||
|
||||
echo "<table width='500' cellspacing='4' cellpading='4'>";
|
||||
echo "<tr><td align='right'>";
|
||||
echo "<input type='submit' class='sub wand' value='".$lang_label["add"]."'>";
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
|
@ -380,15 +382,16 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
$module_name = dame_nombre_modulo_agentemodulo ($id_am);
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<td class='$tdcolor'>".$type_desc;
|
||||
echo "<td class='$tdcolor'>".$agent_name;
|
||||
echo "<td class='$tdcolor'>".$module_name;
|
||||
echo "<td class='$tdcolor'>".$period;
|
||||
echo "<td class='$tdcolor'>".$type_desc."</td>";
|
||||
echo "<td class='$tdcolor'>".$agent_name."</td>";
|
||||
echo "<td class='$tdcolor'>".$module_name."</td>";
|
||||
echo "<td class='$tdcolor'>".$period."</td>";
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
if ($form_id_user == $id_user){
|
||||
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&id=1&delete=$id_rc'><img src='images/cross.png'></a>";
|
||||
}
|
||||
}
|
||||
echo "</td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
} else {
|
||||
|
@ -398,15 +401,17 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo "<h2>".$lang_label["reporting"]." > ";
|
||||
echo $lang_label["custom_reporting"]."</h2>";
|
||||
|
||||
$sql="SELECT * FROM treport";
|
||||
$res=mysql_query($sql);
|
||||
if (mysql_num_rows($res)) {
|
||||
echo "<table width='600' cellpadding=4 cellpadding=4 class='databox'>";
|
||||
echo "<tr>
|
||||
<th>".$lang_label["report_name"]."</th>
|
||||
<th>".$lang_label["description"]."</th>
|
||||
<th>".$lang_label["Manage"]."</th>
|
||||
<th>".$lang_label["delete"]."</th>";
|
||||
$color=1;
|
||||
$sql="SELECT * FROM treport";
|
||||
$res=mysql_query($sql);
|
||||
$color=1;
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
if (($row["private"]==0) || ($row["id_user"] == $id_user)){
|
||||
// Calculate table line color
|
||||
|
@ -432,6 +437,10 @@ if ($createmode==2 OR isset($_GET["id"]) OR (isset($_POST["id_report"]))) {
|
|||
}
|
||||
echo "</table>";
|
||||
echo "<table width=600 cellpadding=4 cellpadding=4>";
|
||||
} else {
|
||||
echo "<div class='nf'>".$lang_label["no_reporting_def"]."</div>";
|
||||
echo "<table>";
|
||||
}
|
||||
echo "<form method=post action='index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&create_report=1'>";
|
||||
echo "<tr><td align='right'>";
|
||||
echo "<input type=submit class='sub next' value='".$lang_label["add"]."'>";
|
||||
|
|
|
@ -876,6 +876,11 @@ $lang_label["map_item_add"] = "Add map item";
|
|||
$lang_label["graph_event_total"] = "Event graph";
|
||||
$lang_label["graph_event_group"] = "Event graph by group";
|
||||
$lang_label["graph_event_user"] = "Event graph by user";
|
||||
$lang_label["no_layout_def"] = "There are no defined layouts";
|
||||
$lang_label["no_reporting_def"] = "There are no defined reportings";
|
||||
$lang_label["no_map_def"] = "There are no defined maps";
|
||||
$lang_label["no_repitem_def"] = "There are no defined report items";
|
||||
|
||||
global $lang_label;
|
||||
global $help_label;
|
||||
?>
|
||||
|
|
|
@ -27,12 +27,20 @@ if (comprueba_login() != 0) {
|
|||
exit;
|
||||
}
|
||||
|
||||
echo "<h2>".$lang_label["visual_console"]."</h2>";
|
||||
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox_frame'>";
|
||||
echo "<tr><th>".$lang_label["name"]."<th>".$lang_label["group"]."<th>".$lang_label["elements"]."<th>".$lang_label["view"];
|
||||
$color=1;
|
||||
echo "<h2>".$lang_label["visual_console"]." > ";
|
||||
echo $lang_label["summary"]."</h2>";
|
||||
$sql="SELECT * FROM tlayout";
|
||||
if ($res=mysql_query($sql))
|
||||
$res=mysql_query($sql);
|
||||
|
||||
if (mysql_num_rows($res)) {
|
||||
|
||||
echo "<table width='500' cellpadding=4 cellpadding=4 class='databox_frame'>";
|
||||
echo "<tr>
|
||||
<th>".$lang_label["name"]."</th>
|
||||
<th>".$lang_label["group"]."</th>
|
||||
<th>".$lang_label["elements"]."</th>
|
||||
<th>".$lang_label["view"]."</th>";
|
||||
$color=1;
|
||||
while ($row = mysql_fetch_array($res)){
|
||||
// Calculate table line color
|
||||
if ($color == 1){
|
||||
|
@ -45,22 +53,21 @@ if ($res=mysql_query($sql))
|
|||
}
|
||||
echo "<tr>";
|
||||
// Name
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["name"];
|
||||
echo "<td valign='top' class='$tdcolor'>".$row["name"]."</td>";
|
||||
$id_layout = $row["id"];
|
||||
// Group
|
||||
echo "<td valign='top' align='center' class='$tdcolor'><img src='images/".dame_grupo_icono($row["id_group"]).".png'>";
|
||||
echo "<td valign='top' align='center' class='$tdcolor'><img src='images/".dame_grupo_icono($row["id_group"]).".png'></td>";
|
||||
// # elements
|
||||
$sql2="SELECT COUNT(*) FROM tlayout_data WHERE id_layout = $id_layout";
|
||||
$res2=mysql_query($sql2);
|
||||
$row2 = mysql_fetch_array($res2);
|
||||
echo "<td valign='top'align='center' class='$tdcolor'>".$row2[0];
|
||||
echo "<td valign='top'align='center' class='$tdcolor'>".$row2[0]."</td>";
|
||||
// View icon
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$id_layout'><img src='images/images.png'></A>";
|
||||
echo "<td valign='middle' class='$tdcolor' align='center'><a href='index.php?sec=visualc&sec2=operation/visual_console/render_view&id=$id_layout'><img src='images/images.png'></a></td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo "</table>";
|
||||
} else {
|
||||
echo "<div class='nf'>".$lang_label["no_layout_def"]."</div>";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -55,7 +55,7 @@ UNLOCK TABLES;
|
|||
|
||||
/*!40000 ALTER TABLE `tlanguage` DISABLE KEYS */;
|
||||
LOCK TABLES `tlanguage` WRITE;
|
||||
INSERT INTO `tlanguage` VALUES ('bb','Bable'),('ca','Català'),('de','German'),('en','English'),('es','Español'),('es_gl','Gallego'),('es_la','Español-Latinoamérica'),('eu','Euskera'),('fr','Français'),('pt_br','Portuguese-Brazil');
|
||||
INSERT INTO `tlanguage` VALUES ('bb','Bable'),('ca','Català'),('de','Deutch'),('en','English'),('es_es','Español'),('es_gl','Gallego'),('es_la','Español-Latinoamérica'),('eu','Euskera'),('fr','Français'),('pt_br','Portuguese-Brazil');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `tlanguage` ENABLE KEYS */;
|
||||
|
||||
|
|
Loading…
Reference in New Issue