本文整理汇总了PHP中getMonth函数的典型用法代码示例。如果您正苦于以下问题:PHP getMonth函数的具体用法?PHP getMonth怎么用?PHP getMonth使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMonth函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:relisher,项目名称:logiciel_de_compte,代码行数:29,代码来源:graph_line.php
示例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");
}
开发者ID:jakakordez,项目名称:cycling-stats,代码行数:15,代码来源:translation.php
示例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;
}
开发者ID:BGCX067,项目名称:fakebookap-svn-to-git,代码行数:15,代码来源:date.func.php
示例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>';
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:31,代码来源:admin_stat_atelier.php
示例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>
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:viewtrialbalance_detail.php
示例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])) {
开发者ID:te-koyama,项目名称:sheep,代码行数:31,代码来源:daily_edit.php
示例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>
开发者ID:BGCX261,项目名称:zivweb-svn-to-git,代码行数:67,代码来源:UserClass.php
示例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>
//.........这里部分代码省略.........
开发者ID:BGCX261,项目名称:zivweb-svn-to-git,代码行数:101,代码来源:new_user_registration.php
示例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');
开发者ID:gkastrinis,项目名称:talk-material,代码行数:31,代码来源: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;
}
开发者ID:hunkim,项目名称:kproperty,代码行数:15,代码来源:util.php
示例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 />
开发者ID:nurulimamnotes,项目名称:AhadPOS2,代码行数:31,代码来源:mod_beli_barang.php
示例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;
}
开发者ID:anishsheela,项目名称:Zyxware-Health-Monitoring-System,代码行数:76,代码来源:listeventlog.php
示例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
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:31,代码来源:admin_stat_resa.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>
开发者ID:ndrd,项目名称:cochinito,代码行数:31,代码来源:egress.php
示例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;
}
开发者ID:te-koyama,项目名称:sheep,代码行数:51,代码来源:class.Edit.php
示例16: formValidate
//.........这里部分代码省略.........
if ( !isset($data['section_cd']) && emp($data['section_cd']) ){
$error[] = "課・支店CDが取得できませんでした。";
}
//職種CDを確認
if ( !isset($data['occupation_cd']) && emp($data['occupation_cd']) ){
$error[] = "職種CDが取得できませんでした。";
}
//職種名を確認
if ( !isset($data['occupation']) && emp($data['occupation']) ){
$error[] = "職種名が取得できませんでした。";
}
*/
//権限を確認
if (isset($data['group_cd'])) {
if (is_array($data['group_cd']) && in_array(ACCOUNT_NEW_EMP, $data['group_cd']) && count($data['group_cd']) > 1) {
$error[] = "新入社員権限は他の権限と併用できません。";
}
}
//退職フラグを確認
if (isset($data['retire_flg']) && !preg_match("/^\\d\$/", $data['retire_flg'])) {
$error[] = "退職フラグ指定値が不正です。";
}
//件数分の判定処理
$cnt = 0;
for ($i = 0; $i < 3; $i++) {
//トレーナー確認
if (isset($data["department_cd_trainer{$i}"]) && !emp($data["department_cd_trainer{$i}"])) {
if (!isset($data["user_id_trainer{$i}"]) || emp($data["user_id_trainer{$i}"])) {
$error[] = "担当OJTトレーナー" . ($i + 1) . "人目の「トレーナー名」が選択されていません。";
}
}
//責任者確認
/*
if( isset($data["department_cd_admin{$i}"]) && !emp( $data["department_cd_admin{$i}"] ) ){
if( !isset($data["user_id_admin{$i}"]) || emp( $data["user_id_admin{$i}"] ) ){
$error[] = "担当OJT責任者".($i+1)."人目の「責任者名」が選択されていません。";
}
}
*/
//責任者所属選択あり、責任者名選択なし/期間指定なし
if (isset($data["department_cd_admin{$i}"]) && !emp($data["department_cd_admin{$i}"])) {
if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
}
if (!isset($data["start_date_admin{$i}"]) || emp($data["start_date_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」を入力されていません。";
}
if (!isset($data["end_date_admin{$i}"]) || emp($data["end_date_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」を入力されていません。";
}
}
//責任者紐付き期間確認
//半角数字8桁・正しい日付けか
if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"])) {
$year = getYear($data["start_date_admin{$i}"]);
$month = getMonth($data["start_date_admin{$i}"]);
$day = getDays($data["start_date_admin{$i}"]);
if (!preg_match("/^\\d{8}\$/", $data["start_date_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は半角数字8桁で入力してください。";
} elseif (!checkdate($month, $day, $year)) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」が不正です。";
}
}
if (isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
$year = getYear($data["end_date_admin{$i}"]);
$month = getMonth($data["end_date_admin{$i}"]);
$day = getDays($data["end_date_admin{$i}"]);
if (!preg_match("/^\\d{8}\$/", $data["end_date_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」は半角数字8桁で入力してください。";
} elseif (!checkdate($month, $day, $year)) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当終了日」が不正です。";
}
}
if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) && isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
//開始日が終了日より過去か
if ($data["start_date_admin{$i}"] > $data["end_date_admin{$i}"]) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「担当開始日」は「担当終了日」より過去を入力してください。";
}
}
if (isset($data["start_date_admin{$i}"]) && !emp($data["start_date_admin{$i}"]) || isset($data["end_date_admin{$i}"]) && !emp($data["end_date_admin{$i}"])) {
//責任者所属選択なし、期間指定あり
if (!isset($data["department_cd_admin{$i}"]) || emp($data["department_cd_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の所属部署が選択されていません。";
}
//責任者名選択なし、期間指定あり
if (!isset($data["user_id_admin{$i}"]) || emp($data["user_id_admin{$i}"])) {
$error[] = "担当OJT責任者" . ($i + 1) . "人目の「責任者名」が選択されていません。";
}
}
}
}
// チェック結果を返す
if (count($error) > 0) {
return $error;
} else {
return false;
}
}
开发者ID:te-koyama,项目名称:sheep,代码行数:101,代码来源:class.Account.php
示例17: foreach
<option value="0">- wszystkie -</option>
<?php
foreach ($this->month_year_select as $key => $value) {
?>
<option
value="<?php
echo $value['month'] . '-' . $value['year'];
?>
"
<?php
if ($this->month_year == $value['month'] . '-' . $value['year']) {
echo ' selected';
}
?>
><?php
echo getMonth($value['month']) . ' ' . $value['year'] . ' (' . $value['count'] . ')';
?>
</option>
<?php
}
?>
</select>
<?php
}
?>
<?php
if ($this->countOfFilteredArticles > 5) {
?>
<label>Wpisów na stronie:</label>
<select name="page_limit">
<option value="5" <?php
开发者ID:limakpol,项目名称:mxoo,代码行数:31,代码来源:articles.php
示例18: getCity
?>
</p>
<hr>
<strong><i class="fa fa-map-marker margin-r-5"></i> Adresse</strong>
<p class="text-muted"><?php
echo $row["adresse_user"];
?>
<br><?php
echo getCity($row["ville_user"]);
?>
</p>
<hr>
<strong><i class="fa fa-pencil margin-r-5"></i> Données personnelles</strong>
<p class="text-muted">né(e) le <?php
echo $row["jour_naissance_user"] . " " . getMonth($row["mois_naissance_user"]) . " " . $row["annee_naissance_user"];
?>
</p>
<p class="text-muted"><i class="fa fa-phone margin-r-5"></i> <?php
echo $row["tel_user"];
?>
</p>
<p class="text-muted"><i class="fa fa-envelope margin-r-5"></i><?php
echo $row["mail_user"];
?>
</p>
</div></div>
开发者ID:ctariel,项目名称:CyberGestionnaireLGB,代码行数:30,代码来源:user_compte.php
示例19: util_sysdatefmt_explode
function util_sysdatefmt_explode($date)
{
$months = array("Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6, "Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12);
$res = preg_match("/\\s*(\\d+)-(.+)-(\\d+) (\\d+):(\\d+)/", $date, $match);
if ($res == 0) {
//if it doesn't work try (Y-M-d) only
$res = preg_match("/\\s*(\\d+)-(.+)-(\\d+)/", $date, $match);
if ($res == 0) {
// if it doesn't work try Y-M only
$res = preg_match("/\\s*(\\d+)-(.+)/", $date, $match);
if ($res == 0) {
// if it doesn't work try YYYY only
$res = preg_match("/\\s*(\\d+)/", $date, $match);
if ($res == 0) {
// nothing is valid return Epoch time
$year = '1970';
$month = '1';
$day = '1';
$hour = '0';
$minute = '0';
} else {
list(, $year) = $match;
$month = '1';
$day = '1';
$hour = '0';
$minute = '0';
}
} else {
list(, $year, $month) = $match;
$day = '1';
$hour = '0';
|
请发表评论