/** * Loads spamcop settings and validates some of values (make '' into 'default', etc.) * * Internal function used to reduce size of setup.php * @since 1.5.1 * @access private */ function spamcop_load_function() { global $username, $data_dir, $spamcop_enabled, $spamcop_delete, $spamcop_save, $spamcop_method, $spamcop_id, $spamcop_quick_report, $spamcop_type; $spamcop_enabled = getPref($data_dir, $username, 'spamcop_enabled'); $spamcop_delete = getPref($data_dir, $username, 'spamcop_delete'); $spamcop_save = getPref($data_dir, $username, 'spamcop_save', true); $spamcop_method = getPref($data_dir, $username, 'spamcop_method'); $spamcop_type = getPref($data_dir, $username, 'spamcop_type'); $spamcop_id = getPref($data_dir, $username, 'spamcop_id'); if ($spamcop_method == '') { // Default to web_form. It is faster. $spamcop_method = 'web_form'; setPref($data_dir, $username, 'spamcop_method', $spamcop_method); } if (!$spamcop_quick_report && $spamcop_method == 'quick_email') { $spamcop_method = 'web_form'; setPref($data_dir, $username, 'spamcop_method', $spamcop_method); } if ($spamcop_type == '') { $spamcop_type = 'free'; setPref($data_dir, $username, 'spamcop_type', $spamcop_type); } if ($spamcop_id == '') { $spamcop_enabled = 0; } }
/** * @return array */ function Mail_Fetch_Servers() { global $data_dir, $username; $mailfetch = array(); $mailfetch['server_number'] = getPref($data_dir, $username, "mailfetch_server_number"); if (!isset($mailfetch['server_number']) || $mailfetch['server_number'] < 1) { $mailfetch['server_number'] = 0; } $mailfetch['cypher'] = getPref($data_dir, $username, "mailfetch_cypher"); for ($i = 0; $i < $mailfetch['server_number']; $i++) { $mailfetch[$i]['server'] = getPref($data_dir, $username, "mailfetch_server_{$i}"); $mailfetch[$i]['port'] = getPref($data_dir, $username, "mailfetch_port_{$i}"); $mailfetch[$i]['alias'] = getPref($data_dir, $username, "mailfetch_alias_{$i}"); $mailfetch[$i]['user'] = getPref($data_dir, $username, "mailfetch_user_{$i}"); $mailfetch[$i]['pass'] = getPref($data_dir, $username, "mailfetch_pass_{$i}"); if ($mailfetch['cypher'] == 'on') { $mailfetch[$i]['pass'] = decrypt($mailfetch[$i]['pass']); } if ($mailfetch[$i]['pass'] == '') { sqgetGlobalVar("pass_{$i}", $mailfetch[$i]['pass'], SQ_POST); } $mailfetch[$i]['lmos'] = getPref($data_dir, $username, "mailfetch_lmos_{$i}"); $mailfetch[$i]['login'] = getPref($data_dir, $username, "mailfetch_login_{$i}"); $mailfetch[$i]['uidl'] = getPref($data_dir, $username, "mailfetch_uidl_{$i}"); $mailfetch[$i]['subfolder'] = getPref($data_dir, $username, "mailfetch_subfolder_{$i}"); if ($mailfetch[$i]['alias'] == '') { $mailfetch[$i]['alias'] == $mailfetch[$i]['server']; } // Authentication type (added in 1.5.2) $mailfetch[$i]['auth'] = getPref($data_dir, $username, "mailfetch_auth_{$i}", MAIL_FETCH_AUTH_USER); // Connection type (added in 1.5.2) $mailfetch[$i]['type'] = getPref($data_dir, $username, "mailfetch_type_{$i}", MAIL_FETCH_USE_PLAIN); } return $mailfetch; }
/** * Function to save the identities array * * @param array $identities Array of identities */ function save_identities($identities) { global $username, $data_dir, $domain; if (empty($identities) || !is_array($identities)) { return; } $num_cur = getPref($data_dir, $username, 'identities'); $cnt = count($identities); // Remove any additional identities in prefs // for ($i = $cnt; $i <= $num_cur; $i++) { removePref($data_dir, $username, 'full_name' . $i); removePref($data_dir, $username, 'email_address' . $i); removePref($data_dir, $username, 'reply_to' . $i); setSig($data_dir, $username, $i, ''); } foreach ($identities as $id => $ident) { $key = $id ? $id : ''; setPref($data_dir, $username, 'full_name' . $key, $ident['full_name']); setPref($data_dir, $username, 'email_address' . $key, $ident['email_address']); setPref($data_dir, $username, 'reply_to' . $key, $ident['reply_to']); if ($id === 0) { setSig($data_dir, $username, 'g', $ident['signature']); } else { setSig($data_dir, $username, $key, $ident['signature']); } } setPref($data_dir, $username, 'identities', $cnt); }
function auto_cc_loading_prefs() { global $username, $data_dir; global $auto_cc_cc_addr; global $auto_cc_bcc_addr; $auto_cc_bcc_addr = getPref($data_dir, $username, "auto_cc_bcc_addr"); $auto_cc_cc_addr = getPref($data_dir, $username, "auto_cc_cc_addr"); }
/** * Recursively iterates a mailboxes object to build a data structure that is * easy for template authors to work with. FIXME: well.... why not document that data structure here? * * @param object $boxes Object of the class mailboxes * @author Steve Brown * @since 1.5.2 */ function getBoxStructure($boxes) { global $data_dir, $username, $icon_theme_path; // Stop condition if (empty($boxes)) { return array(); } $mailbox = $boxes->mailboxname_full; $mailboxURL = urlencode($mailbox); $box = array(); $box['MailboxFullName'] = $mailbox; $box['MailboxName'] = $boxes->mailboxname_sub; $box['MessageCount'] = !empty($boxes->total) ? $boxes->total : 0; $box['UnreadCount'] = !empty($boxes->unseen) ? $boxes->unseen : 0; // Needed in case user enables cummulative message counts $box['CummulativeMessageCount'] = getMessageCount($boxes, 'total'); $box['CummulativeUnreadCount'] = getMessageCount($boxes, 'unseen'); $box['ViewLink'] = array('Target' => 'right', 'URL' => 'right_main.php?PG_SHOWALL=0&startMessage=1&mailbox=' . $mailboxURL); $box['IsRecent'] = isset($boxes->recent) && $boxes->recent; $box['IsSpecial'] = isset($boxes->is_special) && $boxes->is_special; $box['IsRoot'] = isset($boxes->is_root) && $boxes->is_root; $box['IsNoSelect'] = isset($boxes->is_noselect) && $boxes->is_noselect; $box['IsInbox'] = isset($boxes->is_inbox) && $boxes->is_inbox; $box['IsSent'] = isset($boxes->is_sent) && $boxes->is_sent; $box['IsTrash'] = isset($boxes->is_trash) && $boxes->is_trash; $box['IsDraft'] = isset($boxes->is_draft) && $boxes->is_draft; $box['IsNoInferiors'] = isset($boxes->is_noinferiors) && $boxes->is_noinferiors; $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox); $collapse = $collapse == '' ? SM_BOX_UNCOLLAPSED : $collapse; $collapse = (int) $collapse == SM_BOX_COLLAPSED; $box['IsCollapsed'] = $collapse; /* * Check for an image needed here. If the file exists in $icon_theme_path * assume the template provides all icons. If not, we will use the * SQM default images. If icons have been disabled, $icon_theme_path * will be NULL. */ $text_icon = $box['IsCollapsed'] ? '+' : '-'; $icon_file = $box['IsCollapsed'] ? 'plus.png' : 'minus.png'; $icon_alt = $box['IsCollapsed'] ? 'Expand Box' : 'Collapse Box'; $icon = getIcon($icon_theme_path, $icon_file, $text_icon, $icon_alt); $box['CollapseLink'] = array('Target' => 'left', 'URL' => 'left_main.php?' . ($box['IsCollapsed'] ? 'unfold' : 'fold') . '=' . $mailboxURL, 'Icon' => $icon . ' '); $box['ChildBoxes'] = array(); for ($i = 0; $i < count($boxes->mbxs); $i++) { $box['ChildBoxes'][] = getBoxStructure($boxes->mbxs[$i]); } // if plugins want to add some text or link after the folder name in // the folder list, they should add to the "ExtraOutput" array element // in $box (remember, it's passed through the hook by reference) -- making // sure to play nice with other plugins by *concatenating* to "ExtraOutput" // and NOT by overwriting it // // known users of this hook: // empty_folders // do_hook('left_main_after_each_folder', $box); return $box; }
/** * Register bug report option block * * @since 1.4.14 * * @access private * */ function bug_report_block_do() { global $username, $data_dir, $optpage_data, $bug_report_visible; $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible', FALSE); $optpage_data['grps']['bug_report'] = _("Bug Reports"); $optionValues = array(); $optionValues[] = array('name' => 'bug_report_visible', 'caption' => _("Show button in toolbar"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_ALL, 'initial_value' => false); $optpage_data['vals']['bug_report'] = $optionValues; }
function getMailerDelim() { global $mailers; if (getPref('mailer') == 'colon') { return ","; } else { // return ";"; return "%3B"; } }
/** * Add fortune options * @access private */ function fortune_show_options() { global $optpage_data, $username, $data_dir, $fortune_visible; $fortune_visible = getPref($data_dir, $username, 'fortune_visible'); $optgrp = _("Fortunes"); $optvals = array(); $optvals[] = array('name' => 'fortune_visible', 'caption' => _("Show fortunes at top of mailbox"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_NONE); $optpage_data['grps']['fortune'] = $optgrp; $optpage_data['vals']['fortune'] = $optvals; }
/** * Show fortune * @access private */ function fortune() { global $fortune_visible, $username, $data_dir; $fortune_visible = getPref($data_dir, $username, 'fortune_visible'); // Don't show fortune if not enabled if (empty($fortune_visible)) { return; } include_once SM_PATH . 'plugins/fortune/fortune_functions.php'; fortune_show(); }
function get_tab_car_spec_cdt2() { $tab_car_spec = array(); $cdt2_car_spec_liste = getPref($_SESSION['login'], "cdt2_car_spec_liste", ""); if ($cdt2_car_spec_liste != "") { $tab = explode(';', $cdt2_car_spec_liste); for ($loop = 0; $loop < count($tab); $loop++) { $tab_car_spec[] = $tab[$loop] . ";"; } } return $tab_car_spec; }
/** * Returns an array of all the identities. * Array is keyed: full_name, reply_to, email_address, index, signature * @return array full_name,reply_to,email_address,index,signature */ function get_identities() { global $username, $data_dir; $num_ids = getPref($data_dir, $username, 'identities'); $identities = array(); /* We always have this one, even if the user doesn't use multiple identities */ $identities[] = array('full_name' => getPref($data_dir, $username, 'full_name'), 'email_address' => getPref($data_dir, $username, 'email_address'), 'reply_to' => getPref($data_dir, $username, 'reply_to'), 'signature' => getSig($data_dir, $username, 'g'), 'index' => 0); /* If there are any others, add them to the array */ if (!empty($num_ids) && $num_ids > 1) { for ($i = 1; $i < $num_ids; $i++) { $identities[] = array('full_name' => getPref($data_dir, $username, 'full_name' . $i), 'email_address' => getPref($data_dir, $username, 'email_address' . $i), 'reply_to' => getPref($data_dir, $username, 'reply_to' . $i), 'signature' => getSig($data_dir, $username, $i), 'index' => $i); } } return $identities; }
/** * Get current list of subscribed non-RFC-compliant mailing lists for logged-in user * * @return array The list of mailing list addresses, keyed by integer index */ function get_non_rfc_lists() { global $username, $data_dir; $lists = getPref($data_dir, $username, 'non_rfc_lists', array()); $new_lists = array(); if (!empty($lists)) { $lists = explode(':', $lists); foreach ($lists as $list) { list($index, $list_addr) = explode('_', $list); if ((!empty($index) || $index === '0') && !empty($list_addr)) { $new_lists[$index] = $list_addr; } } } $lists = $new_lists; sort($lists); return $lists; }
function checkForJavascript($reset = FALSE) { global $data_dir, $username, $javascript_on, $javascript_setting; if (!$reset && sqGetGlobalVar('javascript_on', $javascript_on, SQ_SESSION)) { return $javascript_on; } if (($reset || !isset($javascript_setting)) && (sqGetGlobalVar('user_is_logged_in', $user_is_logged_in, SQ_SESSION) && $user_is_logged_in)) { $javascript_setting = getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT); } if (!sqGetGlobalVar('new_js_autodetect_results', $js_autodetect_results) && !sqGetGlobalVar('js_autodetect_results', $js_autodetect_results)) { $js_autodetect_results = SMPREF_JS_OFF; } if ($javascript_setting == SMPREF_JS_AUTODETECT) { $javascript_on = $js_autodetect_results; } else { $javascript_on = $javascript_setting; } sqsession_register($javascript_on, 'javascript_on'); return $javascript_on; }
function spamcop_load() { global $username, $data_dir, $spamcop_enabled, $spamcop_delete, $spamcop_method, $spamcop_id, $spamcop_quick_report; $spamcop_enabled = getPref($data_dir, $username, 'spamcop_enabled'); $spamcop_delete = getPref($data_dir, $username, 'spamcop_delete'); $spamcop_method = getPref($data_dir, $username, 'spamcop_method'); $spamcop_id = getPref($data_dir, $username, 'spamcop_id'); if ($spamcop_method == '') { // This variable is not used // if (getPref($data_dir, $username, 'spamcop_form')) // $spamcop_method = 'web_form'; // else // Default to web_form. It is faster. $spamcop_method = 'web_form'; setPref($data_dir, $username, 'spamcop_method', $spamcop_method); } if (!$spamcop_quick_report && $spamcop_method == 'quick_email') { $spamcop_method = 'web_form'; setPref($data_dir, $username, 'spamcop_method', $spamcop_method); } if ($spamcop_id == '') { $spamcop_enabled = 0; } }
/** * This function builds an array with all the information about * the options available to the user, and returns it. The options * are grouped by the groups in which they are displayed. * For each option, the following information is stored: * - name: the internal (variable) name * - caption: the description of the option in the UI * - type: one of SMOPT_TYPE_* * - refresh: one of SMOPT_REFRESH_* * - size: one of SMOPT_SIZE_* * - save: the name of a function to call when saving this option * @return array all option information */ function load_optpage_data_personal() { global $data_dir, $username, $edit_identity, $edit_name, $edit_reply_to, $full_name, $reply_to, $email_address, $signature, $tzChangeAllowed, $timeZone, $domain; /* Set the values of some global variables. */ $full_name = getPref($data_dir, $username, 'full_name'); $reply_to = getPref($data_dir, $username, 'reply_to'); $email_address = getPref($data_dir, $username, 'email_address', SMPREF_NONE); $signature = getSig($data_dir, $username, 'g'); // set email_address to default value, if it is not set in user's preferences if ($email_address == SMPREF_NONE) { if (preg_match("/(.+)@(.+)/", $username)) { $email_address = $username; } else { $email_address = $username . '@' . $domain; } } /* Build a simple array into which we will build options. */ $optgrps = array(); $optvals = array(); /******************************************************/ /* LOAD EACH GROUP OF OPTIONS INTO THE OPTIONS ARRAY. */ /******************************************************/ /*** Load the Contact Information Options into the array ***/ $optgrps[SMOPT_GRP_CONTACT] = _("Name and Address Options"); $optvals[SMOPT_GRP_CONTACT] = array(); /* Build a simple array into which we will build options. */ $optvals = array(); if (!isset($edit_identity)) { $edit_identity = TRUE; } if ($edit_identity || $edit_name) { $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'full_name', 'caption' => _("Full Name"), 'type' => SMOPT_TYPE_STRING, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_HUGE); } else { $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'full_name', 'caption' => _("Full Name"), 'type' => SMOPT_TYPE_COMMENT, 'refresh' => SMOPT_REFRESH_NONE, 'comment' => $full_name); } if ($edit_identity) { $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'email_address', 'caption' => _("E-mail Address"), 'type' => SMOPT_TYPE_STRING, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_HUGE); } else { $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'email_address', 'caption' => _("E-mail Address"), 'type' => SMOPT_TYPE_COMMENT, 'refresh' => SMOPT_REFRESH_NONE, 'comment' => sm_encode_html_special_chars($email_address)); } if ($edit_identity || $edit_reply_to) { $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'reply_to', 'caption' => _("Reply To"), 'type' => SMOPT_TYPE_STRING, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_HUGE); } else { //TODO: For many users, this is redundant to the email address above, especially if not editable -- so here instead of a comment, we could just hide it... in fact, that's what we'll do, but keep this code for posterity in case someone decides we shouldn't do this /* $optvals[SMOPT_GRP_CONTACT][] = array( 'name' => 'reply_to', 'caption' => _("Reply To"), 'type' => SMOPT_TYPE_COMMENT, 'refresh' => SMOPT_REFRESH_NONE, 'comment' => sm_encode_html_special_chars($reply_to), ); */ } $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'signature', 'caption' => _("Signature"), 'type' => SMOPT_TYPE_TEXTAREA, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_MEDIUM, 'save' => 'save_option_signature'); if ($edit_identity) { $identities_link_value = '<a href="options_identities.php">' . _("Edit Advanced Identities") . '</a> ' . _("(discards changes made on this form so far)"); $optvals[SMOPT_GRP_CONTACT][] = array('name' => 'identities_link', 'caption' => _("Multiple Identities"), 'type' => SMOPT_TYPE_COMMENT, 'refresh' => SMOPT_REFRESH_NONE, 'comment' => $identities_link_value); } if ($tzChangeAllowed || function_exists('date_default_timezone_set')) { $TZ_ARRAY[SMPREF_NONE] = _("Same as server"); $aTimeZones = sq_get_tz_array(); unset($message); if (!empty($aTimeZones)) { // check if current timezone is linked to other TZ and update it if ($timeZone != SMPREF_NONE && $timeZone != "" && isset($aTimeZones[$timeZone]['LINK'])) { $timeZone = $aTimeZones[$timeZone]['LINK']; // TODO: recheck setting of $timeZone // setPref($data_dir,$username,'timezone',$timeZone); } // sort time zones by name. sq_get_tz_array() returns sorted by key. // asort($aTimeZones); // add all 'TZ' entries to TZ_ARRAY foreach ($aTimeZones as $TzKey => $TzData) { if (!isset($TzData['LINK'])) { // Old display format $TZ_ARRAY[$TzKey] = $TzKey; // US Eastern standard time (America/New_York) - needs asort($aTimeZones) //$TZ_ARRAY[$TzKey] = (isset($TzData['NAME']) ? $TzData['NAME']." ($TzKey)" : "($TzKey)"); // US Eastern standard time if NAME is present or America/New_York if NAME not present // needs sorting after all data is added or uasort() //$TZ_ARRAY[$TzKey] = (isset($TzData['NAME']) ? $TzData['NAME'] : $TzKey); // (America/New_Your) US Eastern standard time //$TZ_ARRAY[$TzKey] = "($TzKey)" . (isset($TzData['NAME']) ? ' '.$TzData['NAME'] : ''); } } } else { $message = _("Error opening timezone config, contact administrator."); } // TODO: make error user friendly if (isset($message)) { plain_error_message($message); exit; } $optgrps[SMOPT_GRP_TZ] = _("Timezone Options"); $optvals[SMOPT_GRP_TZ] = array(); $optvals[SMOPT_GRP_TZ][] = array('name' => 'timezone', 'caption' => _("Your current timezone"), 'type' => SMOPT_TYPE_STRLIST, 'refresh' => SMOPT_REFRESH_NONE, 'posvals' => $TZ_ARRAY); } /*** Load the Reply Citation Options into the array ***/ $optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options"); $optvals[SMOPT_GRP_REPLY] = array(); $optvals[SMOPT_GRP_REPLY][] = array('name' => 'reply_citation_style', 'caption' => _("Reply Citation Style"), 'type' => SMOPT_TYPE_STRLIST, 'refresh' => SMOPT_REFRESH_NONE, 'posvals' => array(SMPREF_NONE => _("No Citation"), 'author_said' => _("AUTHOR Wrote"), 'date_time_author' => _("On DATE, AUTHOR Wrote"), 'quote_who' => _("Quote Who XML"), 'user-defined' => _("User-Defined"))); $optvals[SMOPT_GRP_REPLY][] = array('name' => 'reply_citation_start', 'caption' => _("User-Defined Citation Start"), 'type' => SMOPT_TYPE_STRING, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_MEDIUM); $optvals[SMOPT_GRP_REPLY][] = array('name' => 'reply_citation_end', 'caption' => _("User-Defined Citation End"), 'type' => SMOPT_TYPE_STRING, 'refresh' => SMOPT_REFRESH_NONE, 'size' => SMOPT_SIZE_MEDIUM); /*** Load the Signature Options into the array ***/ $optgrps[SMOPT_GRP_SIG] = _("Signature Options"); $optvals[SMOPT_GRP_SIG] = array(); $optvals[SMOPT_GRP_SIG][] = array('name' => 'use_signature', 'caption' => _("Use Signature"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_NONE); $optvals[SMOPT_GRP_SIG][] = array('name' => 'prefix_sig', 'caption' => _("Prefix Signature with '-- ' Line"), 'type' => SMOPT_TYPE_BOOLEAN, 'refresh' => SMOPT_REFRESH_NONE); /* Assemble all this together and return it as our result. */ $result = array('grps' => $optgrps, 'vals' => $optvals); return $result; }
/** * Report spam folder as special mailbox * @param string $mb variable used by hook * @return string spam folder name * @access private */ function filters_special_mailbox($mb) { global $data_dir, $username; return $mb == getPref($data_dir, $username, 'filters_spam_folder', 'na'); }
protected function discipline() { global $mod_disc_terme_incident, $gepiPath; $this->b = 0; /* if(($_SESSION['statut']=='eleve')) { if(getSettingValue('visuEleDisc')=='y') { $this->creeNouveauItem("/mod_discipline/visu_disc.php", "Discipline", "Incidents vous concernant."); } } elseif(($_SESSION['statut']=='responsable')) { if(getSettingValue('visuRespDisc')=='y') { $this->creeNouveauItem("/mod_discipline/visu_disc.php", "Discipline", "Incidents concernant les élèves/enfants dont vous êtes responsable."); } } else { */ $temoin_disc = ""; $cpt_disc = get_temoin_discipline_personnel(); if ($cpt_disc > 0) { $DiscTemoinIncidentTaille = getPref($_SESSION['login'], 'DiscTemoinIncidentTaille', 16); $temoin_disc = " <img src='{$gepiPath}/images/icons/flag2.gif' width='{$DiscTemoinIncidentTaille}' height='{$DiscTemoinIncidentTaille}' title=\"Un ou des " . $mod_disc_terme_incident . "s ({$cpt_disc}) ont été saisis dans les dernières 24h ou depuis votre dernière connexion.\" />"; } $this->creeNouveauItem("/mod_discipline/index.php", "Discipline" . $temoin_disc, "Signaler des incidents, prendre des mesures, des sanctions."); //} if ($this->b > 0) { $this->creeNouveauTitre('accueil', "Discipline", 'images/icons/document.png'); return true; } }
<?php } ?> <br /> <?php } ?> </td> <?php } ?> <td> <?php //echo "Travail : <textarea name='travail_pour_mesure_demandee_".$i."' id='travail_pour_mesure_demandee_".$i."' cols='30'>Nature du travail pour la mesure demandée</textarea>\n"; $texte_travail = "Travail : "; $tmp_pref_texte_travail = getPref($_SESSION['login'], 'mod_discipline_travail_par_defaut', ''); if ($tmp_pref_texte_travail != '') { $texte_travail = $tmp_pref_texte_travail; } elseif (getSettingValue('mod_discipline_travail_par_defaut') != '') { $texte_travail = getSettingValue('mod_discipline_travail_par_defaut'); } $sql = "SELECT * FROM s_travail_mesure WHERE id_incident='{$id_incident}' AND login_ele='" . $ele_login[$i] . "';"; $res_travail_mesure_demandee = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($res_travail_mesure_demandee) > 0) { $lig_travail_mesure_demandee = mysqli_fetch_object($res_travail_mesure_demandee); $texte_travail = $lig_travail_mesure_demandee->travail; } ?> <textarea name='no_anti_inject_travail_pour_mesure_demandee_<?php echo $i; ?>
if (isset($filters_spam_scan_set)) { setPref($data_dir, $username, 'filters_spam_scan', $filters_spam_scan_set); } else { echo _("You must select a scan type."); } foreach ($spam_filters as $Key => $Value) { $input = $spam_filters[$Key]['prefname'] . '_set'; if (sqgetGlobalVar($input, $input_key, SQ_POST)) { setPref($data_dir, $username, $spam_filters[$Key]['prefname'], $input_key); } else { removePref($data_dir, $username, $spam_filters[$Key]['prefname']); } } } $filters_spam_folder = getPref($data_dir, $username, 'filters_spam_folder'); $filters_spam_scan = getPref($data_dir, $username, 'filters_spam_scan'); $filters = load_filters(); echo html_tag('table', html_tag('tr', html_tag('th', _("Spam Filtering"), 'center')), 'center', $color[0], 'width="95%" border="0" cellpadding="2" cellspacing="0"'); if ($SpamFilters_YourHop == ' ') { echo '<br />' . html_tag('div', '<b>' . sprintf(_("WARNING! Tell the administrator to set the %s variable."), '"SpamFilters_YourHop"') . '</b>', 'center') . '<br />'; } if (isset($action) && $action == 'spam') { $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); $numboxes = count($boxes); for ($i = 0; $i < $numboxes && $filters_spam_folder == ''; $i++) { if (isset($boxes[$i]['flags'][0]) && $boxes[$i]['flags'][0] != 'noselect' && (isset($boxes[$i]['flags'][1]) && $boxes[$i]['flags'][1] != 'noselect') && (isset($boxes[$i]['flags'][2]) && $boxes[$i]['flags'][2] != 'noselect')) { $filters_spam_folder = $boxes[$i]['unformatted']; } }
function getSig($data_dir, $username, $number) { if ($number == "g") { $key = '___signature___'; } else { $key = sprintf('___sig%d___', $number); } return getPref($data_dir, $username, $key); }
function sqimap_get_small_header_list($imap_stream, $msg_list) { global $squirrelmail_language, $color, $data_dir, $username, $imap_server_type; global $uid_support, $allow_server_sort; /* Get the small headers for each message in $msg_list */ $sid = sqimap_session_id($uid_support); $maxmsg = sizeof($msg_list); $msgs_str = sqimap_message_list_squisher($msg_list); $messages = array(); $read_list = array(); /* * We need to return the data in the same order as the caller supplied * in $msg_list, but IMAP servers are free to return responses in * whatever order they wish... So we need to re-sort manually */ for ($i = 0; $i < sizeof($msg_list); $i++) { $id2index[$msg_list[$i]] = $i; } $internaldate = getPref($data_dir, $username, 'internal_date_sort'); if ($internaldate) { $query = "{$sid} FETCH {$msgs_str} (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Content-Type)])\r\n"; } else { $query = "{$sid} FETCH {$msgs_str} (FLAGS UID RFC822.SIZE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Content-Type)])\r\n"; } fputs($imap_stream, $query); $readin_list = sqimap_read_data_list($imap_stream, $sid, false, $response, $message); $i = 0; foreach ($readin_list as $r) { if (!$uid_support) { if (!preg_match("/^\\*\\s+([0-9]+)\\s+FETCH/iAU", $r[0], $regs)) { set_up_language($squirrelmail_language); echo '<br><b><font color=$color[2]>' . _("ERROR : Could not complete request.") . '</b><br>' . _("Unknown response from IMAP server: ") . ' 1.' . htmlspecialchars($r[0]) . "</font><br>\n"; } else { if (!isset($id2index[$regs[1]]) || !count($id2index[$regs[1]])) { set_up_language($squirrelmail_language); echo '<br><b><font color=$color[2]>' . _("ERROR : Could not complete request.") . '</b><br>' . _("Unknown message number in reply from server: ") . htmlspecialchars($regs[1]) . "</font><br>\n"; } else { $read_list[$id2index[$regs[1]]] = $r; } } } else { if (!preg_match("/^\\*\\s+([0-9]+)\\s+FETCH.*UID\\s+([0-9]+)\\s+/iAU", $r[0], $regs)) { set_up_language($squirrelmail_language); echo '<br><b><font color=$color[2]>' . _("ERROR : Could not complete request.") . '</b><br>' . _("Unknown response from IMAP server: ") . ' 1.' . htmlspecialchars($r[0]) . "</font><br>\n"; } else { if (!isset($id2index[$regs[2]]) || !count($id2index[$regs[2]])) { set_up_language($squirrelmail_language); echo '<br><b><font color=$color[2]>' . _("ERROR : Could not complete request.") . '</b><br>' . _("Unknown message number in reply from server: ") . htmlspecialchars($regs[2]) . "</font><br>\n"; } else { $read_list[$id2index[$regs[2]]] = $r; $unique_id = $regs[2]; } } } } arsort($read_list); $patterns = array("/^To:(.*)\$/AUi", "/^From:(.*)\$/AUi", "/^X-Priority:(.*)\$/AUi", "/^Cc:(.*)\$/AUi", "/^Date:(.*)\$/AUi", "/^Subject:(.*)\$/AUi", "/^Content-Type:(.*)\$/AUi"); $regpattern = ''; for ($msgi = 0; $msgi < $maxmsg; $msgi++) { $subject = _("(no subject)"); $from = _("Unknown Sender"); $priority = 0; $messageid = '<>'; $cc = $to = $date = $type[0] = $type[1] = $inrepto = ''; $flag_seen = $flag_answered = $flag_deleted = $flag_flagged = false; $read = $read_list[$msgi]; $prevline = false; foreach ($read as $read_part) { //unfold multi-line headers if ($prevline && $prevline[strlen($prevline) - 1] == "\n" && ($read_part[0] == ' ' || $read_part[0] == "\t")) { $read_part = substr($prevline, 0, -2) . preg_replace('/(\\t\\s+)/', ' ', $read_part); } $prevline = $read_part; if ($read_part[0] == '*') { if ($internaldate) { if (preg_match("/^.+INTERNALDATE\\s+\"(.+)\".+/iUA", $read_part, $reg)) { $tmpdate = trim($reg[1]); $tmpdate = str_replace(' ', ' ', $tmpdate); $tmpdate = explode(' ', $tmpdate); $date = str_replace('-', ' ', $tmpdate[0]) . " " . $tmpdate[1] . ' ' . $tmpdate[2]; } } if (preg_match("/^.+RFC822.SIZE\\s+(\\d+).+/iA", $read_part, $reg)) { $size = $reg[1]; } if (preg_match("/^.+FLAGS\\s+\\((.*)\\).+/iUA", $read_part, $regs)) { $flags = explode(' ', trim($regs[1])); foreach ($flags as $flag) { $flag = strtolower($flag); if ($flag == '\\seen') { $flag_seen = true; } else { if ($flag == '\\answered') { $flag_answered = true; } else { if ($flag == '\\deleted') { $flag_deleted = true; } else { if ($flag == '\\flagged') { $flag_flagged = true; } } } } } } if (preg_match("/^.+UID\\s+(\\d+).+/iA", $read_part, $reg)) { $unique_id = $reg[1]; } } else { $firstchar = strtoupper($read_part[0]); if ($firstchar == 'T') { $regpattern = $patterns[0]; $id = 1; } else { if ($firstchar == 'F') { $regpattern = $patterns[1]; $id = 2; } else { if ($firstchar == 'X') { $regpattern = $patterns[2]; $id = 3; } else { if ($firstchar == 'C') { if (strtolower($read_part[1]) == 'c') { $regpattern = $patterns[3]; $id = 4; } else { if (strtolower($read_part[1]) == 'o') { $regpattern = $patterns[6]; $id = 7; } } } else { if ($firstchar == 'D' && !$internaldate) { $regpattern = $patterns[4]; $id = 5; } else { if ($firstchar == 'S') { $regpattern = $patterns[5]; $id = 6; } else { $regpattern = ''; } } } } } } if ($regpattern) { if (preg_match($regpattern, $read_part, $regs)) { switch ($id) { case 1: $to = trim($regs[1]); break; case 2: $from = trim($regs[1]); break; case 3: $priority = $regs[1]; break; case 4: $cc = trim($regs[1]); break; case 5: $date = $regs[1]; break; case 6: $subject = trim($regs[1]); if ($subject == "") { $subject = _("(no subject)"); } break; case 7: $type = strtolower(trim($regs[1])); if ($pos = strpos($type, ";")) { $type = substr($type, 0, $pos); } $type = explode("/", $type); if (!is_array($type)) { $type[0] = 'text'; } if (!isset($type[1])) { $type[1] = ''; } break; default: break; } } } } } if (isset($date)) { $date = str_replace(' ', ' ', $date); $tmpdate = explode(' ', trim($date)); } else { $tmpdate = $date = array('', '', '', '', '', ''); } if ($uid_support) { $messages[$msgi]['ID'] = $unique_id; } else { $messages[$msgi]['ID'] = $msg_list[$msgi]; } $messages[$msgi]['TIME_STAMP'] = getTimeStamp($tmpdate); $messages[$msgi]['DATE_STRING'] = getDateString($messages[$msgi]['TIME_STAMP']); $messages[$msgi]['FROM'] = parseAddress($from); $messages[$msgi]['SUBJECT'] = $subject; // if (handleAsSent($mailbox)) { $messages[$msgi]['TO'] = parseAddress($to); // } $messages[$msgi]['PRIORITY'] = $priority; $messages[$msgi]['CC'] = parseAddress($cc); $messages[$msgi]['SIZE'] = $size; $messages[$msgi]['TYPE0'] = $type[0]; $messages[$msgi]['FLAG_DELETED'] = $flag_deleted; $messages[$msgi]['FLAG_ANSWERED'] = $flag_answered; $messages[$msgi]['FLAG_SEEN'] = $flag_seen; $messages[$msgi]['FLAG_FLAGGED'] = $flag_flagged; /* non server sort stuff */ if (!$allow_server_sort) { $from = parseAddress($from); if ($from[0][1]) { $from = decodeHeader($from[0][1]); } else { $from = $from[0][0]; } $messages[$msgi]['FROM-SORT'] = $from; $subject_sort = strtolower(decodeHeader($subject)); if (preg_match("/^(vedr|sv|re|aw):\\s*(.*)\$/si", $subject_sort, $matches)) { $messages[$msgi]['SUBJECT-SORT'] = $matches[2]; } else { $messages[$msgi]['SUBJECT-SORT'] = $subject_sort; } } } return $messages; }
function full_address($row) { global $addrsrch_fullname, $data_dir, $username; if (($prefix = getPref($data_dir, $username, 'addrsrch_fullname') or isset($addrsrch_fullname) and $prefix = $addrsrch_fullname) and $prefix !== 'noprefix') { $name = $prefix === 'nickname' ? $row['nickname'] : $row['name']; return $name . ' <' . trim($row['email']) . '>'; } else { return trim($row['email']); } }
echo "<a href=\"./index.php?cdt_version_pref=1\">\n"; echo "<img src='../images/icons/cdt2_1.png' alt='Utiliser la version 1 du cahier de textes' class='link' title='Utiliser la version 1 du cahier de textes'/> </a>"; //echo "<button style='width: 200px;' onclick=\"javascript:window.location.replace('./index.php?cdt_version_pref=1') // \">Utiliser la version 1 du cahier de textes</button>\n"; echo "</td>"; // ********************************************** // Affichage des différents groupes du professeur // Récupération de toutes les infos sur le groupe echo "<td valign='center'>"; $groups = $utilisateur->getGroupes(); if ($groups->isEmpty()) { echo "<br /><br />"; echo "<b>Aucun cahier de textes n'est disponible.</b>"; echo "<br /><br />"; } $nom_ou_description_groupe_cdt = getPref($_SESSION['login'], "nom_ou_description_groupe_cdt", "name"); //echo "\$nom_ou_description_groupe_cdt=$nom_ou_description_groupe_cdt<br />"; $a = 1; foreach ($groups as $group) { $sql = "SELECT 1=1 FROM j_groupes_visibilite WHERE id_groupe='" . $group->getId() . "' AND domaine='cahier_texte' AND visible='n';"; $test_grp_visib = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($test_grp_visib) == 0) { echo "<a href=\"#\" style=\"font-size: 11pt;\" onclick=\"javascript:\n\t\t\t\tid_groupe = '" . $group->getId() . "';\n\t\t\t\tgetWinDernieresNotices().hide();\n\t\t\t\tgetWinListeNotices();\n\t\t\t\tnew Ajax.Updater('affichage_liste_notice', './ajax_affichages_liste_notices.php?id_groupe=" . $group->getId() . "', {encoding: 'utf-8'});\n\t\t\t\tgetWinEditionNotice().setAjaxContent('./ajax_edition_compte_rendu.php?id_groupe=" . $group->getId() . "&today='+getCalendarUnixDate(), { \n\t\t\t\t \t\tencoding: 'utf-8',\n\t\t\t\t \t\tonComplete : \n\t\t\t\t \t\tfunction() {\n\t\t\t\t \t\t\tinitWysiwyg();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\treturn false;\n\t\t\t\">"; echo "<span title=\"" . $group->getName() . " - " . $group->getDescriptionAvecClasses() . " ("; $cpt_prof = 0; foreach ($group->getProfesseurs() as $prof) { if ($cpt_prof > 0) { echo ", "; } echo casse_mot($prof->getNom(), "maj") . " " . casse_mot($prof->getPrenom(), "majf2"); $cpt_prof++;
function GetCalendarsByRange() { $ret = array(); $view_Type = getPref('viewtype'); // week,month,day $str_show_day = getPref('showdate'); // 当前是那一天 $clientzone = getPref('timezone'); $serverzone = TIMEZONE_INDEX; $zonediff = $serverzone - $clientzone; $showday = strtodate($str_show_day); if (($timestamp = date_timestamp_get($showday)) === false) { echo 1; $ret["error"] = array("ErrorCode" => "NotVolidDateTimeFormat", "ErrorMsg" => msg("notvoliddatetimeformat")); //替换成 } else { $dataformat = GetCalendarViewFormat($view_Type, $timestamp); $qstart = $dataformat['start_date'] + $zonediff * 3600; $qend = $dataformat['end_date'] + $zonediff * 3600; //查询数据库 GetClientIP(); // {"start":start,"end":end,"error":error,"issort":issort,"events":jsonlist} $ret["start"] = TimestampToJsonTime($dataformat['start_date']); $ret["end"] = TimestampToJsonTime($dataformat['end_date']); $ret["error"] = NUll; $ret["issort"] = TRUE; //print_r($ret); $ret["events"] = DbQueryCalendars(date("Y-m-d H:i:s", $qstart), date("Y-m-d H:i:s", $qend), GetClientIP(), $zonediff); } echo json_encode($ret); }
if (getSettingValue("gepi_denom_boite_genre") == 'f') { echo "<h2 class='gepi'>Configuration de la " . my_strtolower(getSettingValue("gepi_denom_boite")) . " {$nom_court} :</h2>\n"; } else { echo "<h2 class='gepi'>Configuration du " . my_strtolower(getSettingValue("gepi_denom_boite")) . " {$nom_court} :</h2>\n"; } if ($interface_simplifiee == "y") { // Récupérer les paramètres à afficher. // Dans un premier temps, un choix pour tous. // Dans le futur, permettre un paramétrage par utilisateur $aff_nom_court = getPref($_SESSION['login'], 'add_modif_conteneur_nom_court', 'y'); $aff_nom_complet = getPref($_SESSION['login'], 'add_modif_conteneur_nom_complet', 'n'); $aff_description = getPref($_SESSION['login'], 'add_modif_conteneur_description', 'n'); $aff_coef = getPref($_SESSION['login'], 'add_modif_conteneur_coef', 'y'); $aff_boite = getPref($_SESSION['login'], 'add_modif_conteneur_boite', 'y'); $aff_display_releve_notes = getPref($_SESSION['login'], 'add_modif_conteneur_aff_display_releve_notes', 'n'); $aff_display_bull = getPref($_SESSION['login'], 'add_modif_conteneur_aff_display_bull', 'n'); echo "<div align='center'>\n"; echo "<table class='boireaus' border='1'>\n"; if ($aff_nom_court == 'y') { echo "<tr>\n"; echo "<td style='background-color: #aae6aa; font-weight: bold;'>Nom court:</td>\n"; echo "<td>\n"; echo "<input type='text' name = 'nom_court' size='40' value = \"" . $nom_court . "\" onfocus=\"javascript:this.select()\" />\n"; echo "</td>\n"; echo "</tr>\n"; } else { echo "<tr style='display:none;'>\n"; echo "<td style='background-color: #aae6aa; font-weight: bold;'>Nom court:</td>\n"; echo "<td>\n"; echo "<input type='hidden' name = 'nom_court' size='40' value = \"" . $nom_court . "\" onfocus=\"javascript:this.select()\" />\n"; echo "</td>\n";
$appreciations = preg_replace("/\\\\n/", "\n", preg_replace("/\\\\r/", "\r", $_POST['appreciations'])); } else { $appreciations = ''; } echo "<textarea name='appreciations' rows='3' cols='40' class='wrap'>{$appreciations}</textarea>\n"; echo "</td></tr></table>\n"; echo "<input type='hidden' name='id_conteneur' value='{$id_conteneur}' />\n"; echo "<input type='hidden' name='id_devoir' value='{$id_devoir}' />\n"; echo "<input type='hidden' name='order_by' value='{$order_by}' />\n"; echo "<center><input type='submit' value='Importer' onclick=\"return confirm_abandon (this, change, '{$themessage}')\" /></center>\n"; echo "<p><b>Remarque importante :</b> l'importation ne prend en compte que les élèves dont le nom est affiché ci-dessus !<br />Soyez donc vigilant à ne coller que les appréciations de ces élèves, dans le bon ordre.</p>\n"; echo "</form></fieldset>\n"; } // Pour qu'un professeur puisse avoir une préférence d'affichage par défaut ou non des quartiles: $aff_quartiles_par_defaut = getPref($_SESSION['login'], 'aff_quartiles_cn', "n"); $aff_photo_cn_par_defaut = getPref($_SESSION['login'], 'aff_photo_cn', "n"); echo "<br />"; echo $message_cnil_commentaires . "<br />"; // 20141103 foreach ($tab_ele_dev as $current_id_dev => $current_tab_notes) { $titre_infobulle = "Devoir n°" . $current_id_dev . " : " . $current_tab_notes['nom_dev']; $texte_infobulle = "<div align='center'>\n<table class='boireaus boireaus_alt resizable sortable'>\n\t<thead>\n\t\t<tr>\n\t\t\t<th class='text' title=\"Cliquez pour trier\">Nom prénom</th>\n\t\t\t<th class='number' title=\"Cliquez pour trier\">Note</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>"; foreach ($current_tab_notes['eleve'] as $current_login_ele => $tmp_tab) { //number_format($tmp_tab['note'], 1, ".") if (preg_match("/^[0-9]{1,}[,]{0,1}[0-9]{0,2}\$/", $tmp_tab['note'])) { $current_note = preg_replace("/,/", ".", $tmp_tab['note']); } else { $current_note = $tmp_tab['note']; } $texte_infobulle .= "\n\t<tr>\n\t\t<td>" . $tmp_tab['nom_prenom'] . "</td>\n\t\t<td>" . $current_note . "</td>\n\t</tr>"; }
* @see acces() * @see get_groups_for_prof() * @see getSettingValue() * @see insert_confirm_abandon() * @see menu_plugins() * @see nb_saisies_bulletin() * @see retourneCours() * @todo Proposer aussi les emplois du temps de ses classes * @todo Ajouter Paramètres des bulletins et Impression des bulletins (pour les PP) */ // ====== SECURITE ======= if (!$_SESSION["login"]) { header("Location: ../logout.php?auto=2"); die; } $utiliserMenuBarreLight = getSettingValue("utiliserMenuBarre") == 'light' || getPref($_SESSION["login"], "utiliserMenuBarre", "yes") == "light" ? "yes" : "no"; //include('./barre_menu_css_js.php'); echo '<!--[if lt IE 7]> <script type=text/javascript> // Fonction destinée à remplacer le "li:hover" pour IE 6 sfHover = function() { var sfEls = document.getElementById("menu_barre").getElementsByTagName("li"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover = function() { this.className = this.className.replace(new RegExp(" sfhover"), ""); this.className += " sfhover"; } sfEls[i].onmouseout = function() { this.className = this.className.replace(new RegExp(" sfhover"), ""); } }
/* if (!isset($niveau_arbo)) {$niveau_arbo = 1;} if ($niveau_arbo == "0") { $chemin_sound="./sounds/"; } elseif ($niveau_arbo == "1") { $chemin_sound="../sounds/"; } elseif ($niveau_arbo == "2") { $chemin_sound="../../sounds/"; } elseif ($niveau_arbo == "3") { $chemin_sound="../../../sounds/"; } $tab_sound=get_tab_file($chemin_sound); */ if (count($tab_sound) >= 0) { $footer_sound_actuel = getPref($_SESSION['login'], 'footer_sound', ""); echo "<br />\n"; echo "<form name='change_footer_sound' method='post' action='" . $_SERVER['PHP_SELF'] . "'>\n"; echo add_token_field(); echo "<input type='hidden' name='temoin_suhosin_1' value='1' />\n"; echo "<fieldset style='border: 1px solid grey;"; echo "background-image: url(\"../images/background/opacite50.png\"); "; echo "'>\n\t<legend style='border: 1px solid grey; background-image: url(\"../images/background/opacite50.png\");'>Choix de l'alerte sonore de fin de session</legend>\n\t<p><select name='footer_sound' id='footer_sound' onchange='test_play_footer_sound()'>\n"; echo "\t<option value=''"; if ($footer_sound_actuel == '') { echo " selected='true'"; } echo ">Aucun son</option>\n"; for ($i = 0; $i < count($tab_sound); $i++) { echo "\t<option value='" . $tab_sound[$i] . "'"; if ($tab_sound[$i] == $footer_sound_actuel) {
function newmail_pref() { global $username, $data_dir, $newmail_media, $newmail_enable, $newmail_popup, $newmail_allbox, $newmail_recent, $newmail_changetitle, $newmail_popup_height, $newmail_popup_width; $newmail_recent = getPref($data_dir, $username, 'newmail_recent'); $newmail_enable = getPref($data_dir, $username, 'newmail_enable'); $newmail_media = getPref($data_dir, $username, 'newmail_media', '(none)'); $newmail_popup = getPref($data_dir, $username, 'newmail_popup'); $newmail_allbox = getPref($data_dir, $username, 'newmail_allbox'); $newmail_popup_height = getPref($data_dir, $username, 'newmail_popup_height', 130); $newmail_popup_width = getPref($data_dir, $username, 'newmail_popup_width', 200); $newmail_changetitle = getPref($data_dir, $username, 'newmail_changetitle'); }
// Hauteur par defaut des lignes de tableau: $h_cell = 10; // La hauteur de ligne est-elle imposée? // Par défaut, on tente d'utiliser au mieux la hauteur de la page en modifiant $h_cell plus loin. // Il est possible d'interdire la modification // (cela peut servir, en mettant un $h_cell élevé, en DEBUG à forcer l'affichage sur plusieurs pages). $hauteur_ligne_imposee = "n"; if (isset($_GET['forcer_hauteur_ligne_pdf']) && $_GET['forcer_hauteur_ligne_pdf'] == "y" && isset($_GET['visu_toutes_notes_h_cell_pdf']) && $_GET['visu_toutes_notes_h_cell_pdf'] != "" && $_GET['visu_toutes_notes_h_cell_pdf'] > 0 && preg_match("/^[0-9]*\$/", $_GET['visu_toutes_notes_h_cell_pdf'])) { $hauteur_ligne_imposee = "y"; $h_cell = $_GET['visu_toutes_notes_h_cell_pdf']; if (getPref($_SESSION["login"], "visu_toutes_notes_forcer_h_cell_pdf", "n") != "y") { savePref($_SESSION['login'], "visu_toutes_notes_forcer_h_cell_pdf", "y"); } savePref($_SESSION['login'], "visu_toutes_notes_h_cell_pdf", $_GET['visu_toutes_notes_h_cell_pdf']); } else { if (getPref($_SESSION["login"], "visu_toutes_notes_forcer_h_cell_pdf", "n") != "n") { savePref($_SESSION['login'], "visu_toutes_notes_forcer_h_cell_pdf", "n"); } } // Largeur des colonnes $largeur_col = array(); $largeur_col[1] = $largeur_col_nom_ele; $indice_col_app = array(); $taille_max_police = $hauteur_police; $taille_min_police = ceil($taille_max_police / 3); $x0 = $marge_gauche; $y0 = $marge_haute; $largeur_nomprenom_classe_et_notes = $marge_gauche + $largeur_col_nom_ele; $format_page = "P"; $pdf = new bul_PDF($format_page, 'mm', 'A4'); $pdf->SetCreator($gepiSchoolName);