• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getMonthName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: dateInUS

function dateInUS($string)
{
    $date = explode("-", $string);
    $day = $date[2];
    $year = $date[0];
    $month = getMonthName($date[1]);
    $dateInUS = $month . " " . $day . ", " . $year;
    return $dateInUS;
}
开发者ID:DinethH,项目名称:FindYourTutor,代码行数:9,代码来源:functions.php


示例2: printSupp

function printSupp()
{
    # Set up table to display in
    global $PRDMON;
    $cur = date("m");
    $from = getMonthName($PRDMON[1]) . " " . getYearOfFinMon($PRDMON[1]);
    $to = getMonthName($cur) . " " . getYearOfFinMon($cur);
    $printSupp = "\n\t\t<h3>Creditors Age Analysis</h3>\n\t\t<h4>Period: {$from} to {$to}</h4>\n\t\t<li class='err'>Please note that because age analysis is calculated and stored as is displayed below it is not\n\t\tpossible to change the period for which you wish to see the age analysis.</li>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<tr>\n\t\t\t\t<th>Acc no.</th>\n\t\t\t\t<th>Suppliers</th>\n\t\t\t\t<th>Current</th>\n\t\t\t\t<th>30 days</th>\n\t\t\t\t<th>60 days</th>\n\t\t\t\t<th>90 days</th>\n\t\t\t\t<th>120 days</th>\n\t\t\t\t<th>Total Outstanding</th>\n\t\t\t</tr>";
    # connect to database
    db_connect();
    # Query server
    $i = 0;
    $sql = "SELECT * FROM suppliers WHERE div = '" . USER_DIV . "' ORDER BY supname ASC";
    $suppRslt = db_exec($sql) or errDie("Unable to retrieve Suppliers from database.");
    if (pg_numrows($suppRslt) < 1) {
        return "<li>There are no Suppliers in Cubit.</li>";
    }
    # totals
    $totcurr = 0;
    $tot30 = 0;
    $tot60 = 0;
    $tot90 = 0;
    $tot120 = 0;
    $alltot = 0;
    while ($supp = pg_fetch_array($suppRslt)) {
        # Get all ages
        $curr = age($supp['supid'], 29);
        $age30 = age($supp['supid'], 59);
        $age60 = age($supp['supid'], 89);
        $age90 = age($supp['supid'], 119);
        $age120 = age($supp['supid'], 149);
        # Suppliers total
        $supptot = sprint($curr + $age30 + $age60 + $age90 + $age120);
        if ($supptot < $supp['balance']) {
            $curr = sprint($curr + ($supp['balance'] - $supptot));
            $supptot = sprint($supptot + $supp['balance'] - $supptot);
        }
        $printSupp .= "\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>{$supp['supno']}</td>\n\t\t\t\t<td>{$supp['supname']}</td>\n\t\t\t\t<td>" . CUR . " {$curr}</td>\n\t\t\t\t<td>" . CUR . " {$age30}</td>\n\t\t\t\t<td>" . CUR . " {$age60}</td>\n\t\t\t\t<td>" . CUR . " {$age90}</td>\n\t\t\t\t<td>" . CUR . " {$age120}</td>\n\t\t\t\t<td>" . CUR . " {$supptot}</td>\n\t\t\t</tr>";
        # hold totals
        $totcurr += $curr;
        $tot30 += $age30;
        $tot60 += $age60;
        $tot90 += $age90;
        $tot120 += $age120;
        $alltot += $supptot;
        $i++;
    }
    $totcurr = sprint($totcurr);
    $tot30 = sprint($tot30);
    $tot60 = sprint($tot60);
    $tot90 = sprint($tot90);
    $tot120 = sprint($tot120);
    $alltot = sprint($alltot);
    $printSupp .= "\n\t\t<tr><td><br></td></tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td colspan='2'><b>Totals</b></td>\n\t\t\t<td><b>" . CUR . " {$totcurr}</b></td>\n\t\t\t<td><b>" . CUR . " {$tot30}</b></td>\n\t\t\t<td><b>" . CUR . " {$tot60}</b></td>\n\t\t\t<td><b>" . CUR . " {$tot90}</b></td>\n\t\t\t<td><b>" . CUR . " {$tot120}</b></td>\n\t\t\t<td><b>" . CUR . " {$alltot}</b></td>\n\t\t</tr>\n\t\t<tr><td><br></td></tr>\n\t\t<tr>\n\t\t\t<td align='center' colspan='10'>\n\t\t\t\t<form action='../xls/cred-age-analysis-xls.php' method='POST' name='form'>\n\t\t\t\t\t<input type='submit' name='xls' value='Export to spreadsheet'>\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<p>\n\t<table " . TMPL_tblDflts . " width='15%'>\n\t\t<tr><td><br></td></tr>\n\t\t<tr>\n\t\t\t<th>Quick Links</th>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td><a href='index-reports.php'>Financials</a></td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td><a href='index-reports-debtcred.php'>Debtors & Creditors Reports</a></td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td><a href='../supp-new.php'>Add Supplier</a></td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td><a href='../supp-view.php'>View Suppliers</a></td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td><a href='../main.php'>Main Menu</a></td>\n\t\t</tr>\n\t</table>";
    return $printSupp;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:56,代码来源:cred-age-analysis.php


示例3: add_blindfold_333_consecutive_successes

function add_blindfold_333_consecutive_successes()
{
    global $lists, $WHERE;
    #--- Get ...
    $results = dbQuery("\n    SELECT personId, value1, value2, value3, value4, value5, year, month\n    FROM Results result, Competitions competition\n    {$WHERE} 1\n      AND eventId = '333bf'\n      AND competition.id = competitionId\n    ORDER BY personId, year, month, day, roundId\n  ");
    foreach (structureBy($results, 'personId') as $personResults) {
        extract($personResults[0]);
        #--- Collect all values of this person, add a 'current DNF' sentinel at the end.
        unset($datedValues);
        foreach ($personResults as $personResult) {
            foreach (range(1, 5) as $i) {
                $v = $personResult["value{$i}"];
                if ($v > 0 || $v == -1) {
                    $datedValues[] = array(getMonthName($personResult['month']) . " {$personResult['year']}", $v);
                }
            }
        }
        $datedValues[] = array('current', -1);
        #--- Find longest streak.
        $streak = array();
        $bestStreak = array();
        $streakFirstDate = "";
        $streakLastDate = "";
        foreach ($datedValues as $dv) {
            if ($dv[1] > 0) {
                if (!$streak) {
                    $streakFirstDate = $dv[0];
                }
                $streakLastDate = $dv[0];
                $streak[] = $dv[1];
            } else {
                if (count($streak) >= count($bestStreak)) {
                    $bestStreak = $streak;
                    $bestStreakFirstDate = $streakFirstDate;
                    $bestStreakLastDate = $dv[0] == 'current' ? '<b>ongoing...</b>' : $streakLastDate;
                }
                $streak = array();
            }
        }
        #--- This person doesn't have any streak? Next person, please.
        if (!$bestStreak) {
            continue;
        }
        #--- Determine properties of the streak.
        $length = count($bestStreak);
        $best = min($bestStreak);
        $worst = max($bestStreak);
        $average = array_sum($bestStreak) / $length;
        #--- Format and memorize this person with its streak
        $persons[] = array($personId, $length, '', '<span style="color:#0C0">' . formatValue($best) . '</span>', $average, '<span style="color:#E00">' . formatValue($worst) . '</span>', "{$bestStreakFirstDate} - {$bestStreakLastDate}");
    }
    usort($persons, 'compareBlindfoldStreaks');
    $persons = array_slice($persons, 0, 10);
    $lists[] = array("blind_streak_3x3", "Rubik's Cube Blindfolded longest success streak", "", "[P] Person [N] Length [t] &nbsp; [r] Best [r] Avg [r] Worst [t] When?", $persons);
}
开发者ID:FatBoyXPC,项目名称:worldcubeassociation.org,代码行数:55,代码来源:blindfold_333_consecutive_successes.php


示例4: setTitulo

function setTitulo() {
	if ($_SESSION["tablero"]["periodo"] == "um") {
		$presupuesto = valorSql("SELECT cont.get_presupuestoactual FROM DUAL", "", array());
		$numero = valorSql("SELECT cont.get_ultimomespresupuesto(:presupuesto) FROM DUAL", "", array(":presupuesto" => $presupuesto));
		return "Último Mes (".getMonthName($numero).")";
	}
	if ($_SESSION["tablero"]["periodo"] == "t")
		return "Trimestre ".$_SESSION["tablero"]["trimestre"];
	if ($_SESSION["tablero"]["periodo"] == "m")
		return getMonthName($_SESSION["tablero"]["mes"]);
	if ($_SESSION["tablero"]["periodo"] == "a")
		return "Año";
}
开发者ID:javierlov,项目名称:FuentesWeb,代码行数:13,代码来源:recargar.php


示例5: view

function view()
{
    # Just months
    $months = array("1", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    # Check if year has been opened
    core_connect();
    $sql = "SELECT * FROM active";
    $cRs = db_exec($sql) or errDie("Database Access Failed - check year open.", SELF);
    if (pg_numrows($cRs) > 0) {
        # Get the range
        core_connect();
        $sql = "SELECT * FROM range";
        $Rslt = db_exec($sql);
        if (pg_numrows($Rslt) < 1) {
            $OUTPUT = "<center><li class=err>ERROR : The Financial year Period range was not found on Database, Please make sure that everything is set during instalation.";
            require "template.php";
        }
        $range = Pg_fetch_array($Rslt);
        global $PRDMON, $MONPRD;
        $pmon = 0;
        $fyear = getFinYear() - (int) ($PRDMON[1] > 1);
        $prddesc = array();
        for ($i = 1; $i <= 12; $i++) {
            $mon = $PRDMON[$i];
            if ($mon < $pmon) {
                ++$fyear;
            }
            $pmon = $mon;
            if ($i == 1) {
                $smonth = getMonthName($mon) . " {$fyear}";
            } else {
                if ($i == 12) {
                    $endmon = getMonthName($mon) . " {$fyear}";
                }
            }
        }
        $prddesc = implode(" to ", $prddesc);
        $ret = "<p><p>\n\t\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t\t\t<tr><td colspan=2><li class=err>Financial year period range has already been set.</td></tr>\n\t\t\t<tr><th>Field</th><th>Value</th></tr>\n\t\t\t<tr class='bg-odd'><td>Financial Year Starts in</td><td align=center>{$smonth}</td></tr>\n\t\t\t<tr class='bg-even'><td>Financial Year Ends in</td><td align=center>{$endmon}</td></tr>\n\t\t</table>\n\t\t<p>\n\t\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=100>\n\t\t\t<tr><th>Quick Links</th></tr>\n\t\t\t<tr bgcolor='#88BBFF'><td><a href='../main.php'>Main Menu</a></td></tr>\n\t\t</table>";
        return $ret;
    }
    $month = 1;
    $smonth = "<select name=smonth>";
    while ($month <= 12) {
        $smonth .= "<option value='{$month}'>{$months[$month]}</option>";
        $month++;
    }
    $smonth .= "</select>";
    //layout
    $view = "\n\t<h3>Set Financial Year Period Range</h3>\n\t<form action='" . SELF . "' method=post name=form>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=300>\n\t\t<input type=hidden name=key value=confirm>\n\t\t<tr><th>Field</th><th>Value</th></tr>\n\t\t<tr class='bg-odd'><td>Financial Years Start in</td><td valign=center>{$smonth}</td></tr>\n\t\t<tr><td><br></td></tr>\n\t\t<tr><td><input type=button value='&laquo Back' onClick='javascript:history.back()'></td><td align=right><input type=submit value='Continue &raquo'></td></tr>\n\t</table>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=100>\n\t\t<tr><th>Quick Links</th></tr>\n\t\t<script>document.write(getQuicklinkSpecial());</script>\n\t</form>\n\t</table>";
    return $view;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:51,代码来源:finyear-range.php


示例6: actionTes

 public function actionTes()
 {
     // $emailbodydetail 	= array('emailbodydetail' => '$message');
     // $mail 				= new YiiMailer();
     // $mail->setView('template');
     // $mail->setFrom('[email protected]', 'hris');
     // $mail->setTo('[email protected]');
     // $mail->setData($emailbodydetail);
     // $mail->setSubject('Berita Acara Request');
     // $mail->send();
     $date_from_db = AttendancePresencesRecap::model()->find()->date;
     $date = strtotime($date_from_db);
     $date_indo = date('j', $date) . ' ' . getMonthName()[date('n', $date) - 1] . ' ' . date('Y', $date);
     echo $date_from_db . ' = ' . $date_indo;
 }
开发者ID:qhyabdoel,项目名称:hris_mujigae,代码行数:15,代码来源:AttendancesController.php


示例7: getContent

 function getContent($modus)
 {
     global $db_game, $params;
     $content = "";
     switch ($modus) {
         case 'tribe_history':
             $template = tmpl_open("modules/Module_Tribe/templates/history.ihtml");
             // Form Submitted
             if (isset($params->creator)) {
                 $something_wrong = false;
                 //TODO: $tribe has to be checked
                 $tribe = $params->historyTribe;
                 $day = intval($params->historyDay);
                 if ($day < 1 || $day > DAYS_PER_MONTH) {
                     $something_wrong = true;
                     $message = "Wrong day. Must be between 1 and " . DAYS_PER_MONTH . ".";
                 }
                 $year = intval($params->historyYear);
                 if ($year < STARTING_YEAR) {
                     $something_wrong = true;
                     $message = "Wrong year. Must be &gt;= " . STARTING_YEAR . ".";
                 }
                 $month = getMonthName($params->historyMonth);
                 $entry = $params->historyMessage;
                 if ($something_wrong) {
                     tmpl_set($template, "MESSAGE/message", $message);
                 } else {
                     $query = "INSERT INTO `TribeHistory` (`tribe`, `timestamp`, " . "`ingameTime`, `message`) VALUES ('{$tribe}', NULL , " . "'{$day}. {$month}<br>im Jahr {$year}', '{$entry}')";
                     if (!$db_game->query($query)) {
                         die("Error while inserting your entry!");
                     }
                     tmpl_set($template, "MESSAGE/message", "Entry inserted!");
                 }
             }
             // iterate months
             $months = array();
             for ($i = 1; $i <= MONTHS_PER_YEAR; ++$i) {
                 $months[] = array('text' => getMonthName($i), 'value' => $i);
             }
             if (sizeof($months)) {
                 tmpl_set($template, '/MONTH', $months);
             }
             $content = tmpl_parse($template);
             break;
     }
     return $content;
 }
开发者ID:microlefes,项目名称:Game,代码行数:47,代码来源:Module_Tribe.php


示例8: defineAllLists

function defineAllLists()
{
    #----------------------------------------------------------------------
    #--- Compute some helpers.
    global $WHERE, $sinceDateHtml, $sinceDateMysql, $sinceDateCondition;
    $WHERE = "WHERE " . randomDebug() . " AND";
    list($year, $month, $day) = explode(' ', wcaDate("Y m d"));
    $year = intval($year) - 1;
    $month = intval($month);
    $day = intval($day);
    $monthName = getMonthName($month);
    $sinceDateHtml = "{$monthName} {$day}, {$year}";
    $sinceDateMysql = $year * 10000 + $month * 100 + $day;
    $sinceDateCondition = "(year*10000 + month*100 + day) >= {$sinceDateMysql}";
    #--- Import the list definitions.
    require 'includes/statistics/ALL_LISTS.php';
}
开发者ID:FatBoyXPC,项目名称:worldcubeassociation.org,代码行数:17,代码来源:statistics.php


示例9: substr

        //$dates[$count] = getMonthName(substr($row['date'],5,2)).", ".substr($row['date'],0,4);
        $dates[$count] = substr($row['date'], 0, 7);
    }
    $count++;
}
?>

<table>
<?php 
foreach ($dates as $date) {
    ?>

	<tr>
    	<td class="date_group">
    		<?php 
    echo getMonthName(substr($date, 5, 2)) . ", " . substr($date, 0, 4);
    ?>
        </td>
   
   		<td class="divider">
        </td>
        <td style="width:12px;">
        </td>
    
    	<td>
        	<span id="news_group">
           	<?php 
    $sql2 = mysql_query("SELECT * FROM _agriffith_news WHERE date LIKE '{$date}%' ORDER BY date");
    while ($row = mysql_fetch_array($sql2)) {
        echo "<li class='news_item'>" . $row['description'] . "</li>";
    }
开发者ID:DinethH,项目名称:EES,代码行数:31,代码来源:index+-+Copy.php


示例10: getUgaAggaTime

<?php

require_once "include/time.inc.php";
require_once "include/basic.lib.php";
$now = getUgaAggaTime(time());
$time = $now['day'] . ". " . unhtmlentities(getMonthName($now['month'])) . ", " . $now['year'] . ". Jahr";
$timelen = strlen($time);
$size = 11;
if ($timelen > 18) {
    $size = 8;
}
$x = 95 - $timelen / 2 * $size;
if ($x < 0) {
    $x = 0;
}
$im_bg = @imagecreate(185, 32);
$im_fg = @imagecreate(185, 32);
$background_color = ImageColorAllocate($im_bg, 255, 255, 255);
$background_color = ImageColorAllocate($im_fg, 255, 255, 255);
$text_color = ImageColorAllocate($im_fg, 0, 0, 0);
ImageTTFText($im_fg, $size, 0, $x, 18, -$text_color, "aniron.ttf", $time);
imagecolortransparent($im_fg, $background_color);
imagecolortransparent($im_bg, $background_color);
imagecopy($im_bg, $im_fg, 0, 0, 0, 0, 185, 32);
header("Content-type: image/png");
ImagePNG($im_bg);
开发者ID:agatho,项目名称:uaenhanced,代码行数:26,代码来源:imgtime.php


示例11: printAgeInv

function printAgeInv($_POST, $pure = TRUE)
{
    extract($_POST);
    # Set up table to display in
    global $PRDMON;
    $from = getMonthName($PRDMON[1]) . " " . getYearOfFinMon($PRDMON[1]);
    $to = getMonthName($PRDMON[12]) . " " . getYearOfFinMon($PRDMON[12]);
    $sel1 = "";
    $sel2 = "";
    $sel3 = "";
    if (isset($show_zero) and strlen($show_zero) > 0) {
        $sel1 = "checked='yes'";
    }
    if (isset($show_large) and strlen($show_large) > 0) {
        $sel2 = "checked='yes'";
    }
    if (isset($show_old) and strlen($show_old) > 0) {
        $sel3 = "checked='yes'";
    }
    if ($pure) {
        $show_filter = "\n\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Filter/Sort Age Analysis</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><input type='checkbox' name='show_zero' onClick='javascript:document.form1.submit();' value='yes' {$sel1}> Show Zero Balances</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><input type='checkbox' name='show_large' onClick='javascript:document.form1.submit();' value='yes' {$sel2}> Show Largest Balances First</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><input type='checkbox' name='show_old' onClick='javascript:document.form1.submit();' value='yes' {$sel3}> Show Oldest Balances First</td>\n\t\t\t\t</tr>\n\t\t\t\t" . TBL_BR . "\n\t\t\t</table>";
        $show_quicklinks = "\n\t\t\t<p>\n\t\t\t<table " . TMPL_tblDflts . " width='15%'>\n\t\t        " . TBL_BR . "\n\t\t        <tr>\n\t\t        \t<th>Quick Links</th>\n\t\t        </tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='index-reports.php'>Financials</a></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='index-reports-debtcred.php'>Debtors & Creditors Reports</a></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='../customers-new.php'>Add Customer</a></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='../customers-view.php'>View Customers</a></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t<td><a href='../main.php'>Main Menu</a></td>\n\t\t\t\t</tr>\n\t\t\t</table>";
    } else {
        $show_filter = "";
        $show_quicklinks = "";
    }
    # Set up table to display in
    $printCust = "\n\t\t<h3>Debtors Age Analysis</h3>\n\t\t<h4>Period: {$from} to {$to}</h4>\n\t\t<form action='" . SELF . "' method='POST' name='form1'>\n\t\t{$show_filter}\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<tr>\n\t\t\t\t<th><font size='1'>Acc no.</font></th>\n\t\t\t\t<th><font size='1'>Customer</font></th>\n\t\t\t\t<th><font size='1'>Sales Rep</font></th>\n\t\t\t\t<th><font size='1'>Contact Name</font></th>\n\t\t\t\t<th><font size='1'>Tel No.</font></th>\n\t\t\t\t<th><font size='1'>Current</font></th>\n\t\t\t\t<th><font size='1'>30 days</font></th>\n\t\t\t\t<th><font size='1'>60 days</font></th>\n\t\t\t\t<th><font size='1'>90 days</font></th>\n\t\t\t\t<th><font size='1'>120 days + </font></th>\n\t\t\t\t<th><font size='1'>Total Outstanding</font></th>\n\t\t\t</tr>";
    # Connect to database
    db_connect();
    # Query server
    $i = 0;
    $entries = array();
    $sql = "SELECT * FROM customers WHERE div = '" . USER_DIV . "' OR ddiv = '" . USER_DIV . "' ORDER BY accno ASC";
    $custRslt = db_exec($sql) or errDie("Unable to retrieve Customers from database.");
    if (pg_numrows($custRslt) < 1) {
        return "<li>There are no Customers in Cubit.</li>";
    }
    # Totals
    $totcurr = 0;
    $tot30 = 0;
    $tot60 = 0;
    $tot90 = 0;
    $tot120 = 0;
    $alltot = 0;
    while ($cust = pg_fetch_array($custRslt)) {
        # Get all ages
        $to_month = date("m");
        $to_date = "now";
        $from_date = date("Y-m-d", mktime(0, 0, 0, date("m"), "01", date("Y")));
        $curr = cust_age($cust['cusnum'], 29, $cust['fcid'], $cust['location'], $to_month, $to_date, $from_date);
        $age30 = cust_age($cust['cusnum'], 59, $cust['fcid'], $cust['location'], $to_month, $to_date, $from_date);
        $age60 = cust_age($cust['cusnum'], 89, $cust['fcid'], $cust['location'], $to_month, $to_date, $from_date);
        $age90 = cust_age($cust['cusnum'], 119, $cust['fcid'], $cust['location'], $to_month, $to_date, $from_date);
        $age120 = cust_age($cust['cusnum'], 149, $cust['fcid'], $cust['location'], $to_month, $to_date, $from_date);
        # Customer total
        $custtot = sprint($curr + $age30 + $age60 + $age90 + $age120);
        db_con("exten");
        # sales rep
        $get_salsp = "SELECT salesp FROM salespeople WHERE salespid = '{$cust['sales_rep']}' LIMIT 1";
        $run_salsp = db_exec($get_salsp) or errDie("Unable to get sales person information.");
        if (pg_numrows($run_salsp) > 0) {
            $sarr = pg_fetch_array($run_salsp);
            $salesperson = $sarr['salesp'];
        } else {
            $salesperson = "";
        }
        $col1[] = $cust['accno'];
        $col2[] = $cust['surname'];
        $col22[] = $salesperson;
        $col3[] = $cust['contname'];
        $col4[] = $cust['bustel'];
        $col5[] = $curr;
        $col6[] = $age30;
        $col7[] = $age60;
        $col8[] = $age90;
        $col9[] = $age120;
        $col10[] = $custtot;
        $col11[] = $cust['cusnum'];
    }
    if (!isset($show_zero) or isset($show_zero) and strlen($show_zero) > 0) {
        #get key of zero entries
        foreach ($col10 as $each => $own) {
            if ($own == 0) {
                unset($col1[$each]);
                unset($col2[$each]);
                unset($col22[$each]);
                unset($col3[$each]);
                unset($col4[$each]);
                unset($col5[$each]);
                unset($col6[$each]);
                unset($col7[$each]);
                unset($col8[$each]);
                unset($col9[$each]);
                unset($col10[$each]);
            }
        }
    }
    if (isset($show_large) and strlen($show_large) > 0) {
        arsort($col10);
//.........这里部分代码省略.........
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:101,代码来源:debt-age-analysis.php


示例12: date

	<br>

	<p>
		Anda dapat melihat data pengajuan dengan mengunjungi aplikasi HRIS Mujigae melalui link di bawah ini.
	</p>

	<br>

	<p><a href="<?php 
echo $url;
?>
"><?php 
echo $url;
?>
</a></p>

	<p>Demikian kami sampaikan, untuk menjadi perhatian.</p>

	<br>

	<p>Bandung, <?php 
echo date('j') . ' ' . getMonthName()[date('n') - 1] . ' ' . date('Y');
?>
</p>

	<br>

	<p>Aplikasi HRIS Mujigae</p>
</body>
</html>
开发者ID:qhyabdoel,项目名称:hris_mujigae,代码行数:30,代码来源:template_attendance_off_reject.php


示例13: mysql_query

                            $result12 = mysql_query("SELECT DATE_FORMAT(DateTimeOriginal,'%Y-%m-%d'), COUNT(*), pic_id, note, DateTimeOriginal, aktiv \n\t\t\t\t\t\t\tFROM {$table2} \n\t\t\t\t\t\t\tWHERE DateTimeOriginal LIKE '%" . $y . "-" . $m . "%' \n\t\t\t\t\t\t\tAND DateTimeOriginal <> '0000-00-00 00:00:00'\n\t\t\t\t\t\t\tAND aktiv = '1'\n\t\t\t\t\t\t\t{$restriction} \n\t\t\t\t\t\t\tAND {$stat}\n\t\t\t\t\t\t\tGROUP BY DATE_FORMAT(DateTimeOriginal,'%Y-%m-%d')\n\t\t\t\t\t\t\tORDER BY DATE_FORMAT(DateTimeOriginal,'%Y-%m-%d')");
                            $num12 = mysql_num_rows($result12);
                            //echo "Es wurden ".$num12." Tage gefunden.<BR>";
                            for ($i12 = '0'; $i12 < $num12; $i12++) {
                                $datum = substr(mysql_result($result12, $i12, 'DateTimeOriginal'), 0, 10);
                                $T = date('d', strtotime($datum));
                                $aufn_dat = date('d.m.Y', strtotime($datum));
                                $aufn_DAT = date('Y-m-d', strtotime($datum));
                                //Ermittlung der an diesem Tag gemachten Bilder:
                                $anz12 = mysql_result($result12, $i12, COUNT('*'));
                                echo "<TR id='kat'>\n\t\t\t\t\t\t\t\t<TD id='kat1'> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<SPAN style='margin-left:2px;'>" . $aufn_dat . "</span></TD>";
                                echo "\n\t\t\t\t\t\t\t\t<TD id='kat2'><SPAN style='cursor:pointer;' onClick='getTimePreview2(\"{$jahr}\",\"{$month_number}\",\"{$T}\",0,\"{$mod}\",\"{$modus}\",\"{$base_file}\",\"{$sr}\")'>" . $sel_one . "</span></TD>\n\t\t\t\t\t\t\t\t<TD id='kat2'><SPAN style='cursor:pointer;' onClick='getTimePreview2(\"{$jahr}\",\"{$month_number}\",\"{$T}\",1,\"{$mod}\",\"{$modus}\",\"{$base_file}\",\"{$sr}\")'>" . $sel_all . "</span></TD>\n\t\t\t\t\t\t\t\t<TD id='kat2'>" . $anz12 . "</TD>\n\t\t\t\t\t\t\t\t</TR>";
                            }
                        } else {
                            $s_m = $jahr . "_" . $month_number;
                            echo "<SPAN style='cursor:pointer;' onClick='location.href=\"getTimeTreeview2.php?pic_id={$pic_id}&mod={$mod}&show_mod={$s_m}\"'>" . getMonthName($month_number) . "</SPAN>\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t<TD id='kat2'>\n\t\t\t\t\t\t\t<SPAN style='cursor:pointer;' onClick='getTimePreview2(\"{$jahr}\",\"{$month_number}\",0,0,\"{$mod}\",\"{$modus}\",\"{$base_file}\")'>\n\t\t\t\t\t\t\t<img src='../../share/images/ok.gif' width='15' height='15' title='Bilder anzeigen' />\n\t\t\t\t\t\t\t</SPAN>\n\t\t\t\t\t\t\t</TD>\n\t\t\t\t\t\t\t<TD id='kat2'>" . $num5 . "</TD></TR>";
                        }
                    }
                }
            }
        }
    }
}
//Ermittlung der Bilder, welche noch keinem Datum zugeordnet wurden:
$modus = 'zeit';
$result7 = mysql_query("SELECT DateTimeOriginal, note, pic_id, aktiv \nFROM {$table2} \nWHERE DateTimeOriginal = '0000-00-00 00:00:00'\nAND aktiv = '1'\n{$restriction} \nAND {$stat}");
@($num7 = mysql_num_rows($result7));
if ($num7 == '') {
    $num7 = 0;
}
echo "<TR id='kat'>\n<TD id='kat1'>Sonstige Bilder</TD>\n<TD id='kat2'></TD>\n<TD id='kat2'></TD>\n</TR>\n<TR id='kat'>\n<TD id='kat1' style=' background-color:#ff9900;'><SPAN style='margin-left:22px'>Bilder ohne Datumsangabe</SPAN></TD>\n<TD id='kat2'><SPAN style='cursor:pointer;' onClick='getTimePreview2(0000,0,0,0,\"{$mod}\",\"{$modus}\",\"{$base_file}\")' title='Bilder anzeigen'>" . $sel_one . "</SPAN></TD>\n<TD id='kat2'><SPAN style='cursor:pointer;' onClick='getTimePreview2(0000,0,0,1,\"{$mod}\",\"{$modus}\",\"{$base_file}\")' title='Bilder anzeigen'>" . $sel_all . "</SPAN></TD>\n<TD id='kat2'>" . $num7 . "</TD>\n</TR>\n</TABLE>";
开发者ID:BackupTheBerlios,项目名称:pic2base-svn,代码行数:31,代码来源:time_treeview2.php


