コード例 #1
0
ファイル: test.php プロジェクト: mortalerror/ultimatesims
<?php

include "site.config.php";
include "showdate.cls.php";
$strdate = "25.12.2008:12.080808";
echo $strdate . "<br>";
$date = new showdate($strdate);
$date->getdate("long");
echo $date->date;
echo "<br>" . $date->time;
date_default_timezone_set('UTC');
echo "<br><br>" . date("G:i");
echo "<br>" . $_SERVER['REQUEST_TIME'];
echo "<br><br>" . setdate("17", "01", "1999");
echo "<br>Current Date: " . getcurrentdate();
echo "<br>Current Time:" . getcurrentdatetime();
コード例 #2
0
 function showheadlines()
 {
     $fileoutput = $this->getfile('themes/' . $this->themedir . '/headlines.html');
     $output = NULL;
     $headlines = $this->news->headlines('show');
     if (errorSDK::is_error($headlines)) {
         $this->error($headlines);
     } else {
         $output = NULL;
         foreach ($headlines as $headline) {
             $tempoutput = ereg_replace('%headline.title', $headline['subject'], $fileoutput);
             $tempoutput = ereg_replace('%headline.message', substr($headline['message'], 0, 60) . '...', $tempoutput);
             $tempoutput = ereg_replace('%headline.user', $headline['author'], $tempoutput);
             $tempoutput = ereg_replace('%headline.date', setdate($headline['date']), $tempoutput);
             $tempoutput = ereg_replace('%headline.link', 'news.php?action=viewcomments&amp;id=' . $headline['id'], $tempoutput);
             $output .= $tempoutput;
         }
     }
     return $output;
 }