Exemplo n.º 1
0
                    break;
                case 1:
                    echo $td3 . "<a href='{$hrefBase}&actgrp=0'>" . $l->g(818) . "</a></td>";
                    break;
                case 2:
                    echo $td3 . "<a href='{$hrefBase}&actgrp=1'>" . $l->g(598) . "</a>&nbsp; &nbsp; &nbsp;<a href='{$hrefBase}&actgrp=0'>" . $l->g(41) . "</a></td>";
                    break;
            }
        }
        echo "</td>";
        echo "</tr>";
    }
}
echo "<tr><td colspan=100></td></tr>";
//TELEDEPLOY
show_packages($systemid);
$hrefBase = "index.php?" . PAG_INDEX . "=" . $pages_refs['ms_computer'] . "&head=1&systemid=" . urlencode($systemid) . "&option=cd_configuration";
echo "<tr><td colspan='10' align='right'>";
if ($_SESSION['OCS']['CONFIGURATION']['TELEDIFF'] == "YES") {
    echo "<a href=# Onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_custom_pack'] . "&head=1&idchecked=" . $systemid . "&origine=mach\",\"rollo\",\"location=0,status=0,scrollbars=1,menubar=0,resizable=0,width=800,height=500\");>" . $l->g(501) . "</a> ";
}
$reqGroups = "SELECT h.name,h.id,h.workgroup \n\t\t\t\t\t  FROM hardware h,groups g \n\t\t\t\t\t  WHERE  g.hardware_id=h.id  and h.deviceid='_SYSTEMGROUP_'";
if (!($_SESSION['OCS']['CONFIGURATION']['GROUPS'] == "YES")) {
    $reqGroups .= " and workgroup = 'GROUP_4_ALL'";
}
$reqGroups .= " order by h.name";
$resGroups = mysql2_query_secure($reqGroups, $_SESSION['OCS']["readServer"]);
$first = true;
while ($valGroups = mysql_fetch_array($resGroups)) {
    if ($first) {
        echo $l->g(386) . " <a href=# OnClick=window.location='{$hrefBase}&actgrp=1&grp='+document.getElementById(\"groupcombo\").options[document.getElementById(\"groupcombo\").selectedIndex].value>" . $l->g(589) . "</a>";
Exemplo n.º 2
0
function print_perso($systemid)
{
    global $l, $td1, $td2, $td3, $td4, $pages_refs, $protectedGet;
    $i = 0;
    $queryDetails = "SELECT * FROM devices WHERE hardware_id={$systemid}";
    $resultDetails = mysql_query($queryDetails, $_SESSION['OCS']["readServer"]) or die(mysql_error($_SESSION['OCS']["readServer"]));
    $form_name = 'config_group';
    echo open_form($form_name);
    echo "<table BORDER='0' WIDTH = '95%' ALIGN = 'Center' CELLPADDING='0' BGCOLOR='#C7D9F5' BORDERCOLOR='#9894B5'>";
    //echo "<tr><td>&nbsp;&nbsp;</td> $td1 "."Libell�"." </td> $td1 "."Valeur"." </td><td>&nbsp;</td></tr>";
    while ($item = mysql_fetch_array($resultDetails, MYSQL_ASSOC)) {
        $optPerso[$item["NAME"]]["IVALUE"] = $item["IVALUE"];
        $optPerso[$item["NAME"]]["TVALUE"] = $item["TVALUE"];
    }
    $ii++;
    $td3 = $ii % 2 == 0 ? $td2 : $td4;
    //IPDISCOVER
    echo "<tr><td bgcolor='white' align='center' valign='center'>" . (isset($optPerso["IPDISCOVER"]) && $optPerso["IPDISCOVER"]["IVALUE"] != 1 ? "<img width='15px' src='image/red.png'>" : "&nbsp;") . "</td>&nbsp;</td>";
    echo $td3 . $l->g(489) . "</td>";
    if (isset($optPerso["IPDISCOVER"])) {
        if ($optPerso["IPDISCOVER"]["IVALUE"] == 0) {
            echo $td3 . $l->g(490) . "</td>";
        } else {
            if ($optPerso["IPDISCOVER"]["IVALUE"] == 2) {
                echo $td3 . $l->g(491) . " " . $optPerso["IPDISCOVER"]["TVALUE"] . "</td>";
            } else {
                if ($optPerso["IPDISCOVER"]["IVALUE"] == 1) {
                    echo $td3 . $l->g(492) . " " . $optPerso["IPDISCOVER"]["TVALUE"] . "</td>";
                }
            }
        }
    } else {
        echo $td3 . $l->g(493) . "</td>";
    }
    if ($_SESSION['OCS']['CONFIGURATION']['CONFIG'] == "YES") {
        echo "<td align=center rowspan=8><a href=# Onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_custom_param'] . "&head=1&idchecked=" . $systemid . "&origine=group\",\"rollo\",\"location=0,status=0,scrollbars=1,menubar=0,resizable=0,width=800,height=500\");>\n\t\t<img src='image/modif_a.png' title='" . $l->g(285) . "'></a></td></tr>";
    }
    $ii++;
    $td3 = $ii % 2 == 0 ? $td2 : $td4;
    $field_name = array('DOWNLOAD', 'DOWNLOAD_CYCLE_LATENCY', 'DOWNLOAD_PERIOD_LENGTH', 'DOWNLOAD_FRAG_LATENCY', 'DOWNLOAD_PERIOD_LATENCY', 'DOWNLOAD_TIMEOUT', 'PROLOG_FREQ', 'SNMP');
    $optdefault = look_config_default_values($field_name);
    //FREQUENCY
    echo "<tr><td bgcolor='white' align='center' valign='center'>" . (isset($optPerso["FREQUENCY"]) ? "<img width='15px' src='image/red.png'>" : "&nbsp;") . "</td>";
    echo $td3 . $l->g(494) . "</td>";
    if (isset($optPerso["FREQUENCY"])) {
        if ($optPerso["FREQUENCY"]["IVALUE"] == 0) {
            echo $td3 . $l->g(485) . "</td>";
        } else {
            if ($optPerso["FREQUENCY"]["IVALUE"] == -1) {
                echo $td3 . $l->g(486) . "</td>";
            } else {
                echo $td3 . $l->g(495) . " " . $optPerso["FREQUENCY"]["IVALUE"] . " " . $l->g(496) . "</td>";
            }
        }
    } else {
        echo $td3 . $l->g(497) . "</td>";
    }
    echo "</tr>";
    //DOWNLOAD_SWITCH
    echo "<tr><td bgcolor='white' align='center' valign='center'>" . (isset($optPerso["DOWNLOAD_SWITCH"]) ? "<img width='15px' src='image/red.png'>" : "&nbsp;") . "</td>";
    echo $td3 . $l->g(417) . " <font color=green size=1><i>DOWNLOAD</i></font> </td>";
    if (isset($optPerso["DOWNLOAD_SWITCH"])) {
        if ($optPerso["DOWNLOAD_SWITCH"]["IVALUE"] == 0) {
            echo $td3 . $l->g(733) . "</td>";
        } else {
            if ($optPerso["DOWNLOAD_SWITCH"]["IVALUE"] == 1) {
                echo $td3 . $l->g(205) . "</td>";
            } else {
                echo $td3 . "</td>";
            }
        }
    } else {
        echo $td3 . $l->g(488) . "(";
        if ($optdefault['ivalue']["DOWNLOAD"] == 1) {
            echo $l->g(205);
        } else {
            echo $l->g(733);
        }
        echo ")</td>";
    }
    echo "</tr>";
    //DOWNLOAD_CYCLE_LATENCY
    optperso("DOWNLOAD_CYCLE_LATENCY", $l->g(720) . " <font color=green size=1><i>DOWNLOAD_CYCLE_LATENCY</i></font>", $optPerso, 1, $optdefault['ivalue']["DOWNLOAD_CYCLE_LATENCY"], $l->g(511));
    //DOWNLOAD_FRAG_LATENCY
    optperso("DOWNLOAD_FRAG_LATENCY", $l->g(721) . " <font color=green size=1><i>DOWNLOAD_FRAG_LATENCY</i></font>", $optPerso, 1, $optdefault['ivalue']["DOWNLOAD_FRAG_LATENCY"], $l->g(511));
    //DOWNLOAD_PERIOD_LATENCY
    optperso("DOWNLOAD_PERIOD_LATENCY", $l->g(722) . " <font color=green size=1><i>DOWNLOAD_PERIOD_LATENCY</i></font>", $optPerso, 1, $optdefault['ivalue']["DOWNLOAD_PERIOD_LATENCY"], $l->g(511));
    //DOWNLOAD_PERIOD_LENGTH
    optperso("DOWNLOAD_PERIOD_LENGTH", $l->g(723) . " <font color=green size=1><i>DOWNLOAD_PERIOD_LENGTH</i></font>", $optPerso, 1, $optdefault['ivalue']["DOWNLOAD_PERIOD_LENGTH"]);
    //PROLOG_FREQ
    optperso("PROLOG_FREQ", $l->g(724) . " <font color=green size=1><i>PROLOG_FREQ</i></font>", $optPerso, 1, $optdefault['ivalue']["PROLOG_FREQ"], $l->g(730));
    //SNMP_SWITCH
    echo "<tr><td bgcolor='white' align='center' valign='center'>" . (isset($optPerso["SNMP_SWITCH"]) ? "<img width='15px' src='image/red.png'>" : "&nbsp;") . "</td>";
    echo $td3 . $l->g(1197) . " <font color=green size=1><i>SNMP_SWITCH</i></font></td>";
    if (isset($optPerso["SNMP_SWITCH"])) {
        if ($optPerso["SNMP_SWITCH"]["IVALUE"] == 0) {
            echo $td3 . $l->g(733) . "</td>";
        } else {
            if ($optPerso["SNMP_SWITCH"]["IVALUE"] == 1) {
                echo $td3 . $l->g(205) . "</td>";
            } else {
                echo $td3 . "</td>";
            }
        }
    } else {
        echo $td3 . $l->g(488) . "(";
        if ($optdefault['ivalue']["SNMP"] == 1) {
            echo $l->g(205);
        } else {
            echo $l->g(733);
        }
        echo ")</td>";
    }
    echo "</tr>";
    //TELEDEPLOY
    require_once 'require/function_machine.php';
    show_packages($systemid, "ms_group_show");
    if ($_SESSION['OCS']['CONFIGURATION']['TELEDIFF'] == "YES") {
        echo "<tr>\n\t\t<td colspan='10' align='right'>\n\t\t<a href=# Onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_custom_pack'] . "&head=1&idchecked=" . $systemid . "&origine=group\",\"rollo\",\"location=0,status=0,scrollbars=1,menubar=0,resizable=0,width=800,height=500\");>" . $l->g(501) . "\n\t\t</a>\n\t\t</td></tr>";
    }
    echo "</table><br>";
    echo close_form();
}