示例14: slip


//.........这里部分代码省略.........
                $totuif -= $pay['uif'];
                $totpaye -= $pay['paye'];
                $totded -= $pay['totded'];
                $totsal -= $pay['salary'];
            }
            $get_deds = "SELECT distinct(type) FROM emp_ded WHERE payslip = '{$pay['id']}'";
            $run_deds = db_exec($get_deds) or errDie("Unable to get salary deduction information.");
            if (pg_numrows($run_deds) > 0) {
                // 				$deductions = "";
                // 				$ed["totded"] = array()
                $colspan = 0;
                while ($darr = pg_fetch_array($run_deds)) {
                    $darr['type'] += 0;
                    if ($darr['type'] > 0) {
                        print "adding a deduction<br>";
                        $get_amt = "SELECT amount, description FROM emp_ded WHERE payslip = '{$pay['id']}' AND type = '{$darr['type']}' LIMIT 1";
                        $run_amt = db_exec($get_amt) or errDie("Unable to get employee deduction amount.");
                        $deduction_heading .= "<th>" . pg_fetch_result($run_amt, 0, 1) . "</th>";
                        $ed["totded"][] = "<td nowrap>" . CUR . " " . sprint(pg_fetch_result($run_amt, 0, 0)) . "</td>";
                        // 						$deductions .= "<td nowrap>".CUR." ".sprint($darr['amount'])."</td>";
                        $colspan++;
                    }
                }
            } else {
                // 				$deductions = "";
                $colspan = 1;
            }
        }
        print "----------<br>";
        print "<pre>";
        var_dump($ed);
        print "</pre>";
        print "<br>>>>>>>>>>>>>>>>>>>>><br>";
        // print "<pre>";
        // var_dump ($
        foreach ($empdata as $empnum => $months) {
            foreach ($months as $monthweek => $sal) {
                list($month, $week) = explode(":", $monthweek);
                if (($emp = qryEmployee($empnum, "fnames, sname, basic_sal, payprd")) === false) {
                    $emp = qryLEmployee($empnum, "fnames, sname, basic_sal, payprd");
                }
                // not a date range but a single employee, store the name
                if (!isset($from_day)) {
                    $empname = "{$emp['fnames']} {$emp['sname']}";
                }
                /* create month week description */
                $mw_desc = getMonthName($month);
                // weekly
                if ($emp["payprd"] == "w") {
                    $mw_desc .= ", Week {$week}";
                    // fortnightly
                } else {
                    if ($emp["payprd"] == "f") {
                        if ($week == 1) {
                            $week = "1-2";
                        } else {
                            if ($week == 2) {
                                $week = "3-4";
                            } else {
                                $week = "5";
                            }
                        }
                        $mw_desc .= ", Week {$week}";
                    }
                }
                print "<pre>";
                var_dump($sal["totded"]);
                print "</pre>";
                $bgColor = bgcolorg();
                $slip .= "\n\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t<td>{$emp['fnames']} {$emp['sname']}</td>\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["gross"]) . "</td>\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["comm"]) . "</td>\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["loanins"]) . "</td>\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["uif"]) . "</td>\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["paye"]) . "</td>\n\t\t\t\t\t\t" . implode("", $sal["totded"]) . "\n\t\t\t\t\t\t<td nowrap>" . CUR . " " . sprint($sal["salary"]) . "</td>\n\t\t\t\t\t\t<td nowrap>{$mw_desc}</td>\n\t\t\t\t\t\t<td nowrap>{$sal['saldate']}</td>";
                if (!$pure) {
                    $slip .= "\n\t\t\t\t\t\t<td><a href='payslip-view.php?empnum={$empnum}&id={$sal['payslip']}'>View</a></td>\n\t\t\t\t\t\t<td><a target='_blank' href='payslip-print.php?id={$sal['payslip']}'>Print</a></td>";
                }
                $slip .= "</tr>";
            }
        }
        # Format the totals
        $totgross = sprint($totgross);
        $totcomm = sprint($totcomm);
        $totins = sprint($totins);
        $totuif = sprint($totuif);
        $totpaye = sprint($totpaye);
        $totded = sprint($totded);
        $totsal = sprint($totsal);
        $slip .= "\n\t\t\t<tr class='bg-even'>\n\t\t\t\t<td><b>Total</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totgross}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totcomm}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totins}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totuif}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totpaye}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totded}</b></td>\n\t\t\t\t<td nowrap><b>" . CUR . " {$totsal}</b></td>\n\t\t\t\t<td colspan='4'></td>\n\t\t\t</tr>";
    } else {
        return "<li> - There are no salary payments for the selected month</li>";
    }
    if (isset($from_day)) {
        $title = "<h3>Salaries Paid {$fromdate} TO {$todate}</h3>";
    } else {
        $title = "<h3>Salaries for {$empname}</h3>";
    }
    $slip = "\n\t\t<center>\n\t\t{$title}\n\t\t<table " . TMPL_tblDflts . " width='70%'>\n\t\t\t<tr>\n\t\t\t\t<th>Employee</th>\n\t\t\t\t<th>Gross Salary</th>\n\t\t\t\t<th>Commission</th>\n\t\t\t\t<th>Low or interest free loan</th>\n\t\t\t\t<th>UIF</th>\n\t\t\t\t<th>PAYE</th>\n\t\t\t\t<th colspan='{$colspan}'>Deductions</th>\n\t\t\t\t<th>Nett Income</th>\n\t\t\t\t<th>Month/Week</th>\n\t\t\t\t<th>Payment Date</th>\n\t\t\t\t" . (!$pure ? "<th colspan='2'>Options</th>" : "") . "\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th colspan='6'></th>\n\t\t\t\t{$deduction_heading}\n\t\t\t\t<th colspan='5'></th>\n\t\t\t</tr>\n\t\t\t{$slip}\n\t\t\t" . TBL_BR;
    if (!$pure) {
        $slip .= "\n\t\t\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t\t" . array2form($_REQUEST) . "\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan='2'><input name=key type=submit value='Export to Spreadsheet'></td>\n\t\t\t\t</tr>\n\t\t\t</form>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee")) . "\n\t\t\t</td></tR>";
    }
    $slip .= "\n\t\t</table>\n\t\t</center>";
    return $slip;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:101,代码来源:export-employee-payroll.php


示例15: display


//.........这里部分代码省略.........
            }
            if ($key == "ciaal") {
                $acc_out .= "<tr class='bg-odd'>\n\t\t\t\t\t<td>Total adjustments</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["curr_total"]) . "</b></td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["prev_total"]) . "</td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["var_total"]) . "</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["percvar_total"]) . "</b></td>\n\t\t\t\t</tr>";
            }
            // nciis and ciaal are both in the same category, dont assign a total to both
            // instead just use nciis
            if ($key != "nciis") {
                if (isset($nciis) && isset($ciaal)) {
                    $ciaal["curr_total"] += $nciis["curr_total"];
                    $ciaal["prev_total"] += $nciis["prev_total"];
                    $ciaal["var_total"] += $nciis["var_total"];
                    $ciaal["percvar_total"] += $nciis["percvar_total"];
                }
                // Totals output
                $acc_out .= "<tr class='bg-odd'>\n\t\t\t\t\t<td>{$cat_total[$key]}</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["curr_total"]) . "</b></td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["prev_total"]) . "</td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["var_total"]) . "</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["percvar_total"]) . "</b></td>\n\t\t\t\t</tr>";
            } else {
                // Totals output
                $acc_out .= "<tr class='bg-odd'>\n\t\t\t\t\t<td>&nbsp</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["curr_total"]) . "</b></td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["prev_total"]) . "</td>\n\t\t\t\t\t<td align='right'>" . sprint(${$key}["var_total"]) . "</td>\n\t\t\t\t\t<td align='right'><b>" . sprint(${$key}["percvar_total"]) . "</b></td>\n\t\t\t\t</tr>";
            }
        }
    }
    // Net cash and cash equivalents
    if (!isset($cffuif)) {
        $cffuif = array();
        $cffuif["curr_total"] = 0.0;
        $cffuif["prev_total"] = 0.0;
        $cffuif["var_total"] = 0.0;
        $cffuif["percvar_total"] = 0.0;
    }
    if (!isset($cffuii)) {
        $cffuii = array();
        $cffuii["curr_total"] = 0.0;
        $cffuii["prev_total"] = 0.0;
        $cffuii["var_total"] = 0.0;
        $cffuii["percvar_total"] = 0.0;
    }
    $cash_equiv = array();
    $cash_equiv["curr_total"] = $cffuif["curr_total"] + $cffuii["curr_total"] + $nciis["curr_total"];
    $cash_equiv["prev_total"] = $cffuif["prev_total"] + $cffuii["prev_total"] + $nciis["prev_total"];
    $cash_equiv["var_total"] = $cffuif["var_total"] + $cffuii["var_total"] + $nciis["var_total"];
    $cash_equiv["percvar_total"] = $cffuif["percvar_total"] + $cffuii["percvar_total"] + $nciis["percvar_total"];
    if ($cash_equiv["curr_total"] < $cash_equiv["prev_total"]) {
        $cash_equiv["inc_dec"] = "(increase) decrease";
    } else {
        $cash_equiv["inc_dec"] = "increase (de 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getMonthWeekArr函数代码示例发布时间:2022-05-15
下一篇:
PHP getMonthLastDay函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap