• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP look_config_default_values函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: exec_plugin_soap_client

/**
 * @param unknown $name : PluginName
 * @param unknown $action : Possible actions => delete (0) and install (1)
 */
function exec_plugin_soap_client($name, $action)
{
    $champs = array('OCS_SERVER_ADDRESS' => 'OCS_SERVER_ADDRESS');
    $values = look_config_default_values($champs);
    $address = $values['tvalue']['OCS_SERVER_ADDRESS'];
    ini_set("safe_mode", "0");
    $command = "perl " . MAIN_SECTIONS_DIR . "ms_plugins/client.pl " . $address . " " . $name . " " . $action;
    exec($command);
    ini_set("safe_mode", "1");
}
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:14,代码来源:functions_webservices.php


示例2: plugin_soap_client

function plugin_soap_client($name, $action)
{
    $champs = array('OCS_SERVER_ADDRESS' => 'OCS_SERVER_ADDRESS');
    $values = look_config_default_values($champs);
    $address = $values['tvalue']['OCS_SERVER_ADDRESS'];
    if ($action == 1) {
        $method = "InstallPlugins";
    } else {
        $method = "DeletePlugins";
    }
    $client = new SoapClient(null, array('location' => "http://{$address}/ocsplugins", 'uri' => "http://{$address}/Apache/Ocsinventory/Plugins/Modules"));
    $request = "<?xml version=\"1.0\" encoding=\"utf-8\" ?> \n\t\t<soap:Envelope \n    \t\tsoap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'\n    \t\txmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' \n \t\t\txmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'\n    \t\txmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \n    \t\txmlns:xsd='http://www.w3.org/2001/XMLSchema'>\n \t\t<soap:Body>\n\t\t\t<{$method} xmlns='http://{$address}/Apache/Ocsinventory/Plugins/Modules'><c-gensym3 xsi:type='xsd:string'>{$name}</c-gensym3></{$method}>\n\t\t</soap:Body>\n\t\t</soap:Envelope>";
    $output = $client->__doRequest($request, "http://{$address}/ocsplugins", "http://{$address}/Apache/Ocsinventory/Plugins/Modules#{$method}", "1.1");
}
开发者ID:stweil,项目名称:OCSInventory-ocsreports,代码行数:14,代码来源:functions_webservices.php


示例3: pacquet

 private function pacquet($Mac)
 {
     $packet = "";
     $macAddr = '';
     $addrByte = explode(':', $Mac);
     foreach ($addrByte as $v) {
         $macAddr .= chr(hexdec($v));
     }
     for ($i = 0; $i < 6; $i++) {
         $packet .= chr(0xff);
     }
     for ($j = 0; $j < 16; $j++) {
         $packet .= $macAddr;
     }
     //use bios password?
     $wol_info = look_config_default_values('WOL_BIOS_PASSWD');
     if (isset($wol_info['name']['WOL_BIOS_PASSWD'])) {
         $packet .= $wol_info['tvalue']['WOL_BIOS_PASSWD'];
     }
     return $packet;
 }
开发者ID:inkoss,项目名称:karoshi-server,代码行数:21,代码来源:function_wol.php


示例4: verif

