$info_account_id = admininfo_snmp($systemid);
 }
 unset($action_updown);
 //UP/DOWN
 if (isset($protectedPost['UP']) and $protectedPost['UP'] != '') {
     $action_updown = 'UP';
 }
 if (isset($protectedPost['DOWN']) and $protectedPost['DOWN'] != '') {
     $action_updown = 'DOWN';
 }
 if (isset($action_updown)) {
     $new_order = find_new_order($action_updown, $protectedPost[$action_updown], 'SNMP', $protectedPost['onglet']);
     if ($new_order) {
         //	$array_info_account=find_info_accountinfo($new_order['NEW']);
         update_accountinfo_config($new_order['OLD'], array('SHOW_ORDER' => $new_order['NEW_VALUE']));
         update_accountinfo_config($new_order['NEW'], array('SHOW_ORDER' => $new_order['OLD_VALUE']));
     }
 }
 //print_r($info_account_id);
 if (!isset($protectedPost['onglet']) or $protectedPost['onglet'] == '' or !is_numeric($protectedPost['onglet'])) {
     $protectedPost['onglet'] = $list_tab['FIRST'];
 }
 unset($list_tab['FIRST']);
 echo "<br>";
 echo open_form($form_name);
 onglet($list_tab, $form_name, "onglet", 6);
 echo '<div class="mlt_bordure" >';
 if ($_SESSION['OCS']['profile']->getConfigValue('ACCOUNTINFO') == 'YES') {
     $show_admin_button = "<a href=# OnClick='pag(\"ADMIN\",\"ADMIN\",\"" . $form_name . "\");'>";
     if (isset($_SESSION['OCS']['ADMIN']['ACCOUNTINFO'])) {
         $show_admin_button .= "<img src='image/success.png'></a>";
Пример #2
0
function update_accountinfo($id, $array_new_values, $type)
{
    global $l, $sql_type_accountinfo;
    //print_r($array_new_values);
    $error = dde_exist($array_new_values['NAME'], $id, $type);
    if ($error == '') {
        //Update
        $new_type_field = update_accountinfo_config($id, $array_new_values);
        //update column type in accountinfo table
        $sql_update_column = "ALTER TABLE accountinfo change fields_%s fields_%s %s";
        $arg_update_column = array($id, $id, $new_type_field);
        mysql2_query_secure($sql_update_column, $_SESSION['OCS']["writeServer"], $arg_update_column);
        return array('SUCCESS' => $l->g(711));
    } else {
        return array('ERROR' => $error);
    }
}