当前位置: 首页>>代码示例>>PHP>>正文


PHP date_fr函数代码示例

本文整理汇总了PHP中date_fr函数的典型用法代码示例。如果您正苦于以下问题:PHP date_fr函数的具体用法?PHP date_fr怎么用?PHP date_fr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了date_fr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: affiche_calendrier_saisie_date

function affiche_calendrier_saisie_date($user_login, $year, $mois, $type_debut_fin)
{
    $jour_today = date('j');
    $jour_today_name = date('D');
    $first_jour_mois_timestamp = mktime(0, 0, 0, $mois, 1, $year);
    $last_jour_mois_timestamp = mktime(0, 0, 0, $mois + 1, 0, $year);
    $mois_name = date_fr('F', $first_jour_mois_timestamp);
    $first_jour_mois_rang = date('w', $first_jour_mois_timestamp);
    // jour de la semaine en chiffre (0=dim , 6=sam)
    $last_jour_mois_rang = date('w', $last_jour_mois_timestamp);
    // jour de la semaine en chiffre (0=dim , 6=sam)
    $nb_jours_mois = ($last_jour_mois_timestamp - $first_jour_mois_timestamp + 60 * 60 * 12) / (24 * 60 * 60);
    // + 60*60 *12 for fucking DST
    if ($first_jour_mois_rang == 0) {
        $first_jour_mois_rang = 7;
    }
    // jour de la semaine en chiffre (1=lun , 7=dim)
    if ($last_jour_mois_rang == 0) {
        $last_jour_mois_rang = 7;
    }
    // jour de la semaine en chiffre (1=lun , 7=dim)
    echo '<table class="calendrier_saisie_date_debut" cellpadding="0" cellspacing="0">
        <thead>
        <tr align="center" bgcolor="' . $_SESSION['config']['light_grey_bgcolor'] . '">
        <td colspan=7 class="titre"> ' . $mois_name . ' ' . $year . ' </td>
        </tr>
        <tr bgcolor="' . $_SESSION['config']['light_grey_bgcolor'] . '">
        <td class="cal-saisie2">' . _('lundi_1c') . '</td>
        <td class="cal-saisie2">' . _('mardi_1c') . '</td>
        <td class="cal-saisie2">' . _('mercredi_1c') . '</td>
        <td class="cal-saisie2">' . _('jeudi_1c') . '</td>
        <td class="cal-saisie2">' . _('vendredi_1c') . '</td>
        <td class="cal-saisie2">' . _('samedi_1c') . '</td>
        <td class="cal-saisie2">' . _('dimanche_1c') . '</td>
        </tr>
        </thead>
        <tbody>';
    $start_nb_day_before = $first_jour_mois_rang - 1;
    $stop_nb_day_before = 7 - $last_jour_mois_rang;
    for ($i = -$start_nb_day_before; $i <= $nb_jours_mois + $stop_nb_day_before; $i++) {
        if (($i + $start_nb_day_before) % 7 == 0) {
            echo '<tr>';
        }
        $j_timestamp = mktime(0, 0, 0, $mois, $i + 1, $year);
        $td_second_class = get_td_class_of_the_day_in_the_week($j_timestamp);
        if ($i < 0 || $i > $nb_jours_mois) {
            echo '<td class="' . $td_second_class . '">-</td>';
        } else {
            affiche_cellule_jour_cal_saisie($user_login, $j_timestamp, $td_second_class, $type_debut_fin);
        }
        if (($i + $start_nb_day_before) % 7 == 6) {
            echo '<tr>';
        }
    }
    echo '</tbody></table>';
}
开发者ID:TexGG,项目名称:Libertempo,代码行数:56,代码来源:fonctions_conges.php

示例2: choisir_distinct_form

