本文整理汇总了PHP中getMonth函数的典型用法代码示例。如果您正苦于以下问题:PHP getMonth函数的具体用法?PHP getMonth怎么用?PHP getMonth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMonth函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: graph_line
function graph_line($file, $tab)
{
$handle = fopen("./{$file}", "w");
fwrite($handle, "<chart>\n");
/* ecriture des options */
fwrite($handle, file_get_contents('./xml/options.xml'));
fwrite($handle, "\t<chart_data>\n");
fwrite($handle, "\t\t<row>\n");
fwrite($handle, "\t\t\t<null/>\n");
for ($i = 1; $i <= 12; $i++) {
$month = getMonth($i);
fwrite($handle, "\t\t\t<string>{$month}</string>\n");
}
fwrite($handle, "\t\t</row>\n");
/* Boucle sur chaque catégorie */
foreach ($tab as $key => $value) {
fwrite($handle, "\t\t<row>\n");
fwrite($handle, "\t\t\t<string>{$key}</string>\n");
/* Boucle sur chaque mois */
foreach ($value as $money) {
fwrite($handle, "\t\t\t<number>{$money}</number>\n");
}
fwrite($handle, "\t\t</row>\n");
}
fwrite($handle, "\t</chart_data>\n");
fwrite($handle, "\t<chart_type>Line</chart_type>\n");
fwrite($handle, "</chart>\n");
fclose($handle);
}
示例2: getMonths
function getMonths()
{
getMonth("januar");
getMonth("februar");
getMonth("marec");
getMonth("april");
getMonth("maj");
getMonth("junij");
getMonth("julij");
getMonth("avgust");
getMonth("september");
getMonth("oktober");
getMonth("november");
getMonth("december");
}
示例3: convertMessageDate
function convertMessageDate($date, $use_today = false)
{
$day = convertDate($date, "d");
$month = convertDate($date, "m");
$year = convertDate($date, "Y");
$hour = convertDate($date, "H");
$minute = convertDate($date, "i");
$today = date("Ymd");
if (date("Ymd") == $year . $month . $day || !$use_today) {
$formatted_date = "{$day}. " . getMonth($month) . " um {$hour}:{$minute}";
} else {
$formatted_date = "{$day}. " . getMonth($month) . " {$year}";
}
return $formatted_date;
}
示例4: getMonth
<td><a href="index.php?a=5&b=4&month=' . $i . '&year=' . $year . '">' . getMonth($i) . '</a></b> </td>
<td>' . $tauxPresence . '%</td>
</tr>';
}
}
// fin du for
?>
</tbody></table>
</div></div>
<?php
$row = getStatPresents($month, $year, $epn, "a");
// retourne l'array de presents/inscrits/label
$nbp = mysqli_num_rows($row);
if ($nbp != 0) {
echo '<div class="box"><div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">Détail pour le mois de ' . getMonth($month) . '</h3></div>
<div class="box-body"><table class="table table-condensed">
<thead><tr><th>Date</th>
<th>Nom de l\'atelier</th>
<th>Nb. d\'inscrits</th>
<th>Nb. de présents</th>
<th>Taux de présence</th></tr></thead><tbody>
';
for ($x = 1; $x <= $nbp; ++$x) {
$presence = mysqli_fetch_array($row);
echo '<tr>
<td>' . $presence['date_AS'] . '</td>
<td>' . $presence['label_atelier'] . '</td>
<td>' . $presence['inscrits'] . '</td>
<td>' . $presence['presents'] . '</td>
<td>' . $presence['total'] . '%</td></tr>';
示例5: datepicker
} else {
include_once "menu.php";
include_once 'class/Log.php';
include_once 'class/SelectCtrl.php';
include_once "../../class/datepicker/class.datepicker.php";
$dp = new datepicker("{$tableprefix}");
$dp->dateFormat = 'Y-m-d';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$ctrl = new SelectCtrl();
$accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
$accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
$periodctrl = $ctrl->getSelectPeriod(0, 'Y');
$showDateFrom = $dp->show("datefrom");
$showDateTo = $dp->show("dateto");
$datefrom = getMonth(date("Ymd", time()), 0);
$dateto = getMonth(date("Ymd", time()), 1);
echo <<<EOF
<table border='1'>
<tbody>
<tr><TH colspan='4' style='text-align: center'>Criterial</TH></tr>
\t<FORM name='frmTrialBalance' method='POST' target="_blank" >
\t<tr>
\t\t<!--
\t\t<Td class='head'>Account From</Td>
\t\t<Td class='odd'><input name='accounts_codefrom1' value="{$accounts_codefrom}"></Td>
\t\t<Td class='head'>Account To</Td>
\t\t<Td class='odd'><input name='accounts_codeto1' value="{$accounts_codeto}"></Td>-->
\t\t
\t\t<Td class='head'>Account From</Td>
\t\t<Td class='odd'>{$accountsctrlfrom}</Td>
\t\t<Td class='head'>Account To</Td>
示例6: key
$param['name'] = $request['name'];
}
if (isset($request['staff_cd'])) {
$param['staff_cd'] = $request['staff_cd'];
}
$termid = false;
if (isset($request['submit'])) {
$button = key($request['submit']);
if (isset($request['weekDays'][$button])) {
$titleDay = $request['weekDays'][$button];
//TOPからの遷移
// $year = 2014;
// $titleDay = 0101;
$date = changeYYMMDD($year, $titleDay);
$year = getYear($date);
$month = getMonth($date);
$day = getDayYmd($date);
$termid = getTermId($date);
$param['target_date'] = $date;
$param['titleDay'] = $titleDay . '(' . $day . ')';
}
if (isset($request['title'][$button])) {
$param['title'] = $request['title'][$button];
}
if (isset($request['comment'][$button])) {
$param['comment'] = $request['comment'][$button];
}
if (isset($request['sort_order'][$button])) {
$param['sort_order'] = $request['sort_order'][$button];
}
if (isset($request['holiday_flg'][$button])) {
示例7: getUserInfoHTML
//.........这里部分代码省略.........
echo $LineMiddle . $this->cellPhone . $LineEnd;
?>
</td>
</tr>
<tr>
<td>דוא"ל</td>
<td>
<?php
echo $LineStart;
if ($edit) {
echo "email";
}
echo $LineMiddle . $this->email . $LineEnd;
?>
</td>
</tr>
<tr>
<td> תאריך לידה</td>
<td>
<?php
//echo $LineStart;
if ($edit) {
?>
<select name="year_of_birth" >
<?php
getYear($this->BirthYear);
?>
</select>
<select name="month_of_birth" >
<?php
getMonth($this->birthMonth);
?>
</select>
<select name="day_of_birth" >
<?php
getDay($this->birthDay);
?>
</select> <?php
} else {
if (strcmp($this->BirthYear, "") != 0 && $this->BirthYear != 0) {
echo $LineMiddle . $this->birthDay . "/" . $this->birthMonth . "/" . $this->BirthYear . $LineEnd;
}
}
?>
</td>
</tr>
<tr>
<td>ישוב</td>
<td>
<?php
echo $LineStart;
if ($edit) {
echo "city";
}
echo $LineMiddle . $this->city . $LineEnd;
?>
</td>
</tr>
<tr>
<td>רחוב</td>
<td>
示例8: draw_page
function draw_page($persistent)
{
?>
<h1>ברוכים הבאים - אנא מלאו את הפרטים הבאים על מנת להצטרף למערכת</h1>
<form name="registation" method="POST">
<table>
<tr>
<td>*שם פרטי:</td>
<td>
<input type="text" name="first_name" title="הכנס שם פרטי" value="<?php
print_r($persistent["first_name"]);
?>
">
</td>
</tr>
<tr>
<td>*שם משפחה:</td>
<td>
<input type="text" name="last_name" title="הכנס שם משפחה"value="<?php
print_r($persistent["last_name"]);
?>
">
</td>
</tr>
<tr>
<td>*שם משתמש:</td>
<td>
<input type="text" name="user_name" title="הכנס שם משתמש באותיות לועזיות" value="<?php
print_r($persistent["user_name"]);
?>
">
</td>
</tr>
<tr>
<td>*סיסמא:</td>
<td>
<input type="password" name="pass1" title="הכנס סיסמה סודית" value=<?php
print_r($persistent["pass1"]);
?>
>
</td>
</tr>
<tr>
<td>*אימות סיסמא:</td>
<td>
<input type="password" name="pass2" title="הכנס סיסמה סודית" value=<?php
print_r($persistent["pass1"]);
?>
>
</td>
</tr>
<tr>
<td>בית ספר:</td>
<td>
<select name="memberOfGroup">
<?php
getGroupsList();
?>
</select>
</td>
</tr>
<tr>
<td>מספר זהות:</td>
<td>
<input type="text" name="ID" title="הכנס מספר זהות בן 9 ספרות" value="<?php
print_r($persistent["ID"]);
?>
">
</td>
</tr>
<tr>
<td>כתובת דוא"ל:</td>
<td>
<input type="text" name="email" title="הכנס כתובת דואר אלקטרוני" value=<?php
print_r($persistent["email"]);
?>
>
</td>
</tr>
<tr>
<td>תאריך לידה:</td>
<td>
<select name="year_of_birth" >
<?php
getYear();
?>
</select>
<select name="month_of_birth" >
<?php
getMonth();
?>
</select>
//.........这里部分代码省略.........
示例9: dbUpdate
dbUpdate($query, $connection);
dbLog('delete event ' . $mid, $connection);
header('Location: manageevents.php');
} else {
if (isset($_GET['action']) && $_GET['action'] === 'update') {
$connection = dbConnect();
$events = dbQuery("SELECT * FROM events WHERE deleted=false ORDER BY date", $connection);
$file = fopen('../events.xml', 'w');
// exclusive lock
if (flock($file, LOCK_EX)) {
fwrite($file, '<?xml version="1.0" encoding="iso-8859-7"?>' . "\n");
fwrite($file, "<Records>\n");
foreach ($events as $event) {
fwrite($file, "\t<Event>\n");
fwrite($file, "\t\t<Year>" . substr($event['date'], 0, 4) . "</Year>\n");
fwrite($file, "\t\t<Month>" . getMonth(substr($event['date'], 5, 2)) . "</Month>\n");
fwrite($file, "\t\t<Day>" . sprintf("%d", substr($event['date'], 8, 2)) . "</Day>\n");
fwrite($file, "\t\t<Desc_en>" . htmlspecialchars($event['msg_en'], ENT_QUOTES) . "</Desc_en>\n");
fwrite($file, "\t\t<Desc_gr>" . htmlspecialchars($event['msg_gr'], ENT_QUOTES) . "</Desc_gr>\n");
fwrite($file, "\t\t<Link>" . htmlspecialchars($event['link'], ENT_QUOTES) . "</Link>\n");
fwrite($file, "\t</Event>\n");
}
fwrite($file, "</Records>\n");
flock($file, LOCK_UN);
$connection = dbConnect();
dbLog('update XML event file', $connection);
} else {
echo 'Error locking file!';
}
fclose($file);
header('Location: manageevents.php');
示例10: json2Arr
function json2Arr($json)
{
$arr = json_decode($json, true);
// print_r($arr);
$res = [];
foreach ($arr['jsonList'] as $list) {
$metadata = getMeta($list);
// get some metadata
$month1 = getMonth($metadata, $list['month1List']);
$month2 = getMonth($metadata, $list['month2List']);
$month3 = getMonth($metadata, $list['month3List']);
$res = array_merge($res, $month1, $month2, $month3);
}
return $res;
}
示例11: number_format
echo "<form method=POST action='./aksi.php?module=pembelian_barang&act=input'>\n <input type=hidden name='tot_pembayaran' value='{$tot_pembelian}' id='tot_pembayaran'>\n <table class=tableku width=600>\n <tr><td width=65% align=right><a name='#total'>Total Pembelian</a><br />\n\t\t\t\t<a href='#total' onclick=\"Recalc();\" accesskey='u'>Hitung (U)lang</a></td><td align=right><input id='grandtotal' readonly='readonly' value='" . number_format($tot_pembelian, 0, ',', '.') . "' tabindex=15></td></tr>\n <tr><td width=65% align=right>Tipe Pembayaran</td>\n <td align=right><select name='tipePembayaran' tabindex=16>\n <option value='0'>-Tipe Pembayaran-</option>";
while ($pembayaran = mysql_fetch_array($pmbyrn)) {
echo "<option value='{$pembayaran['idTipePembayaran']}'>{$pembayaran['tipePembayaran']}</option>";
}
echo "</select></td></tr>\n <tr><td width=65% align=right>Tanggal Pembayaran (hutang)</td><td align=right><input type=text name='tglBayar' tabindex=17></td></tr>\n <tr><td width=65% align=right>Nomor Invoice</td><td align=right><input type=text name='NomorInvoice' value=0 tabindex=18></td></tr>\n <tr><td width=65% align=right>Tanggal Invoice</td><td align=right><input type=text name='TanggalInvoice'\n\t\t\tvalue='" . date("Y-m-d") . "' tabindex=19></td></tr>\n\t\t\t<tr><td width=65% align=right>Diskon (%)</td><td align=right><input type=text id='diskonpersen' name='DiskonPersen' value=0 tabindex=20></td></tr>\n\t\t\t<tr><td width=65% align=right>Diskon (Rp)</td><td align=right><input type=text id='diskonrupiah' name='DiskonRupiah' value=0 tabindex=21></td></tr>\n\t\t\t<tr><td width=65% align=right>PPn (%)</td><td align=right><input type=text id='ppn' name='PPN' value=0 tabindex=22></td></tr>";
echo "\n <tr><td colspan=2> </td></tr>\n <tr>\n\t\t\t\t<td><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a></td>\n\n\t\t\t\t<td>\n\t\t\t\t\t<input type='hidden' name='idSupplier' value='" . $_SESSION['idSupplier'] . "'>\n\t\t\t\t\t<input type=submit value='Simpan' tabindex=23>\n\t\t\t\t</td>\n\t\t\t</tr>\n </table></form>\n\t\t\t";
//fixme : Pembatalan Nota (code di atas & bawah komentar ini) perlu merujuk ke user ybs,
// agar jangan keliru menghapus nota yang sedang di input oleh user yang lainnya
} else {
echo "Belum ada barang yang dibeli<br /><a href='aksi.php?module=pembelian_barang&act=batal'>BATAL</a>";
}
break;
case "laporanpembeliantanggal":
// ===============================================================================================================
echo "<h2>Laporan Pembelian (per Tanggal)</h2>\n <form method=POST action='?module=pembelian_barang&act=laporanpembeliantanggal&action=pilihtanggal'>\n\n <br />Periode Laporan : Bulan :\n <select name=bulanLaporan>";
$dataBulan = getMonth();
while ($bulan = mysql_fetch_array($dataBulan)) {
echo "<option value={$bulan['bulan']}>" . getBulanku($bulan[bulan]) . "</option>";
}
echo "</select>, Tahun :\n <select name=tahunLaporan>";
$dataTahun = getYear();
while ($tahun = mysql_fetch_array($dataTahun)) {
echo "<option value={$tahun['tahun']}>{$tahun['tahun']}</option>";
}
echo "</select>\n <input type=submit value=Lihat>\n </form>\n ";
if ($_GET[action] == 'pilihtanggal') {
// ------------------------------------------------------------
$sql = "SELECT tglTransaksiBeli, idTransaksiBeli FROM transaksibeli\n\t\t\t\tWHERE month(tglTransaksiBeli)='{$_POST['bulanLaporan']}' AND year(tglTransaksiBeli)='{$_POST['tahunLaporan']}'\n\t\t\t\tORDER BY tglTransaksiBeli, idTransaksiBeli ASC";
$hasil = mysql_query($sql);
?>
<hr />
示例12: showContent
function showContent($authorise, $selectedText, $option)
{
$strContent = "";
$choice = 0;
$dte1 = "";
$dte2 = "";
$curDate = "";
$event = "";
switch ($option) {
case "1":
$year = $_GET['MYear'];
$dte1 = $year . "-" . $selectedText . "-" . "01";
$dte2 = $year . "-" . $selectedText . "-" . "31";
$filterval = "eventtime between '" . $dte1 . "' and '" . $dte2 . "' ";
$choice = 1;
break;
case "2":
$curDate = date("d.m.Y");
$arrDate = explode(".", $curDate);
$dte1 = $selectedText . "-01-01";
$dte2 = $selectedText . "-12-31";
$filterval = "eventtime between '" . $dte1 . "' and '" . $dte2 . "' ";
$choice = 2;
break;
case "3":
if (isset($_GET['Datestart'])) {
$startdate = getDateToDb($_GET['Datestart']);
$enddate = getDateToDb($_GET['Dateclose']);
} else {
$arrDate = strtEndDateMonthDiff();
$startdate = $arrDate[0];
$enddate = $arrDate[1];
}
$filterval = "eventtime between '" . $startdate . "' and '" . $enddate . "' ";
$choice = 3;
break;
case "4":
$filterval = "event like '%" . $selectedText . "' ";
$choice = 4;
break;
default:
break;
}
$result = mysql_query("select * from eventlog where 1=1 and " . $filterval . " ") or die(mysql_error());
$paginationQuery = "select * from eventlog where 1=1 and " . $filterval;
$intCount = mysql_num_rows($result);
if ($intCount > 0) {
if ($choice == 1) {
echo '<h4>Report on ' . getMonth($selectedText) . ' ' . $_GET['MYear'] . '</h4><br>';
} else {
if ($choice == 2) {
echo '<h4>Report For The Year ' . $selectedText . '</h4><br>';
} else {
if ($choice == 3) {
if (isset($_GET['Datestart'])) {
echo '<h4>Report on ' . $_GET['Datestart'] . ' and ' . $_GET['Dateclose'] . '</h4><br>';
} else {
echo '<h4>Report on ' . getDateFromDb($startdate) . ' and ' . getDateFromDb($enddate) . '</h4><br>';
}
} else {
echo '<h4>Report on ' . $selectedText . '</h4><br>';
}
}
}
/* function for pagination */
list($result, $classObj, $dispyListInfo) = classPagination($paginationQuery, $intCount);
$listData = listEvent($authorise, $intCount, $result);
$strContent .= $listData;
$strContent .= '<br /><br />';
$strContent .= $dispyListInfo . '<br />';
$strContent .= $classObj->navigationBar();
} else {
$strContent .= "No data is stored in the database or you are not authorised to view this data";
}
echo $strContent;
}
示例13: getMonth
<div class="box box-primary">
<div class="box-header"><i class="fa fa-bar-chart-o"></i><h3 class="box-title">Nombre d'heures de réservation par jour pour le mois de <?php
echo getMonth($month);
?>
</h3></div>
<div class="box-body">
<?php
for ($i = 1; $i <= $nb_jour; ++$i) {
$result = getStatResaByDay($year . '-' . $month . '-' . $i, $epn);
//debug($result['duree']);
$dataSet3->addPoint(new Point($i, $result['duree']));
$maxBound[$i] = $result['duree'];
}
$maxValue = ceil(max($maxBound) / 60);
$chart3->setDataSet($dataSet3);
$chart3->setTitle("Detail des heures pour " . getMonth($month) . " " . $year . " ");
$chart3->getPlot()->getPalette()->setBarColor(array(new Color(128, 195, 28)));
$chart3->getPlot()->setLabelGenerator(new TimeLabelGenerator());
// arrondir la valeur maximale supérieure
$chart3->getBound()->setUpperBound($maxValue * 60);
// $chart3->getTics()->quantizeTics(12);
$chart3->render("img/chart/" . $year . "/" . $namepn . "_resa-Mensuelle-" . $month . ".png");
?>
<!-- rendu du graphique sous forme d'image-->
<img src="img/chart/<?php
echo $year;
?>
/<?php
echo $namepn;
?>
_resa-Mensuelle-<?php
示例14: getMonth
$row .= "<th colspan='3'>" . getMonth($i) . "</th>";
$row .= "</thead>";
$row .= "<tbody>";
#body
for ($j = 0; $j < count($retI[$i]); $j++) {
$row .= "<tr>";
$row .= "<td style='background-color: #E7BAB6;'>- " . money_format('%(#5n', $retI[$i][$j][0]) . "</td>";
$row .= "<td> Descripcion</td>";
$row .= "<td><button class='remove' data-id='" . $retI[$i][$j][1] . "' value='remove' style='color:green;'>Quitar adeudo</button></td>";
$row .= "</tr>";
}
$row .= "</tbody>";
$row .= "</table>";
$row .= "<div class='mdl-card__actions mdl-card--border'>";
$row .= "<input id='ingresoFijo' class='monthlyInput' type='text' name='amount' placeholder='100' style='color:black;'>";
$row .= "<button style='color:red;' class='insertMonthly mdl-button mdl-js-button mdl-js-ripple-effect' data-idu='1'>Pagaste dinero en " . getMonth($i) . "</button>";
$row .= "</div>";
#button
echo $row;
}
}
?>
</div>
</div>
</div>
<script>
示例15: isEntryEnabledFeedback
/**
* 週報(トレーナー、責任者)DB登録可否判定
* 登録可能の場合、trueを返す
*
* @param
*/
function isEntryEnabledFeedback($sql_flg, $staff_id, $term_id, $boss_id, $boss_flg, $data_type, $wm_flg)
{
$isEnabled = true;
$sql = "SELECT COUNT(*) as cnt FROM `t_feedback` WHERE `staff_id` = :staff_id AND `term_id` = :term_id AND `data_type` = :data_type";
$searchParam = array('staff_id' => $staff_id, 'term_id' => $term_id['id'], 'data_type' => $data_type);
if ($boss_flg == 'trainer') {
$searchParam['trainer_id'] = $boss_id;
$sql .= ' AND `trainer_id` = :trainer_id';
} elseif ($boss_flg == 'admin') {
$searchParam['admin_id'] = $boss_id;
$sql .= ' AND `admin_id` = :admin_id';
}
// データベースに接続する
$conn = DbControl::getInstance();
$conn->dbConnect(DbControl::SLAVE_DB);
// クエリを実行する
$res = $conn->dbExecFetch(DbControl::SLAVE_DB, $sql, $searchParam);
if (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'insert') {
if (isset($res) && $res['cnt'] > 0) {
$isEnabled = false;
} else {
$isEnabled = true;
}
} elseif (isset($sql_flg) && !empty($sql_flg) && $sql_flg == 'update') {
if (isset($res) && $res['cnt'] > 0) {
if ($wm_flg == 'weekly') {
$tense = $this->tenseWeekly($term_id['id']);
} elseif ($wm_flg == 'monthly') {
$target_year = getYear($this->request['target_date']);
$target_month = getMonth($this->request['target_date']);
$tense = tenseMonthly($target_year, $target_month);
}
if ($tense) {
$isEnabled = true;
} else {
$isEnabled = false;
}
} else {
$isEnabled = false;
}
}
// データベースを切断する
$conn->dbClose(DbControl::SLAVE_DB);
return $isEnabled;
}