コード例 #1
0
ファイル: show_po.php プロジェクト: natcha23/wmstm
<?php 
$n = 1;
foreach ($sqlPo->result_array() as $arr) {
    ?>
	<tr <?php 
    if ($n % 2 == 0) {
        echo 'style=background-color:#D8D8D8';
    }
    ?>
 >
		<td><?php 
    echo $n;
    ?>
</td>
		<td><?php 
    echo shortDate($arr['po_create']);
    ?>
</td>
		<td><?php 
    echo $arr['po_id'];
    ?>
</td>
		<td>
            <?php 
    if ($arr['status'] == 1) {
        ?>
                <a href="?page=show_item&po_id=<?php 
        echo $arr['po_id'];
        ?>
" class="btn btn-xs btn-primary">เลือก</a>
            <?php 
コード例 #2
0
ファイル: index.php プロジェクト: alhankeser/soccer
		  		<th>Status</th> 
		  		<th>Dates</th> 
		  		<th>Price</th> 
		  		<th>LA</th>
		  		<th></th> 
		  		<th></th>
		  	</tr> 
		  </thead> 
		  <tbody> ';
        //LOOP THROUGH ALL LEAGUES IN THAT SEASON
        for ($ii = 0; $ii < count($leagues); $ii++) {
            //LEAGUE DATA
            $league_id = $leagues[$ii]['league_id'];
            $location_field = $leagues[$ii]['location_field'];
            $league_start = shortDate($leagues[$ii]['league_start']);
            $league_end = shortDate($leagues[$ii]['league_end']);
            $league_price = $leagues[$ii]['league_price'];
            $league_laid = $leagues[$ii]['league_laid'];
            $league_day = $leagues[$ii]['league_day'];
            $league_onfield = $leagues[$ii]['league_onfield'];
            $league_femsonfield = $leagues[$ii]['league_femsonfield'];
            $league_status = $leagues[$ii]['league_status'];
            //COMPILED INFO
            if ($league_femsonfield > 0) {
                $league_format = 'Co-Ed';
            } else {
                $league_format = 'Men\'s';
            }
            if ($league_status == 1) {
                $league_status = 'Open';
            } else {
コード例 #3
0
ファイル: banner.php プロジェクト: vishacc/libyanwarthetruth
function banner_user_banner_records($uid = NULL)
{
    if (!$uid) {
        global $user;
        $uid = $user->uid;
    }
    $q = "select v.*, n.title, n.status\n\tfrom `banner_views v`, node n\n\twhere n.uid=:uid\n\tAND n.nid = v.nid";
    $q .= " order by v.time desc ";
    $r = db_query($q, array(":uid" => $uid));
    $now = mktime();
    $yesterday = $now - 24 * 3600;
    $views = array('by_my' => array(), 'today' => array(), 'by_nid' => array());
    while ($obj = $r->fetchObject()) {
        // nid,time,ip,indx
        $obj->showDate = shortDate($obj->time);
        // date('d/j/Y g:i:s', $date)
        $obj->year = (int) date('Y', $obj->time);
        $obj->month = (int) date('d', $obj->time);
        $views['by_my'][$obj->year][$obj->month][] = $obj;
        if ($obj->time > $yesterday) {
            $views['today'][] = $obj;
        }
        $views['by_nid'][$obj->nid][] = $obj;
        $views['all'][] = $obj;
    }
    return $views;
}
コード例 #4
0
ファイル: date.php プロジェクト: piiskop/pstk
            $show = date('j.n.Y', $start_short) . '-' . date('j.n.Y', $stop_short);
            echo $show;
        }
    }
}
?>

<body>
	<div id="container">
<form action="<?php 
$_PHP_SELF;
?>
" method="GET">
<label>Algus</label>
<br>
<input type="text" name="start">
<br>
<label>Lõpp</label>
<br>
<input type="text" name="stop">
<br>
<button type="submit">Saada</button>
</form>
<br>
<h1><?php 
shortDate($start, $stop);
?>
</h1>

</body>
</html>