function choisir_distinct_form($column_name, $table_name, $precede_name = "", $date_return = "")
{
    //$column_name
    //$table_name
    //$precede_name
    //  $date_return only for date will add the date function
    //
    global $connection;
    //$table_name="clients";
    // $column_name='pseudo';
    $output = "";
    $output_form = "";
    // $table_mysql=array('admins','chauffeurs','clients');
    $col_date = array('course_date', 'str_time');
    $col_heure = array('heure');
    $col_day = array('week_day_rank');
    $col_monthname = array('monthname');
    $col_week = array('week');
    $col_year = array('year');
    $column_name_display = "";
    $col_date_return = array('monthname', 'year', 'day', 'week', 'yearweek', 'dayname');
    if ($date_return && in_array($date_return, $col_date_return)) {
        $format_col_name = "{$date_return}({$column_name}) as {$column_name}";
        //   var_dump($format_col_name1);
        // $format_col_name=$column_name;
    } else {
        $format_col_name = $column_name;
    }
    $array_dec = array('course_date');
    $asc_desc = " ASC";
    if (isset($array_dec) && in_array($column_name, $array_dec)) {
        $asc_desc = " DESC";
    }
    $query = "SELECT DISTINCT ";
    $query .= " {$format_col_name} ";
    $query .= "FROM {$table_name} ";
    $query .= "ORDER BY {$column_name} {$asc_desc} ";
    // var_dump($query);
    if ($precede_name) {
        if ($date_return && in_array($date_return, $col_date_return)) {
            $final_column_name = $precede_name . "_" . $date_return . "_" . $column_name;
        } else {
            $final_column_name = $precede_name . "_" . $column_name;
        }
    } else {
        $final_column_name = $column_name;
    }
    $return_query_set = mysqli_query($connection, $query);
    confirm_query($return_query_set);
    while ($return_query = mysqli_fetch_assoc($return_query_set)) {
        $data = htmlentities($return_query[$column_name], ENT_COMPAT, 'utf-8');
        $output .= "<option value='{$data}'>";
        if (in_array($column_name, $col_date)) {
            list($date_fr, $date_fr_short, $date_fr_long, $date_fr_hr, $date_fr_short_hr, $date_fr_long_hr, $date_fr_full_hr) = date_fr($data);
            if ($date_return == "monthname") {
                $output .= htmlentities(mth_fr_name($data), ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("Mois", ENT_COMPAT, 'utf-8');
            } elseif ($date_return == "year") {
                $output .= htmlentities($data, ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("year", ENT_COMPAT, 'utf-8');
            } elseif ($date_return == "week") {
                $output .= htmlentities($data, ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("Semaine", ENT_COMPAT, 'utf-8');
            } elseif ($date_return == "day") {
                $output .= htmlentities($data, ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("Jour No", ENT_COMPAT, 'utf-8');
            } elseif ($date_return == "dayname") {
                $output .= htmlentities(day_fr(day_eng_no($data)), ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("Jour semaine", ENT_COMPAT, 'utf-8');
            } elseif ($date_return == "yearweek") {
                $data_out = substr($data, 0, 4) . "-" . substr($data, 4, 2);
                $output .= htmlentities($data_out, ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("An _Semaine", ENT_COMPAT, 'utf-8');
            } else {
                $output .= htmlentities($date_fr_short, ENT_COMPAT, 'utf-8');
                $column_name_display = htmlentities("Date", ENT_COMPAT, 'utf-8');
            }
        } elseif (in_array($column_name, $col_heure)) {
            $output .= htmlentities(visu_heure($data), ENT_COMPAT, 'utf-8');
            $column_name_display = htmlentities("Heure", ENT_COMPAT, 'utf-8');
        } elseif (in_array($column_name, $col_day)) {
            $output .= htmlentities(day_fr($data), ENT_COMPAT, 'utf-8');
            $column_name_display = htmlentities("Jour", ENT_COMPAT, 'utf-8');
        } elseif (in_array($column_name, $col_monthname)) {
            $output .= htmlentities(mth_fr_name($data), ENT_COMPAT, 'utf-8');
            $column_name_display = htmlentities("Mois", ENT_COMPAT, 'utf-8');
        } elseif (in_array($column_name, $col_week)) {
            $output .= htmlentities("Semaine " . $data, ENT_COMPAT, 'utf-8');
            $column_name_display = htmlentities("Semaine", ENT_COMPAT, 'utf-8');
        } elseif (in_array($column_name, $col_year)) {
            $output .= htmlentities($data, ENT_COMPAT, 'utf-8');
            $column_name_display = htmlentities("Année", ENT_COMPAT, 'utf-8');
        } else {
            $output .= $data;
            $column_name_display = htmlentities(ucfirst(str_replace('_', ' ', $column_name)), ENT_COMPAT, 'utf-8');
        }
        $output .= "</option>";
    }
    //$style="style='background-color:  #2c2fff;width:150px;color: #f3f2ff;text-align: center'";
    //   $class="pure-input-1-2";
//.........这里部分代码省略.........
开发者ID:kamy333,项目名称:kamy,代码行数:101,代码来源:functions.php

示例3: affiche_cellule_jour_user

function affiche_cellule_jour_user($sql_login, $j_timestamp, $year_select, $mois_select, $j, $second_class, $printable, $tab_calendrier, $tab_rtt_echange, $tab_rtt_planifiees, $tab_type_absence, $DEBUG = FALSE)
{
    $session = session_id();
    global $content;
    $return = array();
    // info bulle
    $j_date_fr = date_fr("d/m/Y", $j_timestamp);
    $j_num_semaine = date_fr("W", $j_timestamp);
    $info_bulle = " title=\"{$sql_login} - {$j_date_fr}\" ";
    if ($second_class == "weekend") {
        $class = "cal-day_" . $second_class;
        if ($printable != 1) {
            // si version écran :
            $content .= "<td class=\"{$class}\" {$info_bulle}>-</td>";
        } else {
            $content .= "<td class=\"{$class}\">-</td>";
        }
    } else {
        $date_j = date("Y-m-d", $j_timestamp);
        $class_am = "travail_am";
        $class_pm = "travail_pm";
        $text_am = "-";
        $text_pm = "-";
        $val_matin = "";
        $val_aprem = "";
        // recup des infos ARTT ou Temps Partiel :
        // la fonction suivante change les valeurs de $val_matin $val_aprem ....
        recup_infos_artt_du_jour_from_tab($sql_login, $j_timestamp, $val_matin, $val_aprem, $tab_rtt_echange, $tab_rtt_planifiees, $DEBUG = FALSE);
        //## AFICHAGE ##
        if ($val_matin == "Y") {
            $class_am = "rtt_am";
            //		$text_am="a";
        }
        if ($val_aprem == "Y") {
            $class_pm = "rtt_pm";
            //		$text_pm="a";
        }
        $text_bulle_type_abs = "";
        if (!($val_matin == "Y" && $val_aprem == "Y")) {
            // Récupération des conges du user
            if (array_key_exists($date_j, $tab_calendrier)) {
                $tab_day = $tab_calendrier["{$date_j}"];
                // on recup le tableau ($tab_jour) de la date que l'on affiche
                //print_r($tab_day);
                $nb_resultat_periode = count($tab_day);
                //
                if ($nb_resultat_periode > 0) {
                    for ($i = 0; $i < $nb_resultat_periode; $i++) {
                        // on regarde chaque periode l'une après l'autre
                        $tab_per = $tab_day[$i];
                        // on recup le tableau de la periode
                        if (in_array($sql_login, $tab_per)) {
                            //$content .= "tab_per =<br>\n"; print_r($tab_per); $content .= "<br>\n";
                            $sql_p_type = $tab_per["p_type"];
                            $sql_p_etat = $tab_per["p_etat"];
                            $sql_p_date_deb = $tab_per["p_date_deb"];
                            $sql_p_date_fin = $tab_per["p_date_fin"];
                            $sql_p_demi_jour_deb = $tab_per["p_demi_jour_deb"];
                            $sql_p_demi_jour_fin = $tab_per["p_demi_jour_fin"];
                            $sql_p_fermeture_id = $tab_per["p_fermeture_id"];
                            $sql_p_date_deb_fr = substr($sql_p_date_deb, 8, 2) . "/" . substr($sql_p_date_deb, 5, 2) . "/" . substr($sql_p_date_deb, 0, 4);
                            $sql_p_date_fin_fr = substr($sql_p_date_fin, 8, 2) . "/" . substr($sql_p_date_fin, 5, 2) . "/" . substr($sql_p_date_fin, 0, 4);
                            //si on est le premier jour ET le dernier jour de conges
                            if ($sql_p_date_deb == $date_j && $sql_p_date_fin == $date_j) {
                                if ($sql_p_demi_jour_deb == "am") {
                                    $class_am = get_class_titre($sql_p_type, $tab_type_absence, $sql_p_etat, $sql_p_fermeture_id) . "_am";
                                    $text_am = $tab_type_absence[$sql_p_type]['short_libelle'];
                                    if ($tab_per['p_commentaire'] == "") {
                                        // *** si le commentaire est renseigné on l'affiche dans l'infobulle, sinon on affiche le type d'absence ***
                                        $text_bulle_type_abs = $tab_type_absence[$sql_p_type]['libelle'] . "<br>{$sql_p_date_deb_fr} - {$sql_p_date_fin_fr}";
                                    } else {
                                        $text_bulle_type_abs = $tab_per['p_commentaire'] . "<br>{$sql_p_date_deb_fr} - {$sql_p_date_fin_fr}";
                                    }
                                    if (isset($return[$tab_type_absence[$sql_p_type]['libelle']])) {
                                        $return[$tab_type_absence[$sql_p_type]['libelle']] += 0.5;
                                    } else {
                                        $return[$tab_type_absence[$sql_p_type]['libelle']] = 0.5;
                                    }
                                }
                                if ($sql_p_demi_jour_fin == "pm") {
                                    $class_pm = get_class_titre($sql_p_type, $tab_type_absence, $sql_p_etat, $sql_p_fermeture_id) . "_pm";
                                    $text_pm = $tab_type_absence[$sql_p_type]['short_libelle'];
                                    if ($tab_per['p_commentaire'] == "") {
                                        // *** si le commentaire est renseigné on l'affiche dans l'infobulle, sinon on affiche le type d'absence ***
                                        $text_bulle_type_abs = $tab_type_absence[$sql_p_type]['libelle'] . "<br>{$sql_p_date_deb_fr} - {$sql_p_date_fin_fr}";
                                    } else {
                                        $text_bulle_type_abs = $tab_per['p_commentaire'] . "<br>{$sql_p_date_deb_fr} - {$sql_p_date_fin_fr}";
                                    }
                                    if (isset($return[$tab_type_absence[$sql_p_type]['libelle']])) {
                                        $return[$tab_type_absence[$sql_p_type]['libelle']] += 0.5;
                                    } else {
                                        $return[$tab_type_absence[$sql_p_type]['libelle']] = 0.5;
                                    }
                                }
                            } elseif ($sql_p_date_deb == $date_j) {
                                if ($sql_p_demi_jour_deb == "am") {
                                    $class_am = get_class_titre($sql_p_type, $tab_type_absence, $sql_p_etat, $sql_p_fermeture_id) . "_am";
                                    $text_am = $tab_type_absence[$sql_p_type]['short_libelle'];
                                    $class_pm = get_class_titre($sql_p_type, $tab_type_absence, $sql_p_etat, $sql_p_fermeture_id) . "_pm";
                                    $text_pm = $tab_type_absence[$sql_p_type]['short_libelle'];
//.........这里部分代码省略.........
开发者ID:VV666,项目名称:Libertempo,代码行数:101,代码来源:calendrier-pdf.php

示例4: setTags

 public static function setTags($_expression, &$_scenario = null, $_quote = false, $_nbCall = 0)
 {
     if ($_nbCall > 10) {
         return $_expression;
     }
     $replace1 = array('#seconde#' => (int) date('s'), '#heure#' => (int) date('G'), '#minute#' => (int) date('i'), '#jour#' => (int) date('d'), '#mois#' => (int) date('m'), '#annee#' => (int) date('Y'), '#time#' => date('Gi'), '#timestamp#' => time(), '#seconde#' => (int) date('s'), '#date#' => date('md'), '#semaine#' => date('W'), '#sjour#' => '"' . date_fr(date('l')) . '"', '#smois#' => '"' . date_fr(date('F')) . '"', '#njour#' => (int) date('w'), '#hostname#' => '"' . gethostname() . '"', '#IP#' => '"' . network::getNetworkAccess('internal', 'ip') . '"', '#trigger#' => '');
     if (is_object($_scenario)) {
         $cmd = cmd::byId(str_replace('#', '', $_scenario->getRealTrigger()));
         if (is_object($cmd)) {
             $replace1['#trigger#'] = $cmd->getHumanName();
         } else {
             $replace1['#trigger#'] = $_scenario->getRealTrigger();
         }
     }
     if ($_scenario != null) {
         $replace1 = array_merge($replace1, $_scenario->getTags());
     }
     $replace2 = array();
     preg_match_all("/([a-zA-Z][a-zA-Z_]*?)\\((.*?)\\)/", $_expression, $matches, PREG_SET_ORDER);
     foreach ($matches as $match) {
         $function = $match[1];
         $replace_string = $match[0];
         if (substr_count($match[2], '(') != substr_count($match[2], ')')) {
             $pos = strpos($_expression, $match[2]) + strlen($match[2]);
             while (substr_count($match[2], '(') > substr_count($match[2], ')')) {
                 $match[2] .= $_expression[$pos];
                 $pos++;
                 if ($pos > strlen($_expression)) {
                     break;
                 }
             }
             $arguments = self::setTags($match[2], $_scenario, $_quote, $_nbCall++);
             $result = str_replace($match[2], $arguments, $_expression);
             while (substr_count($result, '(') > substr_count($result, ')')) {
                 $result .= ')';
             }
             $result = self::setTags($result, $_scenario, $_quote, $_nbCall++);
             return cmd::cmdToValue(str_replace(array_keys($replace1), array_values($replace1), $result), $_quote);
         } else {
             $arguments = explode(',', $match[2]);
         }
         if (method_exists(__CLASS__, $function)) {
             if ($function == 'trigger') {
                 if (!isset($arguments[0])) {
                     $arguments[0] = '';
                 }
                 $replace2[$replace_string] = self::trigger($arguments[0], $_scenario, $_quote);
             } else {
                 $replace2[$replace_string] = call_user_func_array(__CLASS__ . "::" . $function, $arguments);
             }
         } else {
             if (function_exists($function)) {
                 foreach ($arguments as &$argument) {
                     $argument = evaluate(self::setTags($argument, $_scenario, $_quote));
                 }
                 $replace2[$replace_string] = call_user_func_array($function, $arguments);
             }
         }
     }
     return cmd::cmdToValue(str_replace(array_keys($replace1), array_values($replace1), str_replace(array_keys($replace2), array_values($replace2), $_expression)), $_quote);
 }
开发者ID:jimibi,项目名称:core,代码行数:61,代码来源:scenarioExpression.class.php

示例5: double

<?php

$titrePage = "fonctions";
include "header.php";
//echo get_include_path();
require_once "fonctions.php";
//require parce que bloquant si non trouvé
echo double(5) . "<br/>";
echo triple(5) . "<br/>";
echo $multiplicateur;
echo double(triple(46)) . "<br/>";
// date du jour en format US
$dateJour = date('Y-m-d');
// conversion en date FR
echo date_fr($dateJour) . "<br/>";
echo date_fr('2015-10-05') . "<br/>";
echo date_us('05/10/2015') . "<br/>";
$tableau = array(array('Language' => 'PHP', 'Age' => 20, 'Createur' => 'Rasmus Lerdorf'), array('Language' => 'JAVA', 'Age' => 33, 'Createur' => 'SUN'), array('Language' => 'C#', 'Age' => 14, 'Createur' => 'Microsoft'), array('Language' => 'COBOL', 'Age' => 56, 'Createur' => 'IBM'), array('Language' => 'BASIC', 'Age' => 51, 'Createur' => 'inconnu'), array('Language' => 'C', 'Age' => 45, 'Createur' => 'inconnu'), array('Language' => 'C++', 'Age' => 17, 'Createur' => 'toto'));
echo afficheTableau2D($tableau);
$tNombres = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
echo '<pre>';
// affichage des nombres pairs
print_r(array_filter($tNombres, 'pair'));
// détail de la fonction array_filter
$tResultat = array();
foreach ($tNombres as $cle => $nombre) {
    if (pair($nombre)) {
        $tResultat[$cle] = $nombre;
    }
}
print_r($tResultat);
开发者ID:Ophois,项目名称:webforce3,代码行数:31,代码来源:fonctionsUtil.php

示例6: old_mysql_result

            $test_dispense = old_mysql_result(mysqli_query($GLOBALS["mysqli"], "SELECT count(*) FROM ".$prefix_base."absences_eleves WHERE eleve_absence_eleve='".$id_eleve."' AND type_absence_eleve='D'"),0);
			if ($test_dispense != '0')
			{  ?>
				<div class="tableau_info_compt"><a href="javascript:centrerpopup('../lib/liste_absences.php?id_eleve=<?php echo $id_eleve; ?>&amp;type=D',260,320,'scrollbars=yes,statusbar=no,resizable=yes');" title="voir les dispenses">Dispense détecté</a></div>
                  
			<?php
			} ?>
                
             <div class="tableau_info_compt"><a href="javascript:centrerpopup('../lib/liste_absences.php?id_eleve=<?php echo $id_eleve; ?>&amp;type=<?php echo $type; ?>',260,320,'scrollbars=yes,statusbar=no,resizable=yes');" title="voir les absences">voir absences</a></div>
              </td>     
            
            <td><?php if(($mode === "classe" and $i === '0') or $mode != "classe") { ?>
              du&nbsp;&nbsp;<a href="#calend" onClick="<?php
	//echo $cal_a[$i]->get_strPopup('../../lib/calendrier/pop.calendrier.php', 350, 170);
	echo $cal_a[$i]->get_strPopup('../../lib/calendrier/pop.calendrier_id.php', 350, 170);
?>"><img src="../../lib/calendrier/petit_calendrier.gif" border="0" alt="" /></a><br /><input name="d_date_absence_eleve[<?php echo $i; ?>]" id="d_date_absence_eleve_<?php echo $i; ?>" onfocus="javascript:this.select()" type="text" value="<?php if(empty($d_date_absence_eleve)) { echo $datejour; } else { if($action == "modifier" ) { echo $d_date_absence_eleve[$i]; } else { if(isset($d_date_absence_eleve_erreur[$i])) { echo $d_date_absence_eleve_erreur[$i]; } else { echo date_fr($d_date_absence_eleve); } } } ?>" size="10" maxlength="10" /><br />
              au&nbsp;&nbsp;<a href="#calend" onClick="<?php
	//echo $cal_b[$i]->get_strPopup('../../lib/calendrier/pop.calendrier.php', 350, 170);
	echo $cal_b[$i]->get_strPopup('../../lib/calendrier/pop.calendrier_id.php', 350, 170);
?>"><img src="../../lib/calendrier/petit_calendrier.gif" border="0" alt="" /></a><br /><input name="a_date_absence_eleve[<?php echo $i; ?>]" id="a_date_absence_eleve_<?php echo $i; ?>" onfocus="javascript:this.select()" type="text" value="<?php if(isset($a_date_absence_eleve_erreur[$i])) { echo $a_date_absence_eleve_erreur[$i]; } else { ?>JJ/MM/AAAA<?php } ?>" size="10" maxlength="10" />
           </td><?php } ?>
            <td><?php if(($mode === "classe" and $i === '0') or $mode != "classe") { ?>
              de<br /><input name="d_heure_absence_eleve[<?php echo $i; ?>]" onfocus="javascript:this.select()" type="text" value="<?php if(isset($d_heure_absence_eleve_erreur[$i]) and $dp_absence_eleve == "") { echo $d_heure_absence_eleve_erreur[$i]; } else { ?>00:00<?php } ?>" size="5" maxlength="5" /><br />
              a<br /><input name="a_heure_absence_eleve[<?php echo $i; ?>]" onfocus="javascript:this.select()" type="text" value="<?php if(isset($a_heure_absence_eleve_erreur[$i]) and $dp_absence_eleve == "") { echo $a_heure_absence_eleve_erreur[$i]; } else { ?>00:00<?php } ?>" size="5" maxlength="5" />
            </td><?php } ?>
            <td><?php if(($mode === "classe" and $i === '0') or $mode != "classe") { ?>
              de<br />
              <select name="dp_absence_eleve[<?php echo $i; ?>]">
                <option value="">pas de s&eacute;lection</option>
                   <?php
                      $requete_pe = ('SELECT * FROM '.$prefix_base.'edt_creneaux ORDER BY heuredebut_definie_periode, nom_definie_periode ASC');
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:ajout_abs.php

示例7: date

                <!-- Date Formating -->
                <?php 
    $jour = date("d", strtotime($article->art_datemodif));
    ?>
                <?php 
    $mois = date("m", strtotime($article->art_datemodif));
    ?>
                <?php 
    $annee = date("Y", strtotime($article->art_datemodif));
    ?>
                <!-- End Date Formating -->
                <?php 
    if ($article->art_datemodif == "0000-00-00 00:00:00" || $article->art_datemodif == NULL) {
        echo "</em></span>";
    } else {
        echo ", mis à jour le " . '<span class="date-article">' . date_fr($jour, $mois, $annee) . "</span></em></span>";
    }
    ?>
                <p>
                    <?php 
    echo $article->art_content;
    ?>
                </p>

                <footer class="row full-width">
                    <p class="small-12 medium-9 large-9 column">Tags : <?php 
    echo $article->art_tags;
    ?>
</p>
                </footer>
开发者ID:Janaka-Steph,项目名称:stephane-roche.fr,代码行数:30,代码来源:article.php

示例8: my_eregi_replace

			    $date_debut_tableau_jour = my_eregi_replace('^0','',$dateexplode[0]);
			    $date_debut_tableau_mois = my_eregi_replace('^0','',$dateexplode[1]);
			    $date_debut_tableau= $date_debut_tableau_jour.'/'.$date_debut_tableau_mois.'/'.$dateexplode[2];
			    if(empty($tableau_info_donnee[$date_debut_tableau])) { $tableau_info_donnee[$date_debut_tableau]=''; }
			    $tableau_info_donnee[$date_debut_tableau]['absence'] = 'oui';
			    if($date_debut===$date_fin) { $passage='non'; } else { $passage='oui'; }
			    $date_debut = date("d/m/Y", mktime(0, 0, 0, $dateexplode[1], $dateexplode[0]+1,  $dateexplode[2]));
			}
                   }
		 $requete_absences_nr = "SELECT * FROM ".$prefix_base."absences_eleves WHERE eleve_absence_eleve='".$select_fiche_eleve."' AND type_absence_eleve='R' ORDER BY d_date_absence_eleve DESC";
                 $execution_absences_nr = mysqli_query($GLOBALS["mysqli"], $requete_absences_nr) or die('Erreur SQL !'.$requete_absences_nr.'<br />'.mysqli_error($GLOBALS["mysqli"]));
                 while ($data_absences_nr = mysqli_fetch_array($execution_absences_nr))
                   {
			$date_debut = date_fr($data_absences_nr['d_date_absence_eleve']);
			    $date_debut = my_eregi_replace('^0','',$date_debut);
			$date_fin = date_fr($data_absences_nr['a_date_absence_eleve']);
			    $date_fin = my_eregi_replace('^0','',$date_fin);
			if(empty($tableau_info_donnee[$date_debut])) { $tableau_info_donnee[$date_debut]=''; }
			$tableau_info_donnee[$date_debut]['retard'] = 'oui';
			if(empty($tableau_info_donnee[$date_fin])) { $tableau_info_donnee[$date_fin]=''; }
			$tableau_info_donnee[$date_fin]['retard'] = 'oui';
                   }
	?><div style="font-size: 14px; text-align: center; margin: auto;"><strong>Statistique sur une année</strong></div>
	<?php
		$gepiYear = getSettingValue('gepiYear');
		$annee_select = explode('-',$gepiYear);
		if ( empty($annee_select[1]) ) { $annee_select = explode('/',$gepiYear); }
		if ( empty($annee_select[1]) ) { $annee_select = explode(' ',$gepiYear); }
		echo @tableau_annuel($select_fiche_eleve, '8', '12', trim($annee_select[0]), $tableau_info_donnee);
	?>
			</div>
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:gestion_absences.php

示例9: if

		<input name="selection[<?php echo $total; ?>]" id="sel<?php echo $total; ?>" type="checkbox" value="1" <?php $varcoche = $varcoche."'sel".$total."',"; ?> <?php /* if((isset($selection[$total]) and $selection[$total] == "1") OR $cocher == 1) { ?>checked="checked"<?php } */ ?> />
		<input name="id_absence_eleve[<?php echo $total; ?>]" type="hidden" value="<?php echo $data_avec_motif['id_absence_eleve']; ?>" />
		<?php

            	$cpt_lettre_absence_recus = lettre_absence_envoye($data_avec_motif['id_absence_eleve']);
            	if ( $cpt_lettre_absence_recus != 0 )
            	{

					$info_sup = 'du '.date_fr($data_avec_motif['d_date_absence_eleve']).' au '.date_fr($data_avec_motif['a_date_absence_eleve']);
					?><a href="#" onClick="alert('Pour le supprimer, supprimez la date d\'envoi du courrier.'); return false;"><img src="../images/icons/delete_imp.png" style="width: 16px; height: 16px;" title="Impossible de supprimer <?php if($data_avec_motif['type_absence_eleve']=="A") { ?>l'absence<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>le retard<?php } if ($data_avec_motif['type_absence_eleve']=="D") { ?>la dispence<?php } if ($data_avec_motif['type_absence_eleve']=="I") { ?>le passage à l'infirmerie<?php } ?> <?php echo $info_sup; ?>" border="0" alt="" /></a><?php

				}
				else
				{

            		?><a href="ajout_<?php if($data_avec_motif['type_absence_eleve']=="A") { ?>abs<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>ret<?php } if ($data_avec_motif['type_absence_eleve']=="D") { ?>dip<?php } if ($data_avec_motif['type_absence_eleve']=="I") { ?>inf<?php } ?>.php?action=supprimer&amp;type=<?php echo $type; ?>&amp;id=<?php echo $data_avec_motif['id_absence_eleve']; ?>&amp;date_ce_jour=<?php echo $date_ce_jour; ?>" <?php $info_sup = 'du '.date_fr($data_avec_motif['d_date_absence_eleve']).' au '.date_fr($data_avec_motif['a_date_absence_eleve']); ?>onClick="return confirm('Etes-vous sur de vouloir le supprimer <?php if($data_avec_motif['type_absence_eleve']=="A") { ?>l\'absence<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>le retard<?php } if ($data_avec_motif['type_absence_eleve']=="D") { ?>la dispence<?php } if ($data_avec_motif['type_absence_eleve']=="I") { ?>le passage à l'infirmerie<?php } ?> <?php echo $info_sup; ?>.')"><img src="../../images/icons/delete.png" style="width: 16px; height: 16px;" title="supprimer <?php if($data_avec_motif['type_absence_eleve']=="A") { ?>l'absence<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>le retard<?php } if ($data_avec_motif['type_absence_eleve']=="D") { ?>la dispence<?php } if ($data_avec_motif['type_absence_eleve']=="I") { ?>le passage à l'infirmerie<?php } ?> <?php echo $info_sup; ?>" border="0" alt="" /></a><?php


				} ?>

		<a href="ajout_<?php if($data_avec_motif['type_absence_eleve']=="A") { ?>abs<?php } if($data_avec_motif['type_absence_eleve']=="D") { ?>dip<?php } if($data_avec_motif['type_absence_eleve']=="I") { ?>inf<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>ret<?php } ?>.php?action=modifier&amp;type=<?php echo $type; ?>&amp;id=<?php echo $data_avec_motif['id_absence_eleve']; ?>&amp;mode=eleve"><img src="../../images/icons/saisie.png" style="width: 16px; height: 16px;" title="modifier <?php if($data_avec_motif['type_absence_eleve']=="A") { ?>l'absence<?php } if ($data_avec_motif['type_absence_eleve']=="R") { ?>le retard<?php } if ($data_avec_motif['type_absence_eleve']=="D") { ?>la dispence<?php } if ($data_avec_motif['type_absence_eleve']=="I") { ?>le passage à l'infirmerie<?php } ?>" border="0" alt="" /></a>
		<a href="gestion_absences.php?select_fiche_eleve=<?php echo $data_avec_motif['login']; ?>" title="consulter la fiche de l'élève"><?php echo "<b>".strtoupper($data_avec_motif['nom'])."</b> ".ucfirst($data_avec_motif['prenom']) . " (" . $data_avec_motif['regime'] . ") (" . classe_de($data_avec_motif['login']) . " )"; ?></a>

		</td>
		<td class="<?php echo $couleur_cellule; ?>">
<?php
			if ((getSettingValue("active_module_trombinoscopes")=='y') and ($photo=="avec_photo")) {
				$nom_photo = '';
				$nom_photo = nom_photo($data_avec_motif['elenoet'],"eleves",2);
        		$photos = $nom_photo;
				//if ( $nom_photo === '' or !file_exists($photo) ) { $photos = "../../mod_trombinoscopes/images/trombivide.jpg"; }
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:gestion_absences_liste.php

示例10: check_date_vs_now

 function check_date_vs_now($str_time, $warning_me = false)
 {
     // attention contrairement aux autres validation $warning_me part defaut true
     // pour error  rajouter false en appellant la fonction apres la date
     $this->errors;
     $this->warnings;
     $unix_time_date = strtotime($str_time);
     $unix_time_now = strtotime('now');
     $date_input = strftime("%Y-%m-%d", $unix_time_date);
     $date_now = strftime("%Y-%m-%d", $unix_time_now);
     list($date_fr, $date_fr_short, $date_fr_long, $date_fr_hr, $date_fr_short_hr, $date_fr_long_hr, $date_fr_full_hr) = date_fr($date_input);
     $date_input_fr = $date_fr_short;
     list($date_fr, $date_fr_short, $date_fr_long, $date_fr_hr, $date_fr_short_hr, $date_fr_long_hr, $date_fr_full_hr) = date_fr($date_now);
     $date_now_fr = $date_fr_short;
     $field = "Attention date";
     $msg = "";
     $text_array = "";
     $text_return = "Attention la date est au <strong>{$date_input_fr}</strong> aujourd'hui est <strong>{$date_now_fr}</strong>. Assurez-vous si necessaire de rentrer la bonne date ";
     if ($date_input === $date_now) {
         return null;
     } else {
         if ($warning_me) {
             $this->warnings[$field] = $this->fieldname_as_text($field) . " car elle n'est pas aujourd'hui. Assurez-vous de changer la date si necessaire ";
             return $text_return;
         } else {
             $this->errors[$field] = $this->fieldname_as_text($field) . " car elle n'est pas aujourd'hui. Assurez-vous de changer la date si necessaire ";
             return $text_return;
         }
     }
 }
开发者ID:kamy333,项目名称:rajah,代码行数:30,代码来源:FormValidation.php

示例11: foreach

			</div>
			<?php 
}
?>

			<div class="tab-pane" id="comments">
				<?php 
if (isset($comments) && $comments->num_rows() > 0) {
    ?>
				<ul class="list-group">
				<?php 
    foreach ($comments->result() as $comment) {
        ?>
					 <li class="list-group-item">
						<span class="badge"><?php 
        echo date_fr(date("d", strtotime($comment->com_date)), date("m", strtotime($comment->com_date)), date("Y", strtotime($comment->com_date)));
        ?>
 à <?php 
        echo date("H", strtotime($comment->com_date));
        ?>
h<?php 
        echo date("m", strtotime($comment->com_date));
        ?>
</span>
						<p>Posté par <em><?php 
        echo $comment->com_nickname;
        ?>
</em>
						<br />
						<br />
						<?php 
开发者ID:kimoudev,项目名称:blogigniter,代码行数:31,代码来源:view_content.php

示例12: mysqli_query

}

$i = '0';
if ($action === "modifier")
{
        $requete_modif = "SELECT * FROM absences_eleves WHERE id_absence_eleve ='$id'";
        $resultat_modif = mysqli_query($GLOBALS["mysqli"], $requete_modif) or die('Erreur SQL !'.$requete_modif.'<br />'.mysqli_error($GLOBALS["mysqli"]));
        while ($data_modif = mysqli_fetch_array($resultat_modif))
        {
            $type_absence_eleve[$i] = $data_modif['type_absence_eleve'];
            $eleve_absent[$i] = $data_modif['eleve_absence_eleve'];
            $justify_absence_eleve[$i] = $data_modif['justify_absence_eleve'];
            $info_justify_absence_eleve[$i] = $data_modif['info_justify_absence_eleve'];
            $motif_absence_eleve[$i] = $data_modif['motif_absence_eleve'];
            $d_date_absence_eleve[$i] = date_fr($data_modif['d_date_absence_eleve']);
            $a_date_absence_eleve[$i] = date_fr($data_modif['a_date_absence_eleve']);
            $d_heure_absence_eleve[$i] = $data_modif['d_heure_absence_eleve'];
            //$a_heure_absence_eleve[$i] = $data_modif['a_heure_absence_eleve'];
            $heure_retard_eleve[$i] = $data_modif['d_heure_absence_eleve'];
            $i = $i + 1;
        }
}

// s'il y a eu un problème alors on réaffect le donnée au nom des variables du formulaire
$i = '0';
if(isset($id_absence_eleve_erreur[0]) and !empty($id_absence_eleve_erreur[0]))
{
        while (isset($id_absence_eleve_erreur[$i]))
        {
            $type_absence_eleve[$i] = $type_absence_eleve_erreur[$i];
            $eleve_absent[$i] = $id_absence_eleve_erreur[$i];
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:ajout_ret.php

示例13: parseXmlWeather

 private static function parseXmlWeather($xml)
 {
     $weather = simplexml_load_string($xml);
     $return = array();
     if (is_object($weather)) {
         $channel_yweather = $weather->channel->children("http://xml.weather.yahoo.com/ns/rss/1.0");
         foreach ($channel_yweather as $x => $channel_item) {
             foreach ($channel_item->attributes() as $k => $attr) {
                 $yw_channel[$x][$k] = $attr;
             }
         }
         $item_yweather = $weather->channel->item->children("http://xml.weather.yahoo.com/ns/rss/1.0");
         foreach ($item_yweather as $x => $yw_item) {
             foreach ($yw_item->attributes() as $k => $attr) {
                 if ($k == 'day') {
                     $day = $attr;
                 }
                 if ($x == 'forecast') {
                     $yw_forecast[$x][$day . ''][$k] = $attr;
                 } else {
                     $yw_forecast[$x][$k] = $attr;
                 }
             }
         }
         $return = array();
         $return['condition']['text'] = (string) $yw_forecast['condition']['text'][0];
         $return['condition']['text'] = self::convertCondition($return['condition']['text']);
         $return['condition']['temperature'] = (string) $yw_forecast['condition']['temp'][0];
         $return['location']['city'] = (string) $yw_channel['location']['city'][0];
         $return['atmosphere']['humidity'] = (string) $yw_channel['atmosphere']['humidity'][0];
         $return['atmosphere']['pressure'] = (string) $yw_channel['atmosphere']['pressure'][0];
         $return['wind']['speed'] = (string) $yw_channel['wind']['speed'][0];
         $return['wind']['direction'] = (string) $yw_channel['wind']['direction'][0];
         $return['astronomy']['sunrise'] = (string) $yw_channel['astronomy']['sunrise'][0];
         $return['astronomy']['sunrise'] = date("Gi", strtotime($return['astronomy']['sunrise']));
         $return['astronomy']['sunset'] = (string) $yw_channel['astronomy']['sunset'][0];
         $return['astronomy']['sunset'] = date("Gi", strtotime($return['astronomy']['sunset']));
         $day = 0;
         foreach ($yw_forecast['forecast'] as $forecast) {
             $return['forecast'][$day]['day'] = (string) $forecast['day'][0];
             $return['forecast'][$day]['day'] = date_fr($return['forecast'][$day]['day']);
             $return['forecast'][$day]['condition'] = (string) $forecast['text'][0];
             $return['forecast'][$day]['condition'] = self::convertCondition($return['forecast'][$day]['condition']);
             $return['forecast'][$day]['low_temperature'] = (string) $forecast['low'][0];
             $return['forecast'][$day]['high_temperature'] = (string) $forecast['high'][0];
             $day++;
         }
     }
     return $return;
 }
开发者ID:eliovir,项目名称:plugin-weather,代码行数:50,代码来源:weather.class.php

示例14: date

			<div class="caption">

				<div class="row">
					<span class="col-md-3">
						<i class="glyphicon glyphicon-calendar"></i> 
						<?php 
        $jour = date("d", strtotime($row->c_cdate));
        ?>
						<?php 
        $mois = date("m", strtotime($row->c_cdate));
        ?>
						<?php 
        $annee = date("Y", strtotime($row->c_cdate));
        ?>
						<em><?php 
        echo date_fr($jour, $mois, $annee);
        ?>
</em>
					</span>
					<h2 class="col-md-9" style="margin-top: 0">
						<?php 
        echo content_url($row->r_url_rw, $row->c_url_rw, $row->c_title);
        ?>
					</h2>
				</div><!-- end of .row -->

				<div class="row">
					<div class="col-md-3">
					<?php 
        if ($page !== 'rubric') {
            ?>
开发者ID:kimoudev,项目名称:blogigniter,代码行数:31,代码来源:view_listing.php

示例15: affiche_calendrier_saisie_jour_absence

 public static function affiche_calendrier_saisie_jour_absence($user_login, $year, $mois)
 {
     $return = '';
     $jour_today = date('j');
     $jour_today_name = date('D');
     $first_jour_mois_timestamp = mktime(0, 0, 0, $mois, 1, $year);
     $last_jour_mois_timestamp = mktime(0, 0, 0, $mois + 1, 0, $year);
     $mois_name = date_fr('F', $first_jour_mois_timestamp);
     $first_jour_mois_rang = date('w', $first_jour_mois_timestamp);
     // jour de la semaine en chiffre (0=dim , 6=sam)
     $last_jour_mois_rang = date('w', $last_jour_mois_timestamp);
     // jour de la semaine en chiffre (0=dim , 6=sam)
     $nb_jours_mois = ($last_jour_mois_timestamp - $first_jour_mois_timestamp + 60 * 60 * 12) / (24 * 60 * 60);
     // + 60*60 *12 for fucking DST
     if ($first_jour_mois_rang == 0) {
         $first_jour_mois_rang = 7;
     }
     // jour de la semaine en chiffre (1=lun , 7=dim)
     if ($last_jour_mois_rang == 0) {
         $last_jour_mois_rang = 7;
     }
     // jour de la semaine en chiffre (1=lun , 7=dim)
     $return .= '<table class="table calendrier_saisie_date">';
     $return .= '<thead><tr><th colspan="7" class="titre"> ' . $mois_name . ' ' . $year . ' </th></tr><tr><th class="cal-saisie2">' . _('lundi_1c') . '</th><th class="cal-saisie2">' . _('mardi_1c') . '</th><th class="cal-saisie2">' . _('mercredi_1c') . '</th><th class="cal-saisie2">' . _('jeudi_1c') . '</th><th class="cal-saisie2">' . _('vendredi_1c') . '</th><th class="cal-saisie2">' . _('samedi_1c') . '</th><th class="cal-saisie2">' . _('dimanche_1c') . '</th></tr></thead>';
     $return .= '<tbody>';
     $start_nb_day_before = $first_jour_mois_rang - 1;
     $stop_nb_day_before = 7 - $last_jour_mois_rang;
     for ($i = -$start_nb_day_before; $i <= $nb_jours_mois + $stop_nb_day_before; $i++) {
         if (($i + $start_nb_day_before) % 7 == 0) {
             $return .= '<tr>';
         }
         $j_timestamp = mktime(0, 0, 0, $mois, $i + 1, $year);
         $td_second_class = get_td_class_of_the_day_in_the_week($j_timestamp);
         if ($i < 0 || $i > $nb_jours_mois || $td_second_class == 'weekend') {
             $return .= '<td class="' . $td_second_class . '">-</td>';
         } else {
             $val_matin = '';
             $val_aprem = '';
             recup_infos_artt_du_jour($user_login, $j_timestamp, $val_matin, $val_aprem);
             $return .= \utilisateur\Fonctions::affiche_cellule_calendrier_echange_absence_saisie_semaine($val_matin, $val_aprem, $year, $mois, $i + 1);
         }
         if (($i + $start_nb_day_before) % 7 == 6) {
             $return .= '<tr>';
         }
     }
     $return .= '</tbody>';
     $return .= '</table>';
     return $return;
 }
开发者ID:TexGG,项目名称:Libertempo,代码行数:49,代码来源:Fonctions.php


注:本文中的date_fr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。