本文整理汇总了PHP中minicals函数的典型用法代码示例。如果您正苦于以下问题:PHP minicals函数的具体用法?PHP minicals怎么用?PHP minicals使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了minicals函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sql_query
#Show all avaliable areas
echo "<u>{$lang['areas']}</u><br>";
$sql = "select id, area_name from mrbs_area order by area_name";
$res = sql_query($sql);
if ($res) {
for ($i = 0; $row = sql_row($res, $i); $i++) {
echo "<a href=\"day.php?year={$year}&month={$month}&day={$day}&area={$row['0']}\">";
if ($row[0] == $area) {
echo "<font color=\"red\">" . htmlspecialchars($row[1]) . "</font></a><br>\n";
} else {
echo htmlspecialchars($row[1]) . "</a><br>\n";
}
}
}
#Draw the three month calendars
minicals($year, $month, $day, $area);
echo "</tr></table>";
#y? are year, month and day of yesterday
#t? are year, month and day of tomorrow
$i = mktime(0, 0, 0, $month, $day - 1, $year);
$yy = date("Y", $i);
$ym = date("m", $i);
$yd = date("d", $i);
$i = mktime(0, 0, 0, $month, $day + 1, $year);
$ty = date("Y", $i);
$tm = date("m", $i);
$td = date("d", $i);
#Show current date
echo "<h2 align=center>" . strftime("%A %d %B %Y", $am7) . "</h2>\n";
#Show Go to day before and after links
echo "<table width=\"100%\"><tr><td><a href=\"day.php?year={$yy}&month={$ym}&day={$yd}&area={$area}\"><< {$lang['daybefore']}</a></td>\n <td align=center><a href=\"day.php?area={$area}\">{$lang['gototoday']}</a></td>\n <td align=right><a href=\"day.php?year={$ty}&month={$tm}&day={$td}&area={$area}\">{$lang['dayafter']} >></a></td></tr></table>";
示例2: htmlspecialchars
if ($pview != 1) {
echo "<font color=\"red\">{$this_room_name}</font></a><br>\n";
}
} else {
if ($pview != 1) {
echo htmlspecialchars($row[1]) . "</a><br>\n";
}
}
}
}
}
# end select if
if ($pview != 1) {
echo "</td>\n";
#Draw the three month calendars
minicals($year, $month, $day, $area, $room, 'month');
echo "</tr></table>\n";
}
# Don't continue if this area has no rooms:
if ($room <= 0) {
echo "<h1>" . get_string('no_rooms_for_area', 'block_mrbs') . "</h1>";
include "trailer.php";
exit;
}
# Show Month, Year, Area, Room header:
echo "<h2 align=center>" . userdate($month_start, "%B %Y") . " - {$this_area_name} - {$this_room_name}</h2>\n";
# Show Go to month before and after links
#y? are year and month of the previous month.
#t? are year and month of the next month.
$i = mktime(12, 0, 0, $month - 1, 1, $year);
$yy = date("Y", $i);
示例3: sql_query
$sql = "select id, area_name from {$tbl_area} order by area_name";
$res = sql_query($sql);
if ($res) {
for ($i = 0; $row = sql_row($res, $i); $i++) {
echo "<a href=\"day.php?year={$year}&month={$month}&day={$day}&area={$row['0']}\">";
if ($row[0] == $area) {
echo "<font color=\"red\">" . htmlspecialchars($row[1]) . "</font></a><br>\n";
} else {
echo htmlspecialchars($row[1]) . "</a><br>\n";
}
}
}
}
echo "</td>\n";
#Draw the three month calendars
minicals($year, $month, $day, $area, '', 'day');
echo "</tr></table>";
}
#y? are year, month and day of yesterday
#t? are year, month and day of tomorrow
$i = mktime(12, 0, 0, $month, $day - 1, $year);
$yy = date("Y", $i);
$ym = date("m", $i);
$yd = date("d", $i);
$i = mktime(12, 0, 0, $month, $day + 1, $year);
$ty = date("Y", $i);
$tm = date("m", $i);
$td = date("d", $i);
#We want to build an array containing all the data we want to show
#and then spit it out.
#Get all appointments for today in the area that we care about
示例4: htmlspecialchars
if ($pview != 1) {
echo "<font color=\"red\">{$this_room_name}</font></a><br>\n";
}
} else {
if ($pview != 1) {
echo htmlspecialchars($row[1]) . "</a><br>\n";
}
}
}
}
}
# end select if
if ($pview != 1) {
echo "</td>\n";
#Draw the three month calendars
minicals($year, $month, $day, $area, $room, 'week');
echo "</tr></table>\n";
}
# Don't continue if this area has no rooms:
if ($room <= 0) {
echo "<h1>" . get_vocab("no_rooms_for_area") . "</h1>";
include "trailer.inc";
exit;
}
# Show area and room:
echo "<h2 align=center>{$this_area_name} - {$this_room_name}</h2>\n";
#y? are year, month and day of the previous week.
#t? are year, month and day of the next week.
$i = mktime(12, 0, 0, $month, $day - 7, $year);
$yy = date("Y", $i);
$ym = date("m", $i);
示例5: make_area_select_html
echo make_area_select_html('week_all.php',$id_site, $area, $year, $month, $day, getUserName()); # from functions.inc.php
echo make_room_select_html('week', $area, $room, $year, $month, $day);
echo "</td>\n";
} else {
# Sélection sous la forme de listes
echo "<td>\n";
echo make_site_list_html('week_all.php',$id_site,$year,$month,$day,getUserName());
echo "</td><td>";
echo make_area_list_html('week_all.php',$id_site, $area, $year, $month, $day, getUserName()); # from functions.inc.php
echo "</td>\n<td>\n";
make_room_list_html('week.php', $area, $room, $year, $month, $day);
echo "</td>\n\n";
}
#Draw the three month calendars
minicals($year, $month, $day, $area, '', 'week_all');
echo "</tr></table>\n";
}
$this_area_name = grr_sql_query1("select area_name from ".TABLE_PREFIX."_area where id=$area");
# Show Month, Year, Area, Room header:
switch ($dateformat) {
case "en":
$dformat = "%A, %b %d";
break;
case "fr":
$dformat = "%A %d %b";
break;
}
示例6: get_form_var
}
$result->free();
$result2->free();
} else {
$timetohighlight = get_form_var('timetohighlight', 'int');
$this_user_name = get_area_name($user);
echo "<div id=\"dwm\">\n";
echo "<h2>" . htmlspecialchars("{$this_user_name}") . "</h2>\n";
echo "</div>\n";
$i = mktime(12, 0, 0, $month, $day - 7, $year);
$yy = date("Y", $i);
$ym = date("m", $i);
$yd = date("d", $i);
$i = mktime(12, 0, 0, $month, $day + 7, $year);
$ty = date("Y", $i);
$tm = date("m", $i);
$td = date("d", $i);
// Show Go to week before and after links
$before_after_links_html = "\n<div class=\"screenonly\">\n <div class=\"date_nav\">\n <div class=\"date_before\">\n <a href=\"temp.php?year={$yy}&month={$ym}&day={$yd}&user={$user}\">\n << " . get_vocab("weekbefore") . "\n </a>\n </div>\n <div class=\"date_now\">\n <a href=\"temp.php?user={$user}\">\n " . get_vocab("gotothisweek") . "\n </a>\n </div>\n <div class=\"date_after\">\n <a href=\"temp.php?year={$ty}&month={$tm}&day={$td}&user={$user}\">\n " . get_vocab("weekafter") . " >>\n </a>\n </div>\n </div>\n</div>\n";
print $before_after_links_html;
$inner_html = week_table_innerhtml($day, $month, $year, $user, $timetohighlight);
echo "<table class=\"dwm_main\" id=\"week_main\" data-resolution=\"{$resolution}\">";
echo $inner_html;
echo "</table>\n";
print $before_after_links_html;
// Draw the three month calendars
if ($display_calendar_bottom) {
minicals($year, $month, $day, $area, $room, 'temp', $user);
}
output_trailer();
}
示例7: confirm
?>
</td><td></td></tr>
</table>
<?php /* <input name="submit2" type="submit" value="supprimer la sélection" onClick="return confirm('Etes-vous sur de vouloir le supprimer...')" /> */ ?>
<input value="<?php echo $year; ?>" name="year" id="year4" type="hidden" />
<input value="<?php echo $month; ?>" name="month" id="month4" type="hidden" />
<input value="<?php echo $day; ?>" name="day" id="day4" type="hidden" />
</fieldset>
</form>
</td>
<td style="text-align: center"><br />
<form name ="form1" method="post" action="gestion_absences.php?choix=<?php echo $choix; ?>&type=<?php echo $type; ?>">
<fieldset style="background-color: #D1EFE8; background-image: url(../images/2.png); ">
<legend class="legend_texte"> Sélection </legend>
<?php //Affiche le calendrier
minicals($year, $month, $day, $classe_choix, $type, 'gestion_absences');
?>
Informations données pour la date du<br /><b><?php echo date_frl($date_ce_jour); ?></b><br /><br />
Classe
<select name="classe_choix" onChange="javascript:document.form1.submit()">
<option value="" selected onClick="javascript:document.form1.submit()">Toutes les classes</option>
<?php
$resultat_liste_classe = mysqli_query($GLOBALS["mysqli"], $requete_liste_classe) or die('Erreur SQL !'.$requete_liste_classe.'<br />'.mysqli_error($GLOBALS["mysqli"]));
While ( $data_liste_classe = mysqli_fetch_array($resultat_liste_classe)) {
if ($classe_choix==$data_liste_classe['id']) {$selected = "selected"; } else {$selected = ""; }?>
<option value="<?php echo $data_liste_classe['id']; ?>" <?php echo $selected; ?> onclick="javascript:document.form1.submit()">
<?php echo mb_substr($data_liste_classe['nom_complet'], 0, 50)." (".$data_liste_classe['classe'].")"; ?></option>
<?php } ?>
</select><noscript><input value=">>" name="date" type="submit" /></noscript><br />
<input value="<?php echo $year; ?>" name="year5" id="year" type="hidden" />
<input value="<?php echo $month; ?>" name="month5" id="month" type="hidden" />
示例8: mb_substr
if ($i != 0) echo ", ";
echo mb_substr($prof["prenom"],0,1) . ". " . $prof["nom"];
$i++;
}
echo ")</b>\n";
}
echo "</p></td>\n";
echo "<td align=\"right\">\n";
echo "<form action=\"./index.php\" method=\"post\" style=\"width: 100%;\">\n";
genDateSelector("", $day, $month, $year,'');
echo "<input type=hidden name=id_groupe value=$id_groupe />\n";
echo "<input type=hidden name=id_classe value=$id_classe />\n";
echo $aff_input_rne . "\n";
echo "<input type=\"submit\" value=\"OK\"/></form>\n";
//Affiche le calendrier
minicals($year, $month, $day, $id_groupe, 'index.php?');
echo "</td>";
echo "</tr></table>\n<hr />\n";
$test_cahier_texte = mysqli_query($GLOBALS["mysqli"], "SELECT contenu FROM ct_entry WHERE (id_groupe='$id_groupe')");
$nb_test = mysqli_num_rows($test_cahier_texte);
$delai = getSettingValue("delai_devoirs");
//Affichage des devoirs globaux s'il n'y a pas de notices dans ct_entry à afficher
if (($nb_test == 0) and ($id_classe != -1) and ($delai != 0)) {
if ($delai == "") die("Erreur : Délai de visualisation du travail personnel non défini. Contactez l'administrateur de GEPI de votre établissement.");
$nb_dev = 0;
for ($i = 0; $i <= $delai; $i++) {
$aujourhui = $aujourdhui = mktime(0,0,0,date("m"),date("d"),date("Y"));
$jour = mktime(0, 0, 0, date('m',$aujourhui), (date('d',$aujourhui) + $i), date('Y',$aujourhui) );
$appel_devoirs_cahier_texte = mysqli_query($GLOBALS["mysqli"], "SELECT ct.contenu, g.id, g.description, ct.date_ct, ct.id_ct " .
"FROM ct_devoirs_entry ct, groupes g, j_groupes_classes jc WHERE (" .
"ct.id_groupe = jc.id_groupe and " .
示例9: genDateSelector
echo "</div>\n";
//echo "<td align=\"right\">\n";
// Modification Régis : la colonne de droite doit être avant la colonne centrale
echo "<div class=\"ct_col_droit\">\n";
echo "<h2 class='invisible'>Calendrier</h2>";
echo "<form action=\"./consultation.php\" method=\"post\" style=\"width: 100%;\">\n";
echo "<p>";
genDateSelector("", $day, $month, $year, '');
echo "<input type=\"hidden\" name=\"id_groupe\" value=\"{$id_groupe}\" />\n";
echo "<input type=\"hidden\" name=\"id_classe\" value=\"{$id_classe}\" />\n";
echo "<input type=\"hidden\" name=\"login_eleve\" value=\"{$login_eleve}\" />\n";
echo "<input type=\"submit\" value=\"OK\" />\n";
echo "</p>\n";
echo "</form>\n";
//Affiche le calendrier
minicals($year, $month, $day, $id_groupe, 'consultation.php?');
echo "</div>\n";
//echo "<td style=\"text-align:center;\">\n";
//echo "<td class=\"ct_col_centre\" style=\"text-align:center;\">\n";
// Modification Régis : la colonne centrale doit être à la fin pour que son contenu se positionne entre les 2 autres
echo "<div class=\"ct_col_centre\">\n";
echo "<p>\n";
echo "<span class='grand'>Cahier de textes";
if ($current_group) {
echo " - {$matiere_nom} ({$matiere_nom_court})";
}
if ($id_classe != null) {
echo "<br />{$classe_nom}";
} elseif (isset($id_groupe) && is_numeric($id_groupe)) {
$tmp_tab = get_classes_from_id_groupe($id_groupe);
if (isset($tmp_tab['classlist_string'])) {
示例10: basename
<?php
if ($_GET['pview'] != 1) {
$path = $_SERVER['PHP_SELF'];
$file = basename($path);
if ($file == 'month_all2.php') {
echo '<div id="menuGaucheMonthAll2">';
} else {
echo '<div id="menuGauche">';
}
$pageActuel = str_replace(".php", "", basename($_SERVER['PHP_SELF']));
minicals($year, $month, $day, $area, $room, $pageActuel);
if (isset($_SESSION['default_list_type']) || Settings::get("authentification_obli") == 1) {
$area_list_format = $_SESSION['default_list_type'];
} else {
$area_list_format = Settings::get("area_list_format");
}
if ($area_list_format != "list") {
if ($area_list_format == "select") {
echo make_site_select_html('week_all.php', $id_site, $year, $month, $day, getUserName());
echo make_area_select_html('week_all.php', $id_site, $area, $year, $month, $day, getUserName());
echo make_room_select_html('week', $area, $room, $year, $month, $day);
} else {
echo make_site_item_html('week_all.php', $id_site, $year, $month, $day, getUserName());
echo make_area_item_html('week_all.php', $id_site, $area, $year, $month, $day, getUserName());
echo make_room_item_html('week', $area, $room, $year, $month, $day);
}
} else {
echo make_site_list_html('week_all.php', $id_site, $year, $month, $day, getUserName());
echo make_area_list_html('week_all.php', $id_site, $area, $year, $month, $day, getUserName());
echo make_room_list_html('week.php', $area, $room, $year, $month, $day);
示例11: basename
$tplArrayMenuGauche = [];
$tplArrayMenuGauche['pview'] = false;
$path = $_SERVER['PHP_SELF'];
$file = basename($path);
if ($file == 'month_all2.php' or Settings::get('menu_gauche') == 0) {
$tplArrayMenuGauche['menuGaucheMonthAll2'] = true;
} else {
$tplArrayMenuGauche['menuGaucheMonthAll2'] = false;
}
$pageActuel = str_replace('.php', '', basename($_SERVER['PHP_SELF']));
/* todo passer minicals à twig */
/**
* Liste des param de minical
* $year, $month, $day, $area, $room, $dmy
*/
$tplArrayMenuGauche['returnCalHtml'] = minicals($year, $month, $day, $area, $room, $pageActuel);
if (isset($_SESSION['default_list_type']) || Settings::get('authentification_obli') == 1) {
$area_list_format = $_SESSION['default_list_type'];
} else {
$area_list_format = Settings::get('area_list_format');
}
/* je récupére an tableau $tplArray par list ou false si il n'y a rien à afficher */
$tplArrayMenuGauche['siteSelection'] = make_site_selection_fields('week_all.php', $id_site, $year, $month, $day, getUserName(), $area_list_format);
$tplArrayMenuGauche['areaSelection'] = make_area_selection_fields('week_all.php', $id_site, $area, $year, $month, $day, getUserName(), $area_list_format);
$tplArrayMenuGauche['roomSelection'] = make_room_selection_fields('week', $area, $room, $year, $month, $day, $area_list_format);
if (Settings::get('legend') == '0') {
$tplArrayMenuGauche['showColour'] = show_colour_key($area);
}
} else {
$tplArrayMenuGauche = false;
}
示例12: make_area_select_html
echo make_area_select_html('month_all2.php',$id_site, $area, $year, $month, $day, getUserName());
echo make_room_select_html('month',$area, $room, $year, $month, $day);
echo "</td>\n";
} else {
# Sélection sous la forme de listes
echo "<td>\n";
echo make_site_list_html('month_all2.php',$id_site,$year,$month,$day,getUserName());
echo "</td><td>";
echo make_area_list_html('month_all2.php',$id_site, $area, $year, $month, $day, getUserName());
echo "</td>\n<td>\n";
make_room_list_html('month.php', $area, $room, $year, $month, $day);
echo "</td>\n\n";
}
#Draw the three month calendars
minicals($year, $month, $day, $area, '', 'month_all2');
echo "</tr></table>\n";
}
$this_area_name = grr_sql_query1("select area_name from ".TABLE_PREFIX."_area where id=$area");
echo "<div class=\"titre_planning\">" . ucfirst(utf8_strftime("%B %Y", $month_start))
. "<br />".ucfirst($this_area_name)." - ".get_vocab("all_areas");
if ($_GET['pview'] != 1) echo " <a href=\"month_all.php?year=$year&month=$month&area=$area\"><img src=\"img_grr/change_view.png\" alt=\"".get_vocab("change_view")."\" title=\"".get_vocab("change_view")."\" class=\"image\" /></a>";
echo "</div>\n";
# Show Go to month before and after links
#y? are year and month of the previous month.
#t? are year and month of the next month.
示例13: genDateSelector
echo $legend;
}
//echo "</center>\n";
echo "</td>\n";
// Troisième cellule de la première ligne du tableau
echo "<td align=\"right\">\n";
echo "<form action=\"./index.php\" method=\"post\" style=\"width: 100%;\">\n";
genDateSelector("", $day, $month, $year, '');
echo "<input type=\"hidden\" name=\"id_groupe\" value=\"" . $current_group["id"] . "\"/>\n";
echo "<input type=\"hidden\" name=\"uid_post\" value=\"" . $uid . "\"/>\n";
echo "<input type=\"submit\" value=\"OK\"/>\n</form>\n";
//Affiche le calendrier
if (isset($edit_devoir)) {
minicals($year, $month, $day, $current_group["id"], 'index.php?edit_devoir=yes&');
} else {
minicals($year, $month, $day, $current_group["id"], 'index.php?');
}
} else {
echo "<span class='grand'> - Sélectionnez un groupe.</span>\n";
}
// Fin deuxième ou troixième cellule de la première ligne du tableau
echo "</td>\n";
echo "</tr>\n</table>\n<hr />\n";
// Si le choix du groupe n'a pas été fait, on affiche un texte d'explication et de mise en garde
if ($id_groupe == null) {
if (getSettingValue("cahiers_texte_login_pub") != '' and getSettingValue("cahiers_texte_passwd_pub") != '') {
echo " <b>AVERTISSEMENT</b> : En raison du caractère personnel du contenu, l'accès au <a href=\"../public\">site de consultation publique du cahier de textes</a> est restreint.\n Pour accéder aux cahiers de textes, le visiteur (élève, parent, ...) doit être en possession d'un nom d'utilisateur et d'un mot de passe valides.\n";
} elseif (getSettingValue('cahier_texte_acces_public') == 'no') {
echo '<p style="font-weight: bold;">L\'accès aux cahiers de textes est protégé.</p>';
} else {
echo " <b><span style='font-weight:bold;'>AVERTISSEMENT</span> : l'accès à l'interface de consultation publique du cahier de textes est entièrement libre et n'est soumise à aucune restriction.</b>\n";