echo "<input type='hidden' name='document_root' value='" . $protectedPost['document_root'] . "'>\t  \n\t <input type='hidden' id='timestamp' name='timestamp' value='" . $protectedPost['timestamp'] . "'>";
echo "<script language='javascript'>\n\t\tfunction verif()\n\t\t {\n\t\t\tvar msg = '';\n\t\t\tchamps = new Array('NAME','DESCRIPTION','OS','PROTOCOLE','PRIORITY','ACTION','ACTION_INPUT','REDISTRIB_USE');\n\t\t\tchamps_OS = new Array('NOTIFY_USER','NEED_DONE_ACTION');\n\t\t\tchamps_ACTION=new Array('teledeploy_file');\n\t\t\tchamps_REDISTRIB_USE=new Array('REDISTRIB_PRIORITY');\n\t\t\tchamps_NOTIFY_USER=new Array('NOTIFY_TEXT','NOTIFY_COUNTDOWN','NOTIFY_CAN_ABORT','NOTIFY_CAN_DELAY');\n\t\t\tchamps_NEED_DONE_ACTION=new Array('NEED_DONE_ACTION_TEXT');\n\t\t\t\n\n\n\t\t\n\t\t\tfor (var n = 0; n < champs.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById(champs[n]).value == ''){\n\t\t\t\t document.getElementById(champs[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_OS.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('OS').value == 'WINDOWS' && document.getElementById(champs_OS[n]).value == ''){\n\t\t\t\t document.getElementById(champs_OS[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_OS[n]).style.backgroundColor = '';\n\t\t\t}\n\t\t\tfor (var n = 0; n < champs_ACTION.length; n++)\n\t\t\t{\n\t\t\t\tvar name_file=document.getElementById(champs_ACTION[n]).value;\n\t\t\t\tname_file=name_file.toUpperCase();\n\t\t\t\tif (document.getElementById(\"OS\").value == 'WINDOWS')\n\t\t\t\t\tvar debut=name_file.length-3;\n\t\t\t\telse\n\t\t\t\t\tvar debut=name_file.length-6;\n\t\t\t\tif (document.getElementById('ACTION').value != 'EXECUTE' && document.getElementById(champs_ACTION[n]).value == ''){\n\t\t\t\t\talert('" . $l->g(602) . "');\n\t\t\t\t \tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t \tmsg='NULL';\n\t\t\t\t }\n\t\t\t\telse if (document.getElementById('ACTION').value != 'EXECUTE' && name_file.substring(debut,name_file.length) != 'ZIP' && document.getElementById(\"OS\").value == 'WINDOWS'){\n\t\t\t\t\talert('" . $l->g(1231) . "');\n\t\t\t\t\tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t\tmsg='NULL';\n\t\t\t\t}else if (document.getElementById('ACTION').value != 'EXECUTE' && name_file.substring(debut,name_file.length) != 'TAR.GZ' && document.getElementById(\"OS\").value != 'WINDOWS'){\n\t\t\t\t\talert('" . $l->g(1232) . "');\n\t\t\t\t\tdocument.getElementById(champs_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t\tmsg='NULL';\n\t\t\t\t}\n\t\t\t\t document.getElementById(champs_ACTION[n]).style.backgroundColor = '';\n\n\t\t\t}\n\t\t\t\n\t\t\tfor (var n = 0; n < champs_REDISTRIB_USE.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('REDISTRIB_USE').value == 1 && document.getElementById(champs_REDISTRIB_USE[n]).value == ''){\n\t\t\t\t document.getElementById(champs_REDISTRIB_USE[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_REDISTRIB_USE[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_NOTIFY_USER.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('NOTIFY_USER').value == 1 && document.getElementById(champs_NOTIFY_USER[n]).value == ''){\n\t\t\t\t document.getElementById(champs_NOTIFY_USER[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_NOTIFY_USER[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tfor (var n = 0; n < champs_NEED_DONE_ACTION.length; n++)\n\t\t\t{\n\t\t\t\tif (document.getElementById('NEED_DONE_ACTION').value == 1 && document.getElementById(champs_NEED_DONE_ACTION[n]).value == ''){\n\t\t\t\t document.getElementById(champs_NEED_DONE_ACTION[n]).style.backgroundColor = 'RED';\n\t\t\t\t msg='NULL';\n\t\t\t\t }\n\t\t\t\telse\n\t\t\t\t document.getElementById(champs_NEED_DONE_ACTION[n]).style.backgroundColor = '';\n\t\t\t}\n\n\t\t\tif (msg != ''){\n\t\t\talert ('" . $l->g(1001) . "');\n\t\t\treturn false;\n\t\t\t}else\n\t\t\treturn true;\t\t\t\n\t\t}\n\t</script>";
echo "<div ";
if ($protectedPost['valid']) {
    echo " style='display:none;'";
}
echo ">";
printEnTete($l->g(434));
echo "<br>";
$activate = option_conf_activate('TELEDIFF_WK');
//If workflow for teledeploy is activated
//We show only the package we can create
if ($activate) {
    msg_info($l->g(1105) . "<br>" . $l->g(1106) . "<br>" . $l->g(1107));
    //get all request with the status "Create a Package"
    $conf_creat_Wk = look_config_default_values(array('IT_SET_NIV_CREAT'));
    $info_dde_statut_creat = info_dde(find_dde_by_status($conf_creat_Wk['tvalue']['IT_SET_NIV_CREAT']));
    if ($info_dde_statut_creat != '') {
        $array_id_fields = find_id_field(array('NAME_TELEDEPLOY', 'PRIORITY', 'NOTIF_USER', 'REPORT_USER', 'INFO_PACK'));
        //build the seach
        $id_name = "fields_" . $array_id_fields['NAME_TELEDEPLOY']->id;
        $id_description = "fields_" . $array_id_fields['INFO_PACK']->id;
        $id_priority = "fields_" . $array_id_fields['PRIORITY']->id;
        $id_notify_user = "fields_" . $array_id_fields['NOTIF_USER']->id;
        foreach ($info_dde_statut_creat as $id => $tab_value) {
            $list_dde_creat[$tab_value->ID] = $tab_value->{$id_name};
        }
        echo "<br><b>" . $l->g(1183) . ":</b>" . show_modif($list_dde_creat, 'LIST_DDE_CREAT', 2, $form_name);
        if (!$protectedPost['LIST_DDE_CREAT'] or $protectedPost['LIST_DDE_CREAT'] == "") {
            echo close_form();
            require_once FOOTER_HTML;
开发者ID:inkoss,项目名称:karoshi-server,代码行数:31,代码来源:ms_tele_package.php


示例5: add_mach

function add_mach($id_group, $list_mach)
{
    $default_values = look_config_default_values(array('DOWNLOAD_SERVER_URI', 'DOWNLOAD_SERVER_DOCROOT'));
    if (is_array($list_mach)) {
        foreach ($list_mach as $key => $value) {
            $reqCache = "INSERT IGNORE INTO download_servers(hardware_id, url, add_rep,GROUP_ID) \n\t\t\t\t\t\tVALUES (%s,'%s','%s',%s)";
            $argcache = array($value, $default_values['tvalue']['DOWNLOAD_SERVER_URI'], $default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT'], $id_group);
            $cachedRes = mysql2_query_secure($reqCache, $_SESSION['OCS']["writeServer"], $argcache);
        }
    } else {
        $reqCache = "INSERT IGNORE INTO download_servers(hardware_id, url, add_rep,GROUP_ID) \n\t\t\t\t\t\tselect id,'%s','%s',%s\n\t\t\t\t\t    from hardware where id in ";
        $argCache = array($default_values['tvalue']['DOWNLOAD_SERVER_URI'], $default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT'], $id_group);
        $arg = mysql2_prepare($reqCache, $argCache, $list_mach);
        $cachedRes = mysql2_query_secure($arg['SQL'], $_SESSION['OCS']["writeServer"], $arg['ARG']);
    }
    return mysql_affected_rows($_SESSION['OCS']["writeServer"]);
}
开发者ID:inkoss,项目名称:karoshi-server,代码行数:17,代码来源:function_server.php


示例6: open_form

require_once 'require/function_telediff.php';
require_once 'require/function_search.php';
require_once 'require/function_telediff_wk.php';
//p($protectedPost);
$form_name = "pack_affect";
$table_name = "LIST_PACK_SEARCH";
echo open_form($form_name);
$list_id = multi_lot($form_name, $l->g(601));
//TELEDIFF_WK
$activate = option_conf_activate('TELEDIFF_WK');
//use teledeploy workflow?
if ($activate) {
    //yes
    $msg_wk = $l->g(1105) . "<br>" . $l->g(1110) . "<br>";
    //find all config of workflow
    $conf_Wk = look_config_default_values(array('IT_SET_PERIM', 'IT_SET_NAME_TEST', 'IT_SET_NAME_LIMIT', 'IT_SET_TAG_NAME', 'IT_SET_NIV_TEST', 'IT_SET_NIV_REST', 'IT_SET_NIV_TOTAL'));
    //find id field of status
    $sql_status = "select ID from downloadwk_fields where FIELD='STATUS'";
    $res_status = mysql2_query_secure($sql_status, $_SESSION['OCS']["readServer"]);
    $val_status = mysql_fetch_array($res_status);
    //find distinct id of status to affect a package
    $sql_id_stat = "select NAME,ID from downloadwk_statut_request where NAME= '%s' or NAME='%s' or NAME = '%s'";
    $arg_id_stat = array($conf_Wk['tvalue']['IT_SET_NIV_TEST'], $conf_Wk['tvalue']['IT_SET_NIV_REST'], $conf_Wk['tvalue']['IT_SET_NIV_TOTAL']);
    $res_id_stat = mysql2_query_secure($sql_id_stat, $_SESSION['OCS']["readServer"], $arg_id_stat);
    while ($val_id_stat = mysql_fetch_array($res_id_stat)) {
        $id_stat[$val_id_stat['NAME']] = $val_id_stat['ID'];
    }
    //find all package can be affected TEST status
    $sql_affect_pack = "select fileid from download_available d_a \n\t\t\t\t\t\t\t\t\t\tleft join downloadwk_pack dwk_p\ton d_a.id_wk=dwk_p.id \n\t\t\t\t\t\t\t\t\t\tleft join downloadwk_statut_request dwk_stat on dwk_stat.id=dwk_p.fields_" . $val_status['ID'] . "\n\t\t\t\t\t\t\t\t\t\twhere d_a.id_wk = 0 or dwk_stat.name = '%s'";
    $res_affect_pack = mysql2_query_secure($sql_affect_pack, $_SESSION['OCS']["readServer"], $conf_Wk['tvalue']['IT_SET_NIV_TEST']);
    while ($val_affect_pack = mysql_fetch_array($res_affect_pack)) {
开发者ID:inkoss,项目名称:karoshi-server,代码行数:31,代码来源:ms_custom_pack.php


示例7: array

if (!isset($_SESSION['OCS']["usecache"]) or !isset($_SESSION['OCS']["tabcache"])) {
    $conf_gui = array('usecache' => 'INVENTORY_CACHE_ENABLED', 'tabcache' => 'TAB_CACHE', 'USE_NEW_SOFT_TABLES' => 'USE_NEW_SOFT_TABLES');
    $default_value_conf = array('INVENTORY_CACHE_ENABLED' => 1, 'TAB_CACHE' => 0, 'USE_NEW_SOFT_TABLES' => 0);
    $values = look_config_default_values($conf_gui);
    foreach ($conf_gui as $k => $v) {
        if (isset($values['ivalue'][$v])) {
            $_SESSION['OCS'][$k] = $values['ivalue'][$v];
        } else {
            $_SESSION['OCS'][$k] = $default_value_conf[$v];
        }
    }
}
/********************END GESTION CACHE******************/
/********************MANAGE DOWNLOAD REDISTRIBUTION******************/
if (!isset($_SESSION['OCS']["use_redistribution"])) {
    $values = look_config_default_values(array('DOWNLOAD_REDISTRIB'));
    $_SESSION['OCS']['use_redistribution'] = $values['ivalue']['DOWNLOAD_REDISTRIB'];
    if (!isset($_SESSION['OCS']["use_redistribution"])) {
        $_SESSION['OCS']["use_redistribution"] = 1;
    }
}
/********************END DOWNLOAD REDISTRIBUTION******************/
/*********************************************GESTION OF LBL_TAG*************************************/
if (!isset($_SESSION['OCS']['TAG_LBL'])) {
    require_once 'require/function_admininfo.php';
    $all_tag_lbl = witch_field_more('COMPUTERS');
    foreach ($all_tag_lbl['LIST_NAME'] as $key => $value) {
        $_SESSION['OCS']['TAG_LBL'][$value] = $all_tag_lbl['LIST_FIELDS'][$key];
        $_SESSION['OCS']['TAG_ID'][$key] = $value;
    }
}
开发者ID:stweil,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:header.php


示例8: print_perso

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>";
//.........这里部分代码省略.........
开发者ID:inkoss,项目名称:karoshi-server,代码行数:101,代码来源:ms_group_show.php


示例9: show_modif

    }
}
if (!$protectedPost['SHOW_SELECT']) {
    $protectedPost['SHOW_SELECT'] = 'download';
    $tab_options['SHOW_SELECT'] = 'download';
}
echo "<BR>" . show_modif(array('download' => $l->g(990), 'server' => $l->g(991)), 'SHOW_SELECT', 2, $form_name) . "<BR><BR>";
//only for profils who can activate packet
if (!$cant_active) {
    //where packets are created?
    if ($protectedPost['SHOW_SELECT'] == 'download') {
        $config_document_root = "DOWNLOAD_PACK_DIR";
    } else {
        $config_document_root = "DOWNLOAD_REP_CREAT";
    }
    $info_document_root = look_config_default_values($config_document_root);
    $document_root = $info_document_root["tvalue"][$config_document_root];
    //if no directory in base, take $_SERVER["DOCUMENT_ROOT"]
    if (!isset($document_root)) {
        $document_root = VARLIB_DIR . '/download';
        if ($protectedPost['SHOW_SELECT'] == "server") {
            $document_root .= "server/";
        }
    } else {
        //can we have the zip?
        $document_root .= "/download";
    }
    if (is_readable($document_root) && is_dir($document_root)) {
        $dir = @opendir($document_root);
        while ($f = readdir($dir)) {
            if (is_numeric($f)) {
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:ms_tele_activate.php


示例10: find_limit_values

function find_limit_values()
{
    $arg = look_config_default_values('GUI_REPORT_%', 1);
    return $arg['ivalue'];
}
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:5,代码来源:function_console.php


示例11: ob_start

    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
$tab_options = $protectedPost;
require_once 'require/function_files.php';
require_once 'require/function_ipdiscover.php';
$form_name = 'ipdiscover_analyse';
$table_name = $form_name;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$pas = $protectedGet['rzo'];
//$rez = $nomRez;
$values = look_config_default_values(array('IPDISCOVER_IPD_DIR'), '', array('IPDISCOVER_IPD_DIR' => array('TVALUE' => VARLIB_DIR)));
$fname = $values['tvalue']['IPDISCOVER_IPD_DIR'];
$file_name = $fname . "/ipd/" . $pas . ".ipd";
//reset cache?
if (isset($protectedPost['reset']) and $protectedPost['reset'] != '') {
    unlink($file_name);
    reloadform_closeme('', true);
} else {
    if (!is_readable($file_name)) {
        runCommand("-cache -net=" . $pas, $fname);
    }
    $tabBalises = array($l->g(34) => "IP", $l->g(95) => "MAC", $l->g(49) => "NAME", $l->g(232) => "DATE", $l->g(66) => "TYPE");
    $ret = array();
    $ret = parse_xml_file($file_name, $tabBalises, "HOST");
    if ($ret != array()) {
        $sql = "select ";
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:ms_ipdiscover_analyse.php


示例12: find_value_in_field

function find_value_in_field($tag, $value_2_find, $type = 'COMPUTERS')
{
    $p = find_info_accountinfo($tag, $type);
    $values = look_config_default_values('ACCOUNT_VALUE_' . $p[$tag]['name'] . "_%", true);
    if (is_array($values['tvalue'])) {
        foreach ($values['tvalue'] as $key => $value) {
            if (stristr($value, $value_2_find)) {
                $decoup = explode('_', $key);
                $fr = array_pop($decoup);
                $list_tag_id[] = $fr;
            }
        }
        return $list_tag_id;
    } else {
        return false;
    }
}
开发者ID:inkoss,项目名称:karoshi-server,代码行数:17,代码来源:function_admininfo.php


示例13: elseif

        }
    } elseif ($_POST["supp"] == "ALL") {
        $verif[0]['sql'] = "select fileid from download_enable,devices\n\t\t\t\twhere download_enable.id=devices.ivalue\n\t\t\t\tand GROUP_ID=" . $systemid;
        $verif[0]['condition'] = 'EXIST';
        $verif[0]['MSG_ERROR'] = $l->g(688) . " " . $l->g(690);
        $ok = verification($verif);
        if (isset($ok)) {
            mysqli_query($_SESSION['OCS']["writeServer"], "delete from download_enable where GROUP_ID=" . $systemid);
            $sql = "delete from download_servers where GROUP_ID = " . $systemid;
            mysqli_query($_SESSION['OCS']["writeServer"], $sql);
        }
    }
}
//Modif server's machine
if (isset($_POST['Valid_modif']) and isset($_POST['modif']) and $_POST['modif'] != "") {
    $default_values = look_config_default_values(array('DOWNLOAD_SERVER_URI', 'DOWNLOAD_SERVER_DOCROOT'));
    if (trim($_POST['URL']) == "") {
        $_POST['URL'] = $default_values['tvalue']['DOWNLOAD_SERVER_URI'];
    }
    if (trim($_POST['REP_STORE']) == "") {
        $_POST['REP_STORE'] = $default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT'];
    }
    if ($_POST['modif'] != "ALL") {
        $sql = "update download_servers set URL='" . $_POST['URL'] . "' ,ADD_REP='" . $_POST['REP_STORE'] . "' where hardware_id=" . $_POST['modif'];
        mysqli_query($_SESSION['OCS']["writeServer"], $sql);
        $sql = "update download_enable set pack_loc='" . $_POST['URL'] . "' where SERVER_ID=" . $_POST['modif'];
        mysqli_query($_SESSION['OCS']["writeServer"], $sql);
    } else {
        $sql = "update download_servers set URL='" . $_POST['URL'] . "' ,ADD_REP='" . $_POST['REP_STORE'] . "' where GROUP_ID=" . $systemid;
        mysqli_query($_SESSION['OCS']["writeServer"], $sql);
        $sql = "update download_enable set pack_loc='" . $_POST['URL'] . "' where GROUP_ID=" . $systemid;
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:ms_server_redistrib.php


示例14: admin_user

function admin_user($id_user = null, $is_my_account = false)
{
    global $protectedPost, $l, $pages_refs;
    $tab_hidden = array();
    $list_groups = array();
    if ($id_user) {
        $update = 3;
    } else {
        $update = 0;
    }
    if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES') {
        //search all profil type
        $list_profil = get_profile_labels();
        $list_groups_result = look_config_default_values("USER_GROUP_%", 'LIKE');
        if (is_array($list_groups_result['name'])) {
            foreach ($list_groups_result['name'] as $key => $value) {
                $list_groups[$list_groups_result['ivalue'][$key]] = $list_groups_result['tvalue'][$key];
            }
        }
        $name_field = array("ID", "ACCESSLVL", "USER_GROUP");
        $tab_name = array($l->g(995) . " :", $l->g(66) . " :", $l->g(607) . " :");
        $type_field = array($update, 2, 2);
    }
    $name_field[] = "FIRSTNAME";
    $name_field[] = "LASTNAME";
    $name_field[] = "EMAIL";
    $name_field[] = "COMMENTS";
    //$name_field[]="USER_GROUP";
    $tab_name[] = $l->g(1366) . " :";
    $tab_name[] = $l->g(996) . " :";
    $tab_name[] = $l->g(1117) . " :";
    $tab_name[] = $l->g(51) . " :";
    //$tab_name[]="Groupe de l'utilisateur: ";
    $type_field[] = 0;
    $type_field[] = 0;
    $type_field[] = 0;
    $type_field[] = 0;
    //$type_field[]= 2;
    $tab_hidden['MODIF'] = $id_user;
    $sql = "select ID,NEW_ACCESSLVL,USER_GROUP,FIRSTNAME,LASTNAME,EMAIL,COMMENTS from operators where id= '%s'";
    $arg = $id_user;
    $res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
    $row = mysqli_fetch_object($res);
    if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES') {
        $protectedPost['ACCESSLVL'] = $row->NEW_ACCESSLVL;
        $protectedPost['USER_GROUP'] = $row->USER_GROUP;
        $value_field = array($row->ID, $list_profil, $list_groups);
    }
    $value_field[] = $row->FIRSTNAME;
    $value_field[] = $row->LASTNAME;
    $value_field[] = $row->EMAIL;
    $value_field[] = $row->COMMENTS;
    if ($_SESSION['OCS']['cnx_origine'] == "LOCAL") {
        $name_field[] = "PASSWORD";
        $type_field[] = 0;
        $tab_name[] = $l->g(217) . " :";
        $value_field[] = $protectedPost['PASSWORD'];
    }
    $tab_typ_champ = show_field($name_field, $type_field, $value_field);
    foreach ($tab_typ_champ as $id => $values) {
        $tab_typ_champ[$id]['CONFIG']['SIZE'] = 40;
    }
    if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_USER_GROUP') == 'YES') {
        $tab_typ_champ[2]["CONFIG"]['DEFAULT'] = "YES";
        //	$tab_typ_champ[1]['COMMENT_AFTER']="<a href=# onclick=window.open(\"index.php?".PAG_INDEX."=".$pages_refs['ms_admin_profil']."&head=1\",\"admin_profil\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=550,height=450\")><img src=image/plus.png></a>";
        $tab_typ_champ[2]['COMMENT_AFTER'] = "<a href=\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_adminvalues'] . "&head=1&tag=USER_GROUP\",\"admin_user_group\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=550,height=450\")><img src=image/plus.png></a>";
    }
    if (isset($tab_typ_champ)) {
        tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, array('title' => $id_user ? $is_my_account ? $l->g(1365) : $l->g(1385) : $l->g(1386), 'form_name' => 'my_account'));
    }
}
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:71,代码来源:function_users.php


示例15: look_config_default_values

    $lbl_new_field = $l->g($protectedGet['new_field']);
} else {
    $lbl_new_field = $l->g(80);
}
//if no tab selected
if (!isset($protectedPost['onglet']) or $protectedPost['onglet'] == '') {
    $protectedPost['onglet'] = 1;
}
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
//faire la vérif sur le tag en get
//for update name
if (isset($protectedPost['MODIF']) and is_numeric($protectedPost['MODIF']) and !isset($protectedPost['Valid_modif'])) {
    $protectedPost['onglet'] = 2;
    $val_info = look_config_default_values(array($protectedGet['tag'] . "_" . $protectedPost['MODIF']));
    $protectedPost['newfield'] = $val_info['tvalue'][$protectedGet['tag'] . "_" . $protectedPost['MODIF']];
    if (isset($protectedGet['nb_field']) and is_numeric($protectedGet['nb_field'])) {
        $protectedPost['2newfield'] = $val_info['comments'][$protectedGet['tag'] . "_" . $protectedPost['MODIF']];
    }
    $hidden = $protectedPost['MODIF'];
}
echo open_form($form_name);
onglet($data_on, $form_name, "onglet", 2);
echo '<div class="mlt_bordure" >';
if ($protectedPost['onglet'] == 1) {
    $tab_options['CACHE'] = 'RESET';
    //delete few fields
    if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != '') {
        $list = $protectedPost['del_check'];
        $sql_delete = "DELETE FROM config WHERE name like '%s' and ivalue in (%s)";
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:ms_adminvalues.php


示例16: pagesdev

function pagesdev($form_name)
{
    global $l, $numeric, $sup1, $pages_refs;
    $champs = array('USE_NEW_SOFT_TABLES' => 'USE_NEW_SOFT_TABLES');
    $values = look_config_default_values($champs);
    debut_tab();
    ligne('USE_NEW_SOFT_TABLES', 'Utilisation tables de soft OCS v2.1', 'radio', array(1 => 'ON', 0 => 'OFF', 'VALUE' => $values['ivalue']['USE_NEW_SOFT_TABLES']));
    fin_tab($form_name);
}
开发者ID:inkoss,项目名称:karoshi-server,代码行数:9,代码来源:function_config_generale.php


示例17: del_pack

function del_pack($fileid)
{
    global $l;
    //find all activate package
    $reqEnable = "SELECT id FROM download_enable WHERE FILEID='%s'";
    $argEnable = $fileid;
    $resEnable = mysql2_query_secure($reqEnable, $_SESSION['OCS']["readServer"], $argEnable);
    while ($valEnable = mysqli_fetch_array($resEnable)) {
        $list_id[] = $valEnable["id"];
    }
    //delete packet in DEVICES table
    if ($list_id != "") {
        foreach ($list_id as $k => $v) {
            desactive_packet('', $v);
        }
    }
    //delete activation of this pack
    $reqDelEnable = "DELETE FROM download_enable WHERE FILEID='%s'";
    $argDelEnable = $fileid;
    mysql2_query_secure($reqDelEnable, $_SESSION['OCS']["writeServer"], $argDelEnable);
    //delete info of this pack
    $reqDelAvailable = "DELETE FROM download_available WHERE FILEID='%s'";
    $argDelAvailable = $fileid;
    mysql2_query_secure($reqDelAvailable, $_SESSION['OCS']["writeServer"], $argDelAvailable);
    //what is the directory of this package?
    $info = look_config_default_values('DOWNLOAD_PACK_DIR');
    $document_root = $info['tvalue']['DOWNLOAD_PACK_DIR'];
    //if no directory in base, take $_SERVER["DOCUMENT_ROOT"]
    if (!isset($document_root)) {
        $document_root = VARLIB_DIR;
    }
    if (@opendir($document_root . "/download/" . $fileid)) {
        //delete all files from this package
        if (!@recursive_remove_directory($document_root . "/download/" . $fileid)) {
            msg_error($l->g(472) . " " . $document_root . "/download/" . $fileid);
        }
    }
    // delete redistribution package
    $dl_rep_redist = look_config_default_values('DOWNLOAD_REP_CREAT');
    $document_root = $dl_rep_redist['tvalue']['DOWNLOAD_REP_CREAT'];
    if (!$document_root) {
        $document_root = VARLIB_DIR . '/download/server';
    }
    $redist_package = realpath($document_root . "/" . $fileid);
    if ($redist_package and @opendir($redist_package)) {
        //delete all files from this package
        if (!@recursive_remove_directory($redist_package)) {
            msg_error($l->g(472) . " " . $redist_package);
        }
    }
    addLog($l->g(512), $l->g(888) . " " . $fileid);
}
开发者ID:remicollet,项目名称:OCSInventory-ocsreports,代码行数:52,代码来源:function_telediff.php


示例18: close_form

        echo "<input type='hidden' name='LOCK' id='LOCK' value=''>";
        echo close_form();
    }
}
echo '</div>';
if (isset($_SESSION['OCS']["loggeduser"]) && $_SESSION['OCS']['profile']->getConfigValue('ALERTE_MSG') == 'YES') {
    /**************************************************   ALERT MESSAGES ********************************************************/
    $msg_header_error = array();
    $msg_header_error_sol = array();
    //install.php already exist ?
    if (is_readable("install.php")) {
        $msg_header_error[] = $l->g(2020);
        $msg_header_error_sol[] = $l->g(2023);
    }
    // OCS update available ? and warn update on yes ?
    $need_display = look_config_default_values("WARN_UPDATE");
    if ($need_display['ivalue']['WARN_UPDATE'] == '1') {
        $data = get_update_json();
        if (GUI_VER_SHOW < $data->version) {
            $txt = $l->g(2118) . " " . $data->version . " " . $l->g(2119);
            $txt .= "<br><a href=" . $data->download . ">" . $l->g(2120) . "</a>";
            msg_warning($txt, true);
        }
    }
    //defaut user already exist on databases?
    try {
        $link_read = mysqli_connect(SERVER_READ, DFT_DB_CMPT, DFT_DB_PSWD);
        $link_write = mysqli_connect(SERVER_WRITE, DFT_DB_CMPT, DFT_DB_PSWD);
        mysqli_select_db($link_read, DB_NAME);
        mysqli_select_db($link_write, DB_NAME);
        $msg_header_error[] = $l->g(2024) . ' ' . DB_NAME;
开发者ID:stweil,项目名称:OCSInventory-ocsreports,代码行数:31,代码来源:html_header.php


示例19: found_info_pack

// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
require_once 'require/function_telediff.php';
$info_id = found_info_pack($protectedGet["active"]);
if (!isset($info_id['ERROR'])) {
    $form_name = "form_active";
    //ouverture du formulaire
    echo open_form($form_name);
    if (!isset($protectedPost['FILE_SERV']) and $protectedPost['choix_activ'] == 'MAN' or !isset($protectedPost['FILE_SERV_REDISTRIB']) and $protectedPost['choix_activ'] == 'AUTO' or !isset($protectedPost['HTTPS_SERV'])) {
        $default = $_SERVER["SERVER_ADDR"] . "/download";
        $values = look_config_default_values(array('DOWNLOAD_URI_INFO', 'DOWNLOAD_URI_FRAG'));
        $protectedPost['FILE_SERV'] = $values['tvalue']['DOWNLOAD_URI_FRAG'];
        $protectedPost 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP lookup函数代码示例发布时间:2022-05-15
下一篇:
PHP long2str函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap