本文整理汇总了PHP中onglet函数的典型用法代码示例。如果您正苦于以下问题:PHP onglet函数的具体用法?PHP onglet怎么用?PHP onglet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了onglet函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: barre_onglets
function barre_onglets($rubrique, $ongletCourant, $class = "barre_onglet")
{
include_spip('inc/presentation');
$res = '';
foreach (definir_barre_onglets($rubrique) as $exec => $onglet) {
$url = $onglet->url ? $onglet->url : generer_url_ecrire($exec);
$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
}
return !$res ? '' : debut_onglet($class) . $res . fin_onglet();
}
示例2: ckeditor_barre_onglets
function ckeditor_barre_onglets($rubrique, $ongletCourant, $class="barre_onglet"){
include_spip('inc/presentation');
include_spip('inc/ckeditor_constantes') ;
$res = '';
$cpt = 0 ;
foreach(definir_barre_onglets($rubrique) as $exec => $onglet) {
if ($cpt==_CKE_MAX_ONGLETS) {
$cpt = 0 ;
$res .= '</tr><tr>' ;
} else {
$cpt++ ;
}
$url= $onglet->url ? $onglet->url : generer_url_ecrire($exec);
$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
}
return !$res ? '' : (debut_onglet($class) . $res . fin_onglet());
}
示例3: open_form
$list_alpha[$car] = $car;
if (!isset($first)) {
$first = $car;
}
}
}
if (!isset($list_alpha[$protectedPost['onglet']])) {
$protectedPost['onglet'] = $first;
}
$_SESSION['OCS']['REQ_ONGLET_SOFT'] = $sql_list_alpha;
$_SESSION['OCS']['ONGLET_SOFT'] = $list_alpha;
}
$form_name = "all_soft";
$table_name = "all_soft";
echo open_form($form_name);
onglet($_SESSION['OCS']['ONGLET_SOFT'], $form_name, "onglet", 20);
echo '<div class="mlt_bordure" >';
if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != "" or isset($protectedPost['NBRE']) and $protectedPost['NBRE'] != "") {
msg_warning($l->g(767));
}
//use cache
if ($_SESSION['OCS']["usecache"] == 1 and !(isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1)) {
$search_soft['SQL'] = "select name,id from softwares_name_cache";
//$forcedRequest['SQL']=$search_soft['SQL'];
$search_soft['SQL'] .= " where name like '%s'";
$search_soft['ARG'] = array($protectedPost['onglet'] . "%");
$and_where = " where ";
if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != "") {
//$forcedRequest['SQL'].= $and_where." name like '%s' ";
//$forcedRequest['ARG']=array("%".$protectedPost['NAME_RESTRICT']."%");
$search_soft['SQL'] .= " and name like '%s' ";
示例4: admin_plug_args
/**
* Affichage spécifique de la page de gestion des plugins
*
* Affiche la liste des plugins demandés et les erreurs éventuelles.
*
* @uses plugin_donne_erreurs()
* @uses liste_chemin_plugin()
* @uses plugin_installes_meta()
* @uses affiche_les_plugins_verrouilles()
*
* @pipeline_appel affiche_gauche
* @pipeline_appel affiche_droit
* @pipeline_appel affiche_milieu
*
* @param string $quoi
* Quels plugins afficher ? actifs, ou autre
* @param string $erreur
* Erreur éventuelle à afficher
* @param string $format
* Format d'affichage (liste ou arborescence)
**/
function admin_plug_args($quoi, $erreur, $format)
{
if (!$quoi) {
$quoi = 'actifs';
}
// empecher l'affichage des erreurs dans le bandeau, on le donne ensuite
// format brut par plugin
$GLOBALS['erreurs_activation_raw'] = plugin_donne_erreurs(true, false);
// format resume mis en forme
$erreur_activation = plugin_donne_erreurs();
$commencer_page = charger_fonction('commencer_page', 'inc');
echo $commencer_page(_T('icone_admin_plugin'), "configuration", "plugin");
echo debut_gauche('plugin', true);
echo recuperer_fond('prive/squelettes/navigation/configurer', array('exec' => 'admin_plugin'));
echo pipeline('affiche_gauche', array('args' => array('exec' => 'admin_plugin'), 'data' => afficher_librairies()));
echo debut_droite('plugin', true);
echo gros_titre(_T('icone_admin_plugin'), '', false);
// Barre d'onglets de premier niveau
echo barre_onglets("plugins", "plugins_actifs");
// Barre d'onglets de second niveau
$onglet2 = $quoi == 'actifs' ? 'plugins_actifs' : 'admin_plugin';
echo debut_onglet('onglets_simple second');
echo onglet(_T('plugins_tous_liste'), generer_url_ecrire("admin_plugin", "voir=tous"), 'admin_plugin', $onglet2);
echo onglet(_T('plugins_actifs_liste'), generer_url_ecrire("admin_plugin"), 'plugins_actifs', $onglet2);
echo fin_onglet();
// message d'erreur au retour d'une operation
if ($erreur) {
echo "<div class='error'>{$erreur}</div>";
}
if ($erreur_activation) {
echo "<div class='error'>{$erreur_activation}</div>";
}
// la mise a jour de cette meta a ete faite par ecrire_plugin_actifs
$actifs = unserialize($GLOBALS['meta']['plugin']);
$lcpa = $actifs + unserialize($GLOBALS['meta']['plugin_attente']);
// Les affichages se basent sur le repertoire, pas sur le nom
$actifs = liste_chemin_plugin($actifs, '');
if (defined('_DIR_PLUGINS_SUPPL')) {
$lcpas = liste_chemin_plugin($lcpa, _DIR_PLUGINS_SUPPL);
}
$lcpa = liste_chemin_plugin($lcpa);
// on installe les plugins maintenant,
// cela permet aux scripts d'install de faire des affichages (moches...)
plugin_installes_meta();
echo "<div class='liste-plugins formulaire_spip'>";
echo debut_cadre_trait_couleur('plugin-24.png', true, '', _T('plugins_liste'), 'plugins');
if ($quoi !== 'actifs') {
$lpf = liste_plugin_files();
if ($lpf) {
echo "<p>" . _T('texte_presente_plugin') . "</p>";
} else {
if (!@is_dir(_DIR_PLUGINS)) {
echo "<p>" . _T('plugin_info_automatique_ftp', array('rep' => joli_repertoire(_DIR_PLUGINS))) . " — " . _T('plugin_info_automatique_creer') . "</p>";
}
}
$lcpaffiche = $lpf;
if (defined('_DIR_PLUGINS_SUPPL')) {
$lcpaffichesup = liste_plugin_files(_DIR_PLUGINS_SUPPL);
}
} else {
// la liste
// $quoi=='actifs'
$lcpaffiche = $lcpa;
if (defined('_DIR_PLUGINS_SUPPL')) {
$lcpaffichesup = $lcpas;
}
}
if ($quoi == 'actifs' or $lpf) {
$nb = count($lcpa);
if (defined('_DIR_PLUGINS_SUPPL')) {
$nb += count($lcpas);
}
echo "<h3>" . sinon(singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), _T('plugins_actif_aucun')) . "</h3>";
}
if (empty($format)) {
$format = 'liste';
} elseif (!in_array($format, array('liste', 'repertoires'))) {
$format = 'repertoires';
}
//.........这里部分代码省略.........
示例5: open_form
$form_name = 'groups';
echo open_form($form_name);
//view all groups
if ($_SESSION['OCS']['CONFIGURATION']['GROUPS'] == "YES") {
$def_onglets['DYNA'] = $l->g(810);
//Dynamic group
$def_onglets['STAT'] = $l->g(809);
//Static group centraux
if ($_SESSION['OCS']["use_redistribution"] == 1) {
$def_onglets['SERV'] = mb_strtoupper($l->g(651));
}
if ($protectedPost['onglet'] == "") {
$protectedPost['onglet'] = "STAT";
}
//show onglet
onglet($def_onglets, $form_name, "onglet", 0);
echo '<div class="mlt_bordure" >';
} else {
$protectedPost['onglet'] = "STAT";
}
$list_fields = array('GROUP_NAME' => 'h.NAME', 'GROUP_ID' => 'h.ID', 'DESCRIPTION' => 'h.DESCRIPTION', 'CREATE' => 'h.LASTDATE', 'NBRE' => 'NBRE');
//only for admins
if ($_SESSION['OCS']['CONFIGURATION']['GROUPS'] == "YES") {
if ($protectedPost['onglet'] == "STAT") {
$list_fields['CHECK'] = 'ID';
}
$list_fields['SUP'] = 'ID';
$tab_options['LBL_POPUP']['SUP'] = 'NAME';
$tab_options['LBL']['SUP'] = $l->g(122);
}
//changement de nom � l'affichage des champs
示例6: find_new_order
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>";
} else {
$show_admin_button .= "<img src='image/modif_tab.png'></a>";
}
} else {
$show_admin_button = '';
}
$sql_admin_info = "select ID,TYPE,NAME,COMMENT,NAME_ACCOUNTINFO,SHOW_ORDER from accountinfo_config where ID_TAB = %s and account_type='SNMP'\n\t\t\t\t\t\torder by SHOW_ORDER ASC";
$arg_admin_info = array($protectedPost['onglet']);
$res_admin_info = mysql2_query_secure($sql_admin_info, $_SESSION['OCS']["readServer"], $arg_admin_info);
$num_row = mysqli_num_rows($res_admin_info);
示例7: dde_conf
function dde_conf($form_name)
{
global $l, $protectedPost, $protectedGet, $pages_refs, $infos_status;
if ($_SESSION['OCS']['CONFIGURATION']['TELEDIFF_WK'] == 'YES') {
//sous onglets
if ($infos_status['NIV_BIS'] != '') {
$conf_value['GENERAL'] = $l->g(107);
$conf_value['GUI'] = $l->g(84);
}
$conf_value['STATUS'] = $l->g(1095);
//$conf_value['ADMIN']='Administration';
onglet($conf_value, $form_name, "conf", 7);
if ($protectedPost['Valid'] == $l->g(103)) {
$etat = verif_champ();
if ($etat == "") {
$MAJ = update_default_value($protectedPost);
} else {
$msg = "";
foreach ($etat as $name => $value) {
$msg .= $name . " " . $l->g(759) . " " . $value . "<br>";
}
msg_error($msg);
}
}
if (!isset($protectedPost['conf']) or $protectedPost['conf'] == "GENERAL") {
pageTELEDIFF_WK($form_name);
}
if ($protectedPost['conf'] == "GUI") {
//mise a jour des données demandée par l'utilisateur
if ($protectedPost['Valid_fields_x'] != "") {
//si la mise a jour est limitée à certain champs
if (isset($protectedPost['DEFAULT_FIELD'])) {
$fields = explode(',', $protectedPost['DEFAULT_FIELD']);
} else {
$fields = array('type', 'field', 'lbl', 'must_completed', 'value', 'restricted', 'link_status');
//si le type est TEXTAREA, il faut aussi changer le type de la colonne en longtext
if ($protectedPost['type'] == 1) {
$type_modif = "longtext";
} else {
$type_modif = "varchar(255)";
}
$sql_modify_type = 'ALTER TABLE downloadwk_pack change
fields_%1$s
fields_%1$s ' . $type_modif . ' default null;';
$arg = array($protectedPost['FIELDS']);
mysql2_query_secure($sql_modify_type, $_SESSION['OCS']["writeServer"], $arg);
//echo $sql_modify_type;
}
//création de la requête
$sql_update = 'UPDATE downloadwk_fields
set ';
$arg = array();
foreach ($fields as $key => $value) {
$sql_update .= $value . "='%s' ,";
$arg[] = $protectedPost[$value];
}
$sql_update = substr($sql_update, 0, -1) . "where id='%s'";
$arg[] = $protectedPost['FIELDS'];
mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"], $arg);
//print_r
//echo $sql_update;
}
$sql_service = "select id,field,value,lbl,default_field \n\t\t\t\t\t\t\t FROM downloadwk_tab_values";
$resultSERV = mysql2_query_secure($sql_service, $_SESSION['OCS']["readServer"]);
$List_tab[] = '';
while ($item = mysql_fetch_object($resultSERV)) {
$lbl = define_lbl($item->lbl, $item->default_field);
$List_tab[$item->id] = $lbl;
}
$name_field = array("TAB");
//$oblig_field['INFO_VALID']=$name_field['INFO_VALID'];
$tab_name = array($l->g(1097) . ":");
$type_field = array(2);
$value_field = array($List_tab);
if (isset($protectedPost['TAB']) and $protectedPost['TAB'] != 0) {
$sql_service = "select id,lbl,default_field \n\t\t\t\t\t\t\t\t FROM downloadwk_fields \n\t\t\t\t\t\t\t\t where TAB='%s'";
$arg = array($protectedPost['TAB']);
$resultSERV = mysql2_query_secure($sql_service, $_SESSION['OCS']["readServer"], $arg);
$List_fields[] = '';
while ($item = mysql_fetch_object($resultSERV)) {
$lbl = define_lbl($item->lbl, $item->default_field);
$List_fields[$item->id] = $lbl;
$default_field[$item->id] = $item->default_field;
}
array_push($name_field, "FIELDS");
array_push($tab_name, $l->g(1096) . ":");
array_push($type_field, 2);
array_push($value_field, $List_fields);
}
$tab_typ_champ = show_field($name_field, $type_field, $value_field);
$tab_typ_champ[0]['COMMENT_BEHING'] = "<a href=# onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_admin_management'] . "&head=1&admin=tab&value=TAB&form=" . $form_name . "\",\"admin_management\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=550,height=450\")><img src=image/plus.png></a>";
$tab_typ_champ[0]['RELOAD'] = $form_name;
$tab_typ_champ[1]['RELOAD'] = $form_name;
$tab_typ_champ[1]['COMMENT_BEHING'] = "<a href=# onclick=window.open(\"index.php?" . PAG_INDEX . "=" . $pages_refs['ms_admin_management'] . "&head=1&admin=fields&value=" . $protectedPost['TAB'] . "&form=" . $form_name . "\",\"admin_management\",\"location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=700,height=650\")><img src=image/plus.png></a>";
tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, $title = "", $comment = "", $name_button = "modif", $showbutton = false, $form_name = 'NO_FORM');
if (isset($protectedPost['FIELDS']) and $protectedPost['FIELDS'] != 0) {
echo "<br>";
$sql_status = "SELECT id,lbl FROM downloadwk_statut_request";
$res_status = mysql2_query_secure($sql_status, $_SESSION['OCS']["readServer"]);
$status['0'] = $l->g(454);
//.........这里部分代码省略.........
示例8: controle_petition_onglet
function controle_petition_onglet($id_article, $debut, $type, $arg='')
{
$arg .= ($id_article ? "id_article=$id_article&" :'');
$arg2 = ($debut ? "debut=$debut&" : '');
if ($type=='public') {
$argp = $arg2;
$argi = '';
} else {
$argi = $arg2;
$argp = '';
}
return debut_onglet()
. onglet(_T('titre_signatures_confirmees'), generer_url_ecrire('controle_petition', $argp . $arg . "type=public"), "public", $type=='public', "forum-public-24.gif")
. onglet(_T('titre_signatures_attente'), generer_url_ecrire('controle_petition', $argi . $arg . "type=interne"), "interne", $type=='interne', "forum-interne-24.gif")
. fin_onglet()
. '<br />';
}
示例9: onglet
$i++;
}
}
//execute the query only if necessary
$_SESSION['OCS']['REQ_ONGLET_SOFT'] = $sql_list_alpha;
$_SESSION['OCS']['ONGLET_SOFT'] = $list_alpha;
$_SESSION['OCS']['FIRST_DICO'] = $first;
/* MG
}else{
$list_alpha=$_SESSION['OCS']['ONGLET_SOFT'];
}
*/
if (!isset($protectedPost['onglet_soft'])) {
$protectedPost['onglet_soft'] = $_SESSION['OCS']['FIRST_DICO'];
}
onglet($list_alpha, $form_name, "onglet_soft", 20);
//search all soft for the tab as selected
/* MG
$search_soft="select distinct name from ".$table." cache
where name like '".$_SESSION['OCS']['ONGLET_SOFT'][$protectedPost['onglet_soft']]."%'
and name not in (".$list_dico_soft.")
and name not in (".$list_ignored_soft.") ".$search_cache;
*/
$search_soft = "select distinct trim(name) name from " . $table . " cache\n where name like '" . $_SESSION['OCS']['ONGLET_SOFT'][$protectedPost['onglet_soft']] . "%'\n and name not in (select extracted name from dico_soft)\n and name not in (select extracted name from dico_ignored) " . $search_cache;
$result_search_soft = mysqli_query($_SESSION['OCS']["readServer"], $search_soft);
$list_soft = "'";
while ($item_search_soft = mysqli_fetch_object($result_search_soft)) {
$list_soft .= addslashes($item_search_soft->name) . "','";
}
$list_soft = substr($list_soft, 0, -2);
if ($list_soft == "") {
示例10: barre_onglets
function barre_onglets($rubrique, $ongletCourant){
$res = '';
foreach(definir_barre_onglets($rubrique) as $exec => $onglet) {
$url= $onglet->url ? $onglet->url : generer_url_ecrire($exec);
$res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone);
}
return !$res ? '' : (debut_onglet() . $res . fin_onglet());
}
示例11: barre_onglets
function barre_onglets()
{
// determiner les onglets a cacher et a mettre en surbrillance
if ($onglets = lister_onglets_cfg()) {
foreach ($onglets as $fonds => $ong) {
$o = $ong['onglet'];
// onglet actif
if ($o == 'oui') {
$ong['actif'] = $fonds == _request('cfg');
}
// rendre actif un parent si l'enfant est actif (onglet=nom_du_parent
// (/!\ ne pas le desactiver s'il a deja ete mis actif)
if ($o && $o != 'oui' && $o != 'non') {
if (!isset($onglets[$o])) {
$onglets[$o] = array();
}
if (!isset($onglets[$o]['enfant_actif'])) {
$onglets[$o]['enfant_actif'] = false;
}
$onglets[$o]['enfant_actif'] = ($onglets[$o]['enfant_actif'] or $fonds == _request('cfg'));
}
}
}
// retourner le code des onglets selectionnes
$res = "";
if ($onglets) {
$res = debut_onglet();
$n = -1;
foreach ($onglets as $titre => $args) {
if ($args['afficher']) {
// Faire des lignes s'il y en a effectivement plus de 6
if (!(++$n % 6) && $n > 0) {
$res .= fin_onglet() . debut_onglet();
}
$res .= onglet($args['titre'], $args['url'], 'cfg', $args['actif'] || $args['enfant_actif'], $args['icone']);
}
}
$res .= fin_onglet();
}
return $res;
}
示例12: unset
unset($list_lbl[$key]);
}
}
foreach ($list_lbl as $key => $value) {
if (substr($value, 0, 2) == 'g(') {
unset($list_lbl[$key]);
$list_lbl[$key] = $l->g(substr(substr($value, 2), 0, -1));
}
}
//par défaut, on affiche les données admininfo
/*if (!isset($protectedGet['option'])){
$protectedGet['option']="cd_admininfo";
}*/
echo "<br>";
echo open_form($form_name);
onglet($list_lbl, $form_name, "onglet_sd", 10);
$msq_tab_error = '<small>N/A</small>';
echo '<div class="mlt_bordure" >';
if (isset($list_lbl[$protectedPost['onglet_sd']])) {
if (file_exists($Directory . "/" . $protectedPost['onglet_sd'] . "/" . $protectedPost['onglet_sd'] . ".php")) {
// $protectedPost['computersectionrequest']=$protectedPost['onglet_sd'];
include $Directory . "/" . $protectedPost['onglet_sd'] . "/" . $protectedPost['onglet_sd'] . ".php";
}
}
echo "</div>";
echo close_form();
if ($ajax) {
ob_end_clean();
}
/*$i=0;
echo "<br><br><table width='90%' border=0 align='center'><tr align=center>";
示例13: open_form
$table_name = "registry";
echo open_form($form_name);
if (isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != '') {
$protectedPost['tab'] = 'ADD';
$sql = "select NAME,REGTREE,REGKEY,REGVALUE,ID from regconfig where id = '%s'";
$arg = $protectedPost['MODIF'];
//$sql="select NAME,ID,MASK from subnet where netid='".$netid."'";
$res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
$row = mysql_fetch_object($res);
$protectedPost['NAME'] = $row->NAME;
$protectedPost['REGTREE'] = $row->REGTREE;
$protectedPost['REGKEY'] = $row->REGKEY;
$protectedPost['REGVALUE'] = $row->REGVALUE;
$tab_hidden['id'] = $row->ID;
}
onglet($tab, $form_name, "tab", 4);
echo '<div class="mlt_bordure" >';
if ($protectedPost['tab'] == 'VIEW') {
// delete register key
if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '') {
// delete one row
delkey($protectedPost['SUP_PROF']);
$tab_options['CACHE'] = 'RESET';
} else {
if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != '') {
// delete multiple selected rows
$ids = explode(',', $protectedPost['del_check']);
foreach ($ids as $id) {
delkey($id);
}
$tab_options['CACHE'] = 'RESET';
示例14: 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'));
}
}
}
}
示例15: exec_controle_forum_args2
function exec_controle_forum_args2($id_rubrique, $type, $debut, $pas, $enplus, $recherche, $from, $where, $debut_id_forum)
{
// Si un id_controle_forum est demande, on adapte le debut
if ($debut_id_forum
AND (NULL !== ($d = sql_getfetsel('date_heure', 'spip_forum', "id_forum=$debut_id_forum")))) {
$debut = sql_countsel($from, $where . (" AND F.date_heure > '$d'"));
}
if ($recherche)
$args = 'recherche='.rawurlencode($recherche).'&';
else $args = '';
$args .= (!$id_rubrique ? "" : "id_rubrique=$id_rubrique&") . 'type=';
$query = array('SELECT' => "F.id_forum, F.id_parent, F.id_rubrique, F.id_article, F.id_breve, F.date_heure, F.titre, F.texte, F.auteur, F.email_auteur, F.nom_site, F.url_site, F.statut, F.ip, F.id_auteur",
'FROM' => $from,
'WHERE' => $where,
'GROUP BY' => "",
'ORDER BY' => "F.date_heure DESC");
$nav = affiche_navigation_forum($query, 'controle_forum', $args . $type, $debut, $pas, $enplus);
$select = sql_select($query['SELECT'], $query['FROM'], $query['WHERE'], $query['GROUP BY'], $query['ORDER BY'], $query['LIMIT']);
$res = '';
while ($row = sql_fetch($select))
$res .= controle_forum_boucle($row, "$args$type&debut=$debut");
$res = "<br />$nav<br />$res<br />$nav";
if (_AJAX) {
ajax_retour($res);
} else {
pipeline('exec_init',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>''));
$commencer_page = charger_fonction('commencer_page', 'inc');
echo $commencer_page(_T('titre_page_forum_suivi'), "forum", "forum-controle");
echo "<br /><br /><br />";
echo gros_titre(_T('titre_forum_suivi'),'',false);
echo debut_onglet();
echo onglet(_T('onglet_messages_publics'), generer_url_ecrire('controle_forum', $args . "public"), "public", $type=='public', "forum-public-24.gif");
echo onglet(_T('onglet_messages_internes'), generer_url_ecrire('controle_forum', $args . "interne"), "interne", $type=='interne', "forum-interne-24.gif");
list($from,$where) = critere_statut_controle_forum('vide', $id_rubrique);
$n = sql_fetsel('1', $from, $where);
if ($n) echo onglet(_T('onglet_messages_vide'), generer_url_ecrire('controle_forum', $args . "vide"), "vide", $type=='vide');
list($from,$where) = critere_statut_controle_forum('prop', $id_rubrique);
$f = sql_fetsel('1', $from, $where);
if ($f)
echo onglet(_T('texte_statut_attente_validation'), generer_url_ecrire('controle_forum', $args . "prop"), "prop", $type=='prop');
echo fin_onglet();
echo debut_gauche('', true);
echo debut_boite_info(true);
echo "<span class='verdana1 spip_small'>", _T('info_gauche_suivi_forum_2'), aide("suiviforum"), "</span>";
// Afficher le lien RSS
echo bouton_spip_rss("forums_$type");
echo fin_boite_info(true);
echo pipeline('affiche_gauche',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>''));
echo creer_colonne_droite('', true);
echo pipeline('affiche_droite',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>''));
echo debut_droite('', true);
echo pipeline('affiche_milieu',array('args'=>array('exec'=>'controle_forum', 'type'=>$type),'data'=>''));
echo formulaire_recherche("controle_forum","<input type='hidden' name='type' value='$type' />");
echo "<div class='nettoyeur'></div>";
echo "<div id='controle_forum' class='serif2'>", $res, "</div>";
echo fin_gauche(), fin_page();
}
}