$i = 0; while (isset($temp_val[$i])) { $protectedPost[$name_accountinfo . '_' . $temp_val[$i]] = 'on'; $i++; } } else { $protectedPost[$name_accountinfo] = $info_account_id[$name_accountinfo]; } } elseif ($val_admin_info['TYPE'] == 6) { array_push($value_field, $info_account_id[$name_accountinfo]); if ($admin_accountinfo) { array_push($config['COMMENT_AFTER'], $up_png . datePick($name_accountinfo)); } else { array_push($config['COMMENT_AFTER'], datePick($name_accountinfo)); } array_push($config['JAVASCRIPT'], "READONLY " . dateOnClick($name_accountinfo)); array_push($config['SELECT_DEFAULT'], ''); array_push($config['SIZE'], '8'); } elseif ($val_admin_info['TYPE'] == 5) { array_push($value_field, "accountinfo"); if ($admin_accountinfo) { array_push($config['COMMENT_AFTER'], $up_png); } else { array_push($config['COMMENT_AFTER'], ""); } array_push($config['SELECT_DEFAULT'], ''); array_push($config['JAVASCRIPT'], ''); array_push($config['SIZE'], ''); } else { array_push($value_field, $info_account_id[$name_accountinfo]); if ($admin_accountinfo) {
$am_pm = ''; } else { $am_pm = 'pm'; } foreach ($hour as $k => $v) { foreach ($min as $km) { if ($am_pm == '' or $am_pm == 'pm' and $k != '00' and $k != '12') { $hour_min[$k . ":" . $km . $am_pm] = $am_pm . " " . $k . ":" . $km; } } } $i++; } // p($hour_min); $config['COMMENT_BEHING'][0] = datePick("INSTALL_DATE"); $config['JAVASCRIPT'][0] = "READONLY " . dateOnClick("INSTALL_DATE"); $config['SELECT_DEFAULT'][0] = ''; $config['SIZE'][0] = '8'; $tab_name = array($l->g(1295), $l->g(1294), $l->g(443)); $name_field = array("INSTALL_DATE", "INSTALL_HEURE", "DOWNLOAD_POSTCMD"); $type_field = array(0, 2, 2); $value_field = array($protectedPost['INSTALL_DATE'], $hour_min, $action); if ($protectedGet['origine'] != 'group') { array_push($tab_name, $l->g(1293)); array_push($name_field, "TELE_FORCE"); array_push($type_field, 5); array_push($value_field, array('')); } $tab_typ_champ = show_field($name_field, $type_field, $value_field, $config); // p($tab_typ_champ); $tab_typ_champ[2]['CONFIG']['DEFAULT'] = 'YES';
function show_accountinfo($id = '', $type = '', $exclu_type = '') { global $convert_type, $protectedPost; $data = find_info_accountinfo($id, $type, $exclu_type); $i = 0; foreach ($data as $k => $v) { foreach ($v as $key => $value) { switch ($key) { case "id": if ($v['name'] != 'TAG') { $name_field[$i] = 'fields_' . $value; } else { $name_field[$i] = $v['name']; $value_field[$i] = $protectedPost[$v['name']]; } break; case "type": $type_field[$i] = $convert_type[$value]; switch ($value) { case '6': $comment_behing[$i] = datePick('fields_' . $v['id']); $config[$i]['CONFIG']['JAVASCRIPT'] = "READONLY " . dateOnClick('fields_' . $v['id']); $config[$i]['CONFIG']['SIZE'] = 7; break; case '4': case '2': case '7': $value_field[$i] = find_value_field("ACCOUNT_VALUE_" . $v['name']); $comment_behing[$i] = ''; $config[$i]['CONFIG']['DEFAULT'] = 'YES'; break; case '1': $config[$i]['CONFIG']['COLS'] = 40; $config[$i]['CONFIG']['ROWS'] = 5; break; default: $comment_behing[$i] = ''; $config[$i]['CONFIG']['SIZE'] = 20; break; } break; case "comment": $tab_name[$i] = $value; break; } } if (!isset($value_field[$i])) { $value_field[$i] = $protectedPost['fields_' . $v['id']]; } $i++; } return array('FIELDS' => array('name_field' => $name_field, 'tab_name' => $tab_name, 'type_field' => $type_field, 'value_field' => $value_field), 'CONFIG' => $config, 'COMMENT_BEHING' => $comment_behing); }