本文整理汇总了PHP中show_modif函数的典型用法代码示例。如果您正苦于以下问题:PHP show_modif函数的具体用法?PHP show_modif怎么用?PHP show_modif使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_modif函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_blacklist_fields
function show_blacklist_fields($nb_field, $default_values, $field_name, $nb_value_by_field, $size, $separat, $javascript = '')
{
global $aff;
$i = 1;
while ($i <= $nb_field) {
if ($i != 1) {
$aff .= $separat;
}
$aff .= show_modif($default_values[$field_name . $i], $field_name . $i, 0, '', array('MAXLENGTH' => $nb_value_by_field, 'SIZE' => $size, 'JAVASCRIPT' => $javascript));
$i++;
}
$aff .= "</td></tr><tr><td>";
return $aff;
}
示例2: remplirListe
function remplirListe($input_name)
{
//connecOCS();
//requete SQL avec filtre sur les logiciels des pc linux et Correctifs, mise a jour windows
$sql = "SELECT DISTINCT softwares.NAME FROM softwares_name_cache softwares WHERE softwares.NAME NOT LIKE '%Correctif%' AND softwares.NAME NOT LIKE '%Mise a jour%' ORDER BY softwares.NAME";
//requete SQL sans filtre
//$sql= "SELECT DISTINCT softwares.NAME FROM softwares ORDER BY softwares.NAME";
$query = mysqli_query($_SESSION['OCS']["readServer"], $sql) or die("erreur" . mysqli_error($_SESSION['OCS']["readServer"]));
//echo '<option value=""></option>';
//remplit la liste deroulante
while ($row = mysqli_fetch_array($query)) {
$name[$row['NAME']] = $row['NAME'];
}
echo show_modif($name, $input_name, 2);
}
示例3: show_modif
$protectedPost['OP_' . $i] = $val['op'];
$protectedPost['COMPTO_' . $i] = $val['compto'];
$protectedPost['RULE_NAME'] = $val['rule_name'];
$i++;
}
$protectedPost['NUM_RULES'] = $i - 2;
}
//new rule
if ($protectedPost['NEW_RULE'] or $protectedPost['NUM_RULES'] or $protectedPost['MODIF'] != "") {
if ($protectedPost['MODIF'] != "") {
$modif = $protectedPost['MODIF'];
} else {
$modif = $protectedPost['OLD_MODIF'];
}
$numero = $protectedPost['NUM_RULES'] + 1;
$tab_nom = $l->g(674) . " " . show_modif($protectedPost['RULE_NAME'], "RULE_NAME", "0");
$tab = "<table align='center'>";
$i = 1;
while ($i < $numero + 1) {
if ($i == 1) {
$entete = 'YES';
} else {
$entete = 'NO';
}
$tab .= fields_conditions_rules($i, $entete);
$i++;
}
echo $tab_nom;
echo $tab;
echo "</tr></table>";
echo "<a onclick='return pag(" . $numero . ",\"NUM_RULES\",\"rules\")'><font color=green>" . $l->g(682) . "</font></a> <a onclick='return pag(\"RAZ\",\"RAZ\",\"rules\");'><font color=\"red\">" . $l->g(113) . "</font></a><br><br>";
示例4: show_modif
echo "<tr><td colspan='3'>";
echo "<div id='OS_div' style='display:block'>";
echo "<table BGCOLOR='#C7D9F5' BORDER='0' WIDTH = '600px' ALIGN = 'Center' CELLPADDING='0' BORDERCOLOR='#9894B5' >";
echo $title_user . $notify_user;
$notify_txt = $lign_begin . $l->g(449) . $td_colspan2 . show_modif($_POST['NOTIFY_TEXT'], 'NOTIFY_TEXT', 1) . $lign_end;
$notify_count_down = $lign_begin . $l->g(450) . $td_colspan2 . show_modif($protectedPost['NOTIFY_COUNTDOWN'], 'NOTIFY_COUNTDOWN', 0, '', array('MAXLENGTH' => 4, 'SIZE' => 4, 'JAVASCRIPT' => $chiffres)) . $l->g(511) . $lign_end;
$notify_can_abord = $lign_begin . $l->g(451) . $td_colspan2 . show_modif($yes_no, 'NOTIFY_CAN_ABORT', 2) . $lign_end;
$notify_can_delay = $lign_begin . $l->g(452) . $td_colspan2 . show_modif($yes_no, 'NOTIFY_CAN_DELAY', 2) . $lign_end;
echo "<tr><td colspan='3' align=center><div id='NOTIFY_USER_div' style='display:" . ($protectedPost["NOTIFY_USER"] == 1 ? " block" : "none") . "'>";
echo $sous_tab_beg;
echo $notify_txt . $notify_count_down . $notify_can_abord . $notify_can_delay;
echo $sous_tab_end;
echo "</div></td></tr>";
$need_done_action = "<tr height='30px' bgcolor='white'><td colspan='2'>" . $l->g(453) . ":</td><td>" . champ_select_block($yes_no, 'NEED_DONE_ACTION', array('NEED_DONE_ACTION' => 1)) . $lign_end;
echo $need_done_action;
$need_done_action_txt = $lign_begin . $l->g(449) . $td_colspan2 . show_modif($_POST['NEED_DONE_ACTION_TEXT'], 'NEED_DONE_ACTION_TEXT', 1) . $lign_end;
echo "<tr><td colspan='3' align=center><div id='NEED_DONE_ACTION_div' style='display:" . ($protectedPost["NEED_DONE_ACTION"] == 1 ? " block" : "none") . "'>";
echo $sous_tab_beg;
echo $need_done_action_txt;
echo $sous_tab_end;
echo "</div></td></tr>";
echo "</table></td></tr>";
echo "</div>";
echo "</table>";
echo "<br><input type='submit' name='valid' id='valid' value='" . $l->g(13) . "' OnClick='return verif();' >";
echo "<input type='hidden' id='digest_algo' name='digest_algo' value='MD5'>\n\t <input type='hidden' id='digest_encod' name='digest_encod' value='Hexa'>\n\t <input type='hidden' id='download_rep_creat' name='download_rep_creat' value='" . $default['DOWNLOAD_REP_CREAT'] . "'>";
// <input type='hidden' id='download_server_docroot' name='download_server_docroot' value='".$default['DOWNLOAD_SERVER_DOCROOT']."'>";
echo close_form();
echo "</div>";
?>
示例5: array_merge_values
$sql['SQL'] .= " group by " . $field_name_soft;
// $_SESSION['OCS']["forcedRequest"].=" group by name";
if ($sql_fin['SQL'] != '') {
$sql['SQL'] .= $sql_fin['SQL'];
$sql['ARG'] = array_merge_values($sql['ARG'], $sql_fin['ARG']);
// $_SESSION['OCS']["forcedRequest"].=$sql_fin;
}
$list_fields = array('name' => 'name', 'nbre' => 'nb');
$default_fields = $list_fields;
$list_col_cant_del = $default_fields;
$tab_options['LIEN_LBL']['nbre'] = 'index.php?' . PAG_INDEX . '=' . $pages_refs['ms_multi_search'] . '&prov=allsoft&value=';
$tab_options['LIEN_CHAMP']['nbre'] = 'id';
$tab_options['LBL']['name'] = $l->g(847);
$tab_options['LBL']['nbre'] = $l->g(1120);
$tab_options['ARG_SQL'] = $sql['ARG'];
$result_exist = tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $sql['SQL'], $form_name, 80, $tab_options);
}
echo "<br><div class='mvt_bordure'>";
echo "<b>" . $l->g(735) . "</b><br><br>";
echo $l->g(382) . ": " . show_modif($protectedPost['NAME_RESTRICT'], 'NAME_RESTRICT', 0);
echo " " . $l->g(381) . ": " . show_modif(array('<' => '<', '>' => '>', '=' => '='), 'COMPAR', 2);
echo show_modif($protectedPost['NBRE'], 'NBRE', 0, '', array('MAXLENGTH' => 100, 'SIZE' => 10, 'JAVASCRIPT' => $numeric));
//echo "<input type='input' name='NBRE' value='".$protectedPost['NBRE']."' ".$numeric.">";
echo "<br><a href='index.php?" . PAG_INDEX . "=" . $pages_refs['ms_soft_csv'] . "&no_header=1&soft=" . $protectedPost['NAME_RESTRICT'] . "&nb=" . $protectedPost['NBRE'] . "&comp=" . htmlentities($protectedPost['COMPAR'], ENT_COMPAT | ENT_HTML401, "UTF-8") . "'><br>" . $l->g(183) . " " . $l->g(765) . "<br></a>";
if ($protectedPost['COMPAR'] == '<' and $protectedPost['NBRE'] <= 15 and $protectedPost['NBRE'] != "") {
echo "<br><a href='index.php?" . PAG_INDEX . "=" . $pages_refs['ms_soft_csv'] . "&no_header=1&soft=" . $protectedPost['NAME_RESTRICT'] . "&nb=" . $protectedPost['NBRE'] . "&comp=" . htmlentities($protectedPost['COMPAR'], ENT_COMPAT | ENT_HTML401, "UTF-8") . "&all_computers=yes'>" . $l->g(912) . "</a><br>";
}
echo "<br><input type='submit' value='" . $l->g(393) . "' name='SUBMIT_FORM'><input type='submit' value='" . $l->g(396) . "' name='RESET'>";
echo '</div>';
echo '</div>';
echo close_form();
示例6: show_modif
$first = $val_rules['rule'];
$list_rules[$val_rules['rule']] = $val_rules['rule_name'];
$nb_rule++;
}
if ($nb_rule > 1) {
$select_choise = $l->g(668) . show_modif($list_rules, 'rule_choise', 2, $form_name);
echo $select_choise;
} elseif ($nb_rule == 1) {
$protectedPost['rule_choise'] = $first;
echo "<input type=hidden value='" . $first . "' name='rule_choise' id='rule_choise'>";
} elseif ($nb_rule == 0) {
msg_error($l->g(982));
}
}
if ($protectedPost['onglet'] == 'MACH') {
echo $l->g(1292) . show_modif(array('NO' => $l->g(454), 'YES' => $l->g(455)), 'DWL_OPT', 2, $form_name);
}
if ($protectedPost['onglet'] == 'MACH' and $protectedPost['DWL_OPT'] != '' or $protectedPost['onglet'] == 'SERV_GROUP' and $protectedPost['rule_choise'] != '') {
//recherche de toutes les r�gles pour les serveurs de redistribution
$list_fields = array('FILE_ID' => 'e.FILEID', 'INFO_LOC' => 'e.INFO_LOC', 'CERT_FILE' => 'e.CERT_FILE', 'CERT_PATH' => 'e.CERT_PATH', $l->g(1037) => 'a.NAME', $l->g(1039) => 'a.PRIORITY', $l->g(51) => 'a.COMMENT', $l->g(274) => 'a.OSNAME', $l->g(953) . " (KB)" => 'a.SIZE');
if (!isset($nb_rule) or $nb_rule > 0) {
if ($protectedPost['onglet'] != 'SERV_GROUP') {
$list_fields['PACK_LOC'] = 'e.PACK_LOC';
$list_fields['ACTIVE_ID'] = 'e.ID';
$list_fields['MODIF'] = 'e.ID';
} else {
$list_fields['ACTIVE_ID'] = 'e.FILEID';
$list_fields['MODIF'] = 'e.FILEID';
}
}
$default_fields = array($l->g(1037) => $l->g(1037), $l->g(1039) => $l->g(1039), $l->g(274) => $l->g(274), $l->g(953) . " (KB)" => $l->g(953) . " (KB)", 'SELECT' => 'SELECT');
示例7: multi_lot
function multi_lot($form_name, $lbl_choise)
{
global $protectedPost, $protectedGet, $l;
$list_id = "";
//print_r($protectedPost);
if (!isset($protectedGet['origine'])) {
if (isset($protectedGet['idchecked']) and $protectedGet['idchecked'] != "") {
$choise_req_selection['REQ'] = $l->g(584);
$choise_req_selection['SEL'] = $l->g(585);
$select_choise = show_modif($choise_req_selection, 'CHOISE', 2, $form_name);
echo "<center>" . $lbl_choise . " " . $select_choise . "</center><br>";
}
if ($protectedPost['CHOISE'] == 'REQ' or $protectedGet['idchecked'] == '') {
msg_info($l->g(901));
if ($protectedGet['idchecked'] == '') {
echo "<input type='hidden' name='CHOISE' value='" . $protectedPost['CHOISE'] . "'>";
$protectedPost['CHOISE'] = 'REQ';
}
$list_id = $_SESSION['OCS']['ID_REQ'];
}
if ($protectedPost['CHOISE'] == 'SEL') {
msg_info($l->g(902));
$list_id = $protectedGet['idchecked'];
}
//gestion tableau
if (is_array($list_id)) {
$list_id = implode(",", $list_id);
}
} else {
$list_id = $protectedGet['idchecked'];
}
if ($list_id != "") {
return $list_id;
} else {
return false;
}
}
示例8: incPicker
} else {
$server_group = false;
}
incPicker();
$tdhdpb = "<td align='left' width='20%'>";
$tdhfpb = "</td>";
$tdhd = "<td align='left' width='20%'><b>";
$tdhf = ":</b></td>";
$tdpopup = "<td align='left' width='20%' onclick=\"javascript: OuvrirPopup('group_chang_value.php', '', 'resizable=no, location=no, width=400, height=200, menubar=no, status=no, scrollbars=no, menubar=no')\">";
//if user clic on modify
if ($protectedPost['MODIF_x']) {
//don't show the botton modify
$img_modif = "";
//list of input we can modify
$name = show_modif($item->NAME, 'NAME', 0);
$description = show_modif($item->DESCRIPTION, 'DESCR', 1);
//show new bottons
$button_valid = "<input title='" . $l->g(625) . "' type='image' src='image/modif_valid_v2.png' name='Valid_modif'>";
$button_reset = "<input title='" . $l->g(626) . "' type='image' src='image/modif_anul_v2.png' name='Reset_modif'>";
} else {
//only show the botton for modify
$img_modif = "<input title='" . $l->g(115) . "' type='image' src='image/modif.png' name='MODIF'>";
$name = $item->NAME;
$description = $item->DESCRIPTION;
$button_valid = "";
$button_reset = "";
}
//form for modify values of group's
echo open_form('CHANGE');
echo "<br><br><table align='center' width='65%' border='0' cellspacing=20 bgcolor='#C7D9F5' style='border: solid thin; border-color:#A1B1F9'>";
//TELEDIFF_WK
示例9: msg_warning
msg_warning($error);
}
}
if ($error == "" and isset($protectedPost['Valid_modif']) or isset($protectedPost['YES'])) {
if ($protectedPost['choix_activ'] == "MAN") {
activ_pack($protectedGet["active"], $protectedPost["HTTPS_SERV"], $protectedPost['FILE_SERV']);
}
if ($protectedPost['choix_activ'] == "AUTO") {
activ_pack_server($protectedGet["active"], $protectedPost["HTTPS_SERV"], $protectedPost['FILE_SERV_REDISTRIB']);
}
echo "<script> alert('" . $l->g(469) . "');window.opener.document.packlist.submit(); self.close();</script>";
}
if ($_SESSION['OCS']["use_redistribution"] == 1) {
$list_choise['MAN'] = $l->g(650);
$list_choise['AUTO'] = $l->g(649);
$choix_activ = $l->g(514) . ' : ' . show_modif($list_choise, 'choix_activ', 2, $form_name) . "<br>";
echo $choix_activ;
} else {
$protectedPost['choix_activ'] = "MAN";
echo "<input type='hidden' name='choix_activ' value='MAN'>";
}
echo "<br>";
if (isset($protectedPost['choix_activ']) and $protectedPost['choix_activ'] != '') {
if ($protectedPost['choix_activ'] == "MAN") {
$tab_name = array($l->g(471), $l->g(470));
$name_field = array("FILE_SERV", "HTTPS_SERV");
$type_field = array(0, 0);
$value_field = array($protectedPost['FILE_SERV'], $protectedPost['HTTPS_SERV']);
} else {
if (count($groupListServers) == 0) {
msg_error($l->g(660));
示例10: mysql2_query_secure
$sql_del = "delete from subnet where netid='%s'";
$arg_del = $protectedPost['SUP_PROF'];
mysql2_query_secure($sql_del, $_SESSION['OCS']["writeServer"], $arg_del);
//delete cache
unset($_SESSION['OCS']["ipdiscover"]);
require_once BACKEND . 'ipdiscover/ipdiscover.php';
$tab_options['CACHE'] = 'RESET';
}
if (isset($_SESSION['OCS']["ipdiscover"])) {
$dpt = array_keys($_SESSION['OCS']["ipdiscover"]);
array_unshift($dpt, "");
foreach ($dpt as $key => $value) {
$list_index[$key] = $value;
}
asort($list_index);
echo $l->g(562) . " " . show_modif($list_index, 'DPT_CHOISE', 2, $form_name, array('DEFAULT' => "NO"));
} else {
msg_info(mb_strtoupper($l->g(1134)));
}
if (isset($protectedPost['DPT_CHOISE']) and $protectedPost['DPT_CHOISE'] != '0') {
$array_rsx = find_all_subnet($dpt[$protectedPost['DPT_CHOISE']]);
$tab_options['VALUE']['LBL_RSX'] = $_SESSION['OCS']["ipdiscover"][$dpt[$protectedPost['DPT_CHOISE']]];
$arg_sql = array();
$sql = " select * from (select inv.RSX as ID,\n\t\t\t\t\t inv.c as 'INVENTORIE',\n\t\t\t\t\t non_ident.c as 'NON_INVENTORIE',\n\t\t\t\t\t ipdiscover.c as 'IPDISCOVER',\n\t\t\t\t\t ident.c as 'IDENTIFIE',\n\t\t\t\t\t CASE WHEN ident.c IS NULL and ipdiscover.c IS NULL THEN 100 WHEN ident.c IS NULL THEN 0 ELSE round(100-(non_ident.c*100/(ident.c+non_ident.c)),1) END as 'pourcentage'\n\t\t\t from (SELECT COUNT(DISTINCT hardware_id) as c,'IPDISCOVER' as TYPE,tvalue as RSX\n\t\t\t\t\tFROM devices \n\t\t\t\t\tWHERE name='IPDISCOVER' and tvalue in ";
$arg = mysql2_prepare($sql, $arg_sql, $array_rsx);
$arg['SQL'] .= " GROUP BY tvalue) \n\t\t\t\tipdiscover right join\n\t\t\t\t (SELECT count(distinct(hardware_id)) as c,'INVENTORIE' as TYPE,ipsubnet as RSX\n\t\t\t\t\tFROM networks left join subnet on networks.ipsubnet=subnet.netid\n\t\t\t\t\tWHERE ipsubnet in ";
$arg = mysql2_prepare($arg['SQL'], $arg['ARG'], $array_rsx);
$arg['SQL'] .= " and status='Up' GROUP BY ipsubnet) \n\t\t\t\tinv on ipdiscover.RSX=inv.RSX left join\n\t\t\t\t\t(SELECT COUNT(DISTINCT mac) as c,'IDENTIFIE' as TYPE,netid as RSX\n\t\t\t\t\tFROM netmap \n\t\t\t\t\tWHERE mac IN (SELECT DISTINCT(macaddr) FROM network_devices) \n\t\t\t\t\t\tand netid in ";
$arg = mysql2_prepare($arg['SQL'], $arg['ARG'], $array_rsx);
$arg['SQL'] .= " GROUP BY netid) \n\t\t\t\tident on ipdiscover.RSX=ident.RSX left join\n\t\t\t\t\t(SELECT COUNT(DISTINCT mac) as c,'NON IDENTIFIE' as TYPE,netid as RSX\n\t\t\t\t\tFROM netmap n\n\t\t\t\t\tLEFT JOIN networks ns ON ns.macaddr=n.mac\n\t\t\t\t\tWHERE n.mac NOT IN (SELECT DISTINCT(macaddr) FROM network_devices) \n\t\t\t\t\t\tand (ns.macaddr IS NULL OR ns.IPSUBNET <> n.netid) \n\t \t\t\t\t\tand ns.HARDWARE_ID IS NULL\n\t\t\t\t\t\tand n.netid in ";
$arg = mysql2_prepare($arg['SQL'], $arg['ARG'], $array_rsx);
示例11: while
if ($fp) {
while ($ln = fgets($fp, 1024)) {
$ln = preg_replace('(\\r\\n|\\n|\\r|\\t|)', '', $ln);
//foreach ($tag as $poub=>$key){
if (array_key_exists($ln, $tag)) {
$index = $tag[$ln];
} elseif (substr($ln, 0, 2) == '</') {
unset($index);
} elseif (trim($ln) != "" and isset($index)) {
$data[$index][] = $ln;
}
}
fclose($fp);
}
$array_top = array(5 => 5, 10 => 10, 20 => 20);
$stats .= $l->g(55) . ": " . show_modif($array_top, "CHOICE_TOP", 2, $form_name) . "<br>";
$sql = "select count(id) c,name from softwares ";
if (isset($data)) {
$sql .= " where (";
$first = 0;
$j = 0;
foreach ($data as $k => $v) {
$i = 0;
while ($v[$i]) {
$jonct = '';
if (($k == 'LIKE' or $k == '=') and $first != 0) {
$jonct = ' OR ';
$j++;
} elseif ($first != 0) {
if ($j != 0) {
$jonct = ') AND (';
示例12: msg_success
msg_success($msg['SUCCESS']);
$protectedPost['onglet'] = 1;
}
echo open_form($form_name);
show_tabs($data_on, $form_name, "onglet", 2);
echo '<div class="right-content mlt_bordure" >';
$table = "accountinfo";
if (isset($protectedPost['ACCOUNTINFO_CHOISE']) and $protectedPost['ACCOUNTINFO_CHOISE'] == 'SNMP' and $protectedPost['onglet'] == 1 or isset($protectedPost['accountinfo']) and $protectedPost['accountinfo'] == 'SNMP' and $protectedPost['onglet'] == 2) {
$array_tab_account = find_all_account_tab('TAB_ACCOUNTSNMP');
$account_field = "TAB_ACCOUNTSNMP";
} else {
$array_tab_account = find_all_account_tab('TAB_ACCOUNTAG');
$account_field = "TAB_ACCOUNTAG";
}
if ($protectedPost['onglet'] == 1) {
echo $l->g(56) . ": " . show_modif($accountinfo_choise, 'ACCOUNTINFO_CHOISE', 2, $form_name, array('DEFAULT' => "NO"));
if ($protectedPost['ACCOUNTINFO_CHOISE'] == "SNMP") {
$account_choise = "SNMP";
} else {
$account_choise = "COMPUTERS";
}
$tab_options['CACHE'] = 'RESET';
if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != '') {
$list = $protectedPost['del_check'];
$tab_values = explode(',', $list);
$i = 0;
while ($tab_values[$i]) {
del_accountinfo($tab_values[$i]);
$i++;
}
}
示例13: admin_profil
function admin_profil($form)
{
global $protectedPost, $l, $pages_refs;
$yes_no = array('YES' => $l->g(455), 'NO' => $l->g(454));
$info_field = array('NAME' => array('INFO' => array('LBL' => $l->g(1153) . ": ", 'VALUE' => '')), 'GUI' => array('RESTRICTION' => array('LBL' => $l->g(1154) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF_ACTIVATE' => array('RESTRICTION' => array('LBL' => $l->g(1158) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF_VISIBLE' => array('RESTRICTION' => array('LBL' => $l->g(1301) . ": ", 'VALUE' => $yes_no)), 'EXPORT_XML' => array('RESTRICTION' => array('LBL' => $l->g(1305), 'VALUE' => $yes_no)), 'WOL' => array('RESTRICTION' => array('LBL' => $l->g(1281) . ": ", 'VALUE' => $yes_no)), 'MACADD' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1159) . ": ", 'VALUE' => $yes_no)), 'SERIAL' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1160) . ": ", 'VALUE' => $yes_no)), 'IPDISCOVER' => array('ADMIN_BLACKLIST' => array('LBL' => $l->g(1161) . ": ", 'VALUE' => $yes_no), 'CONFIGURATION' => array('LBL' => $l->g(1172) . ": ", 'VALUE' => $yes_no)), 'TELEDIFF' => array('CONFIGURATION' => array('LBL' => $l->g(1162) . ": ", 'VALUE' => $yes_no)), 'CONFIG' => array('CONFIGURATION' => array('LBL' => $l->g(1163) . ": ", 'VALUE' => $yes_no)), 'GROUPS' => array('CONFIGURATION' => array('LBL' => $l->g(1164) . ": ", 'VALUE' => $yes_no)), 'CONSOLE' => array('CONFIGURATION' => array('LBL' => $l->g(1165) . ": ", 'VALUE' => $yes_no)), 'ALERTE_MSG' => array('CONFIGURATION' => array('LBL' => $l->g(1166) . ": ", 'VALUE' => $yes_no)), 'ACCOUNTINFO' => array('CONFIGURATION' => array('LBL' => $l->g(1167) . ": ", 'VALUE' => $yes_no)), 'CHANGE_ACCOUNTINFO' => array('CONFIGURATION' => array('LBL' => $l->g(1168) . ": ", 'VALUE' => $yes_no)), 'CHANGE_USER_GROUP' => array('CONFIGURATION' => array('LBL' => $l->g(1169) . ": ", 'VALUE' => $yes_no)), 'MANAGE_PROFIL' => array('CONFIGURATION' => array('LBL' => $l->g(1170) . ": ", 'VALUE' => $yes_no)), 'MANAGE_USER_GROUP' => array('CONFIGURATION' => array('LBL' => $l->g(1171) . ": ", 'VALUE' => $yes_no)), 'MANAGE_SMTP_COMMUNITIES' => array('CONFIGURATION' => array('LBL' => $l->g(1205) . ": ", 'VALUE' => $yes_no)), 'DELETE_COMPUTERS' => array('CONFIGURATION' => array('LBL' => $l->g(1272) . ": ", 'VALUE' => $yes_no)));
$lbl_cat = array('INFO' => $l->g(1173), 'PAGE_PROFIL' => $l->g(1174), 'RESTRICTION' => $l->g(1175), 'ADMIN_BLACKLIST' => $l->g(1176), 'CONFIGURATION' => $l->g(1177));
if ($protectedPost['Valid_modif_profil']) {
//read profil file
$forprofil = read_profil_file($protectedPost['PROFILS']);
//read all profil value
$forall = read_config_file();
//build new tab with new values
foreach ($info_field as $if_name => $if_value) {
foreach ($if_value as $if_cat => $if_val) {
if (isset($protectedPost[$if_name]) and $protectedPost['cat'] == $if_cat) {
$new_value[$if_cat][$if_name] = $protectedPost[$if_name];
} else {
$new_value[$if_cat][$if_name] = $forprofil[$if_cat][$if_name];
}
}
}
foreach ($forall['URL'] as $name => $value) {
if (isset($protectedPost[$name]) and $protectedPost['cat'] == "PAGE_PROFIL") {
$new_value["PAGE_PROFIL"][$name] = '';
}
}
if (!isset($new_value['PAGE_PROFIL'])) {
$new_value['PAGE_PROFIL'] = $forprofil['PAGE_PROFIL'];
}
update_config_file($protectedPost['PROFILS'], $new_value);
msg_success($l->g(1274));
}
$array_profil = get_profile_labels();
echo $l->g(1196) . ": " . show_modif($array_profil, "PROFILS", 2, $form);
echo "<a href=\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_new_profil'] . "&head=1&form=" . $form . "\"><img src=image/plus.png></a>";
if (isset($protectedPost['PROFILS']) and $protectedPost['PROFILS'] != '') {
$forall = read_config_file();
$forprofil = read_profil_file($protectedPost['PROFILS'], 'WRITE');
if (is_array($forprofil) and is_array($forall)) {
foreach ($forprofil as $key => $value) {
if (isset($lbl_cat[$key])) {
$data_on[$key] = $lbl_cat[$key];
}
}
onglet($data_on, $form, "cat", 10);
if (isset($forprofil[$protectedPost['cat']]) and $protectedPost['cat'] != 'PAGE_PROFIL') {
$name_field = array();
$type_field = array();
$tab_name = array();
$value_field = array();
foreach ($info_field as $if_name => $if_value) {
foreach ($if_value as $if_cat => $if_val) {
if ($protectedPost['cat'] == $if_cat) {
if (isset($forprofil[$if_cat][$if_name])) {
$protectedPost[$if_name] = $forprofil[$if_cat][$if_name];
}
array_push($name_field, $if_name);
array_push($tab_name, $if_val['LBL']);
if (is_array($if_val['VALUE'])) {
array_push($type_field, 2);
if (!isset($protectedPost[$if_name])) {
array_push($if_val['VALUE'], '');
}
array_push($value_field, $if_val['VALUE']);
} else {
array_push($type_field, 0);
array_push($value_field, replace_language($forprofil[$if_cat][$if_name]));
}
}
}
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, array('button_name' => 'modif_profil'));
} elseif ($protectedPost['cat'] == 'PAGE_PROFIL') {
$champs = "<table align=center><tr><td align=center>";
$i = 0;
ksort($forall['URL']);
foreach ($forall['URL'] as $key => $value) {
$champs .= "<input type='checkbox' name='" . $key . "' id='" . $key . "' ";
if (isset($forprofil[$protectedPost['cat']][$key])) {
$champs .= " checked ";
}
$champs .= " ></td><td>" . $key . "</td><td align=center>";
$i++;
if ($i == 4) {
$champs .= "</td></tr><tr><td align=center>";
$i = 0;
}
}
$champs .= "</td></tr></table>";
tab_modif_values($champs, array(), array(), array('button_name' => 'modif_profil'));
}
}
}
}
示例14: open_form
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
$form_name = "repart_tag";
$table_name = $form_name;
echo open_form($form_name);
if (!isset($protectedPost['TAG_CHOISE']) or $protectedPost['TAG_CHOISE'] == '') {
$protectedPost['TAG_CHOISE'] = 'a.TAG';
}
//BEGIN SHOW ACCOUNTINFO
require_once 'require/function_admininfo.php';
$accountinfo_value = interprete_accountinfo($list_fields, $tab_options);
$list_fields = $accountinfo_value['LIST_FIELDS'];
$list_fields_flip = array_flip($list_fields);
//END SHOW ACCOUNTINFO
echo $l->g(340) . " " . show_modif($list_fields_flip, 'TAG_CHOISE', 2, $form_name, array('DEFAULT' => "NO"));
if (isset($protectedPost['TAG_CHOISE'])) {
$tag = $protectedPost['TAG_CHOISE'];
}
if (array($accountinfo_value['TAB_OPTIONS'])) {
$tab_options['REPLACE_VALUE']['ID'] = $accountinfo_value['TAB_OPTIONS']['REPLACE_VALUE'][$list_fields_flip[$tag]];
}
unset($list_fields);
$list_fields['ID'] = 'ID';
$tab_options['LBL']['ID'] = $list_fields_flip[$tag];
$list_fields['Nbr_mach'] = 'c';
$tab_options['LIEN_LBL']['Nbr_mach'] = "index.php?" . PAG_INDEX . "=" . $pages_refs['ms_all_computers'] . "&filtre=" . $tag . "&value=";
$tab_options['LIEN_CHAMP']['Nbr_mach'] = "ID";
$tab_options['LBL']['Nbr_mach'] = $l->g(1120);
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
示例15: elseif
$tab_options['LBL']['SERIAL'] = $l->g(36);
} elseif ($protectedPost['onglet'] == 3) {
$table_name = "blacklist_subnet";
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
$list_fields = array('ID' => 'ID', 'SUBNET' => 'SUBNET', 'MASK' => 'MASK', 'SUP' => 'ID', 'CHECK' => 'ID');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$tab_options['FILTRE'] = array('SUBNET' => 'SUBNET', 'MASK' => 'MASK');
$tab_options['LBL_POPUP']['SUP'] = 'SUBNET';
$tab_options['LBL']['SUBNET'] = $l->g(2005);
} elseif ($protectedPost['onglet'] == 4) {
$list_action[1] = $l->g(95);
$list_action[2] = $l->g(36);
$list_action[3] = $l->g(2005);
echo "<p>" . $l->g(700) . ": " . show_modif($list_action, "BLACK_CHOICE", 2, $form_name) . "</p>";
if (isset($protectedPost['BLACK_CHOICE']) and $protectedPost['BLACK_CHOICE'] != '') {
$aff = "<table align=center><tr><td>";
if ($protectedPost['BLACK_CHOICE'] == 1) {
$aff .= $l->g(654) . ": </td><td>";
$aff = show_blacklist_fields($MACnb_field, $protectedPost, $MACfield_name, $MACnb_value_by_field, $MACsize, $MACseparat, $javascript_mac);
} elseif ($protectedPost['BLACK_CHOICE'] == 3) {
$aff .= $l->g(1142) . ": </td><td>";
$aff = show_blacklist_fields($SUBnb_field, $protectedPost, $SUBfield_name, $SUBnb_value_by_field, $SUBsize, $SUBseparat, $chiffres);
$aff .= $l->g(1143) . ": </td><td>";
$aff = show_blacklist_fields($MASKnb_field, $protectedPost, $MASKfield_name, $MASKnb_value_by_field, $MASKsize, $MASKseparat, $chiffres);
} elseif ($protectedPost['BLACK_CHOICE'] == 2) {
$aff .= $l->g(702) . ": </td><td>";
$aff = show_blacklist_fields($SERIALnb_field, $protectedPost, $SERIALfield_name, $SERIALnb_value_by_field, $SERIALsize, $SERIALseparat);
//$aff.="</td></tr>";
}