当前位置: 首页>>代码示例>>PHP>>正文


PHP JoomleagueHelper::getTimestamp方法代码示例

本文整理汇总了PHP中JoomleagueHelper::getTimestamp方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelper::getTimestamp方法的具体用法?PHP JoomleagueHelper::getTimestamp怎么用?PHP JoomleagueHelper::getTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JoomleagueHelper的用法示例。


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

示例1: defined

<?php

defined('_JEXEC') or die('Restricted access');
?>
<table class="contentpaneopen">
	<tr>
		<td class="contentheading"><?php 
$pageTitle = 'COM_JOOMLEAGUE_MATCHREPORT_TITLE';
if (isset($this->round->name)) {
    $matchDate = JoomleagueHelper::getTimestamp($this->match->match_date, 1);
    echo '&nbsp;' . JText::sprintf($pageTitle, $this->round->name, JHTML::date($matchDate, JText::_('COM_JOOMLEAGUE_MATCHREPORT_GAMES_DATE')), JoomleagueHelperHtml::showMatchTime($this->match, $this->config, $this->overallconfig, $this->project));
} else {
    echo '&nbsp;' . JText::sprintf($pageTitle, '', '', '');
}
?>
</td>
	</tr>
</table>
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:18,代码来源:default_sectionheader.php

示例2: display

 function display($tpl = null)
 {
     // Get a reference of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $project =& $model->getProject();
     $config = $model->getTemplateConfig($this->getName());
     if (isset($project)) {
         $this->assignRef('project', $project);
         $this->assignRef('overallconfig', $model->getOverallConfig());
         $this->assignRef('config', $this->overallconfig);
         $this->assignRef('teams', $model->getTeamsIndexedByPtid());
         $this->assignRef('matches', $model->getMatches($config));
     }
     // load a class that handles ical formats.
     require_once JLG_PATH_SITE . DS . 'helpers' . DS . 'iCalcreator.class.php';
     // create a new calendar instance
     $v = new vcalendar();
     foreach ($this->matches as $match) {
         $hometeam = $this->teams[$match->projectteam1_id];
         $home = sprintf('%s', $hometeam->name);
         $guestteam = $this->teams[$match->projectteam2_id];
         $guest = sprintf('%s', $guestteam->name);
         $summary = $project->name . ': ' . $home . ' - ' . $guest;
         //  check if match gots a date, if not it will not be included
         //  in ical
         if (!strstr($match->match_date, "0000-00-00")) {
             $syear = JHTML::date($match->match_date, "%Y");
             $sday = JHTML::date($match->match_date, "%d");
             $smonth = JHTML::date($match->match_date, "%m");
             $shour = JHTML::date($match->match_date, "%H");
             $smin = JHTML::date($match->match_date, "%M");
             //$start	= JHTML::date($match->match_date, "%Y-%m-%d %H:%M:%S" );
             $start = strftime("%Y-%m-%d %H:%M:%S", strtotime($match->match_date));
             $start_oldphpversion = array('year' => $syear, 'month' => $smonth, 'day' => $sday, 'hour' => $shour, 'min' => $smin, 'sec' => 0);
             $time_to_ellapse = $project->halftime * ($project->game_parts - 1) + $project->game_regular_time;
             $endtime = JoomleagueHelper::getTimestamp($match->match_date) + $time_to_ellapse * 60;
             $year = JHTML::date($endtime, "%Y");
             $day = JHTML::date($endtime, "%d");
             $month = JHTML::date($endtime, "%m");
             $hour = JHTML::date($endtime, "%H");
             $min = JHTML::date($endtime, "%M");
             //$end		= JHTML::date($endtime, "%Y-%m-%d %H:%M:%S" );
             $end = strftime("%Y-%m-%d %H:%M:%S", $endtime);
             $end_oldphpversion = array('year' => $year, 'month' => $month, 'day' => $day, 'hour' => $hour, 'min' => $min, 'sec' => 0);
             // check if exist a playground in match or team or club
             if ($match->playground_id != "") {
                 $stringlocation = $match->playground_address . ", " . $match->playground_zipcode . " " . $match->playground_city;
                 $stringname = $match->playground_name;
             } else {
                 if ($match->team_playground_id != "") {
                     $stringlocation = $match->team_playground_address . ", " . $match->team_playground_zipcode . " " . $match->team_playground_city;
                     $stringname = $match->team_playground_name;
                 } elseif ($match->club_playground_id != "") {
                     $stringlocation = $match->club_playground_address . ", " . $match->club_playground_zipcode . " " . $match->club_playground_city;
                     $stringname = $match->club_playground_name;
                 }
             }
             $location = $stringlocation;
             //if someone want to insert more in description here is the place
             $description = $stringname;
             // create an event and insert it in calendar
             $vevent = new vevent();
             $vevent->setProperty("dtstart", $start, array("TZID" => $project->timezone));
             $vevent->setProperty("dtend", $end, array("TZID" => $project->timezone));
             $vevent->setProperty('LOCATION', $location);
             $vevent->setProperty('summary', $summary);
             $vevent->setProperty('description', $description);
             $v->setComponent($vevent);
         }
     }
     $v->returnCalendar();
     // exit before display
     //		parent::display( $tpl );
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:75,代码来源:view.html.php

示例3: sendMemberTipResults

 function sendMemberTipResults($predictionMemberID, $predictionGameID, $RoundID, $ProjectID, $joomlaUserID)
 {
     $option = JRequest::getCmd('option');
     $document =& JFactory::getDocument();
     $mainframe =& JFactory::getApplication();
     $configprediction = $this->getPredictionTemplateConfig('predictionentry');
     $overallConfig = $this->getPredictionOverallConfig();
     $configprediction = array_merge($overallConfig, $configprediction);
     $predictionProjectSettings = $this->getPredictionProject($ProjectID);
     $predictionProject = $this->getPredictionGame();
     $predictionProjectS = $this->getPredictionProjectS();
     if ($configprediction['use_pred_select_matches']) {
         $match_ids = $configprediction['predictionmatchid'];
     }
     $roundResults = $this->getMatchesDataForPredictionEntry($predictionGameID, $ProjectID, $RoundID, $joomlaUserID, $match_ids);
     //  $mainframe->enqueueMessage(JText::_('roundResults -> <pre> '.print_r($roundResults,true).'</pre><br>' ),'Notice');
     //  $mainframe->enqueueMessage(JText::_('predictionProject -> <pre> '.print_r($predictionProject,true).'</pre><br>' ),'Notice');
     //  $mainframe->enqueueMessage(JText::_('predictionProjectS -> <pre> '.print_r($predictionProjectS,true).'</pre><br>' ),'Notice');
     $predictionGameMemberMail = $this->getPredictionMemberEMailAdress($predictionMemberID);
     //$mainframe->enqueueMessage(JText::_('predictionGameMemberMail -> <pre> '.print_r($predictionGameMemberMail,true).'</pre><br>' ),'Notice');
     //Fetch the mail object
     $mailer =& JFactory::getMailer();
     // als html
     $mailer->isHTML(TRUE);
     //Set a sender
     $config =& JFactory::getConfig();
     $sender = array($config->getValue('config.mailfrom'), $config->getValue('config.fromname'));
     $mailer->setSender($sender);
     $mailer->addRecipient($predictionGameMemberMail);
     //Create the mail
     $mailer->setSubject(JText::_('COM_JOOMLEAGUE_PRED_ENTRY_MAIL_TITLE'));
     foreach ($predictionProjectS as $predictionProject) {
         $body = '';
         // jetzt die ergebnisse
         $body .= "<html>";
         $body .= "<table class='blog' cellpadding='0' cellspacing='0' width='100%'>";
         $body .= "<tr>";
         $body .= "<td class='sectiontableheader'>";
         $body .= JText::sprintf('COM_JOOMLEAGUE_PRED_HEAD_ACTUAL_PRED_GAME', '<b><i>' . $predictionProject->projectName . '</i></b>');
         $body .= "</td>";
         $body .= "</tr>";
         $body .= "</table>";
         $body .= "<table width='100%' cellpadding='0' cellspacing='0'>";
         $body .= "<tr>";
         $body .= "<th class='sectiontableheader' style='text-align:center;'>" . JText::_('COM_JOOMLEAGUE_PRED_ENTRY_DATE_TIME') . "</th>";
         $body .= "<th class='sectiontableheader' style='text-align:center;' colspan='5' >" . JText::_('COM_JOOMLEAGUE_PRED_ENTRY_MATCH') . "</th>";
         $body .= "<th class='sectiontableheader' style='text-align:center;'>" . JText::_('COM_JOOMLEAGUE_PRED_ENTRY_RESULT') . "</th>";
         $body .= "<th class='sectiontableheader' style='text-align:center;'>" . JText::_('COM_JOOMLEAGUE_PRED_ENTRY_YOURS') . "</th>";
         $body .= "<th class='sectiontableheader' style='text-align:center;'>" . JText::_('COM_JOOMLEAGUE_PRED_ENTRY_POINTS') . "</th>";
         $body .= "</tr>";
         // schleife über die ergebnisse in der runde
         foreach ($roundResults as $result) {
             $class = $k == 0 ? 'sectiontableentry1' : 'sectiontableentry2';
             $resultHome = isset($result->team1_result) ? $result->team1_result : '-';
             if (isset($result->team1_result_decision)) {
                 $resultHome = $result->team1_result_decision;
             }
             $resultAway = isset($result->team2_result) ? $result->team2_result : '-';
             if (isset($result->team2_result_decision)) {
                 $resultAway = $result->team2_result_decision;
             }
             $closingtime = $configprediction['closing_time'];
             //3600=1 hour
             $matchTimeDate = JoomleagueHelper::getTimestamp($result->match_date, 1, $predictionProjectSettings->serveroffset);
             $thisTimeDate = JoomleagueHelper::getTimestamp('', 1, $predictionProjectSettings->serveroffset);
             $matchTimeDate = $matchTimeDate - $closingtime;
             $body .= "<tr class='" . $class . "'>";
             $body .= "<td class='td_c'>";
             $body .= JHtml::date($result->match_date, 'd.m.Y H:i', false);
             $body .= " - ";
             //$body .= JHTML::date(date("Y-m-d H:i:s",$matchTimeDate),$configprediction['time_format']);
             $body .= "</td>";
             $homeName = $this->getMatchTeam($result->projectteam1_id);
             $awayName = $this->getMatchTeam($result->projectteam2_id);
             // clublogo oder vereinsflagge hometeam
             $body .= "<td nowrap='nowrap' class='td_r'>";
             $body .= $homeName;
             $body .= "</td>";
             $body .= "<td nowrap='nowrap' class='td_c'>";
             if ($configprediction['show_logo_small'] == 1) {
                 $logo_home = $this->getMatchTeamClubLogo($result->projectteam1_id);
                 if ($logo_home == '' || !file_exists($logo_home)) {
                     $logo_home = 'images/com_joomleague/database/placeholders/placeholder_small.gif';
                 }
                 $imgTitle = JText::sprintf('COM_JOOMLEAGUE_PRED_ENTRY_LOGO_OF', $homeName);
                 $body .= JHTML::image(JURI::root() . $logo_home, $imgTitle, array(' title' => $imgTitle));
                 $body .= ' ';
             }
             if ($configprediction['show_logo_small'] == 2) {
                 $country_home = $this->getMatchTeamClubFlag($result->projectteam1_id);
                 $body .= Countries::getCountryFlag($country_home);
             }
             $body .= "</td>";
             $body .= "<td nowrap='nowrap' class='td_c'>";
             $body .= "<b>" . $configprediction['seperator'] . "</b>";
             $body .= "</td>";
             // clublogo oder vereinsflagge awayteam
             $body .= "<td nowrap='nowrap' class='td_c'>";
             if ($configprediction['show_logo_small'] == 1) {
                 $logo_away = $this->getMatchTeamClubLogo($result->projectteam2_id);
//.........这里部分代码省略.........
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:101,代码来源:prediction.php

示例4: foreach

 if (count($roundResults) > 0) {
     // schleife über die ergebnisse in der runde
     foreach ($roundResults as $result) {
         $class = $k == 0 ? 'sectiontableentry1' : 'sectiontableentry2';
         $resultHome = isset($result->team1_result) ? $result->team1_result : '-';
         if (isset($result->team1_result_decision)) {
             $resultHome = $result->team1_result_decision;
         }
         $resultAway = isset($result->team2_result) ? $result->team2_result : '-';
         if (isset($result->team2_result_decision)) {
             $resultAway = $result->team2_result_decision;
         }
         $closingtime = $this->config['closing_time'];
         //3600=1 hour
         $matchTimeDate = JoomleagueHelper::getTimestamp($result->match_date, 1, $predictionProjectSettings->serveroffset);
         $thisTimeDate = JoomleagueHelper::getTimestamp('', 1, $predictionProjectSettings->serveroffset);
         // änderungen erlaubt ?   $this->config['show_help']
         if ($this->show_debug_info) {
             echo '<br />this->closingtime<pre>~' . print_r($closingtime, true) . '~</pre><br />';
             echo '<br />this->matchTimeDate<pre>~' . print_r($matchTimeDate, true) . '~</pre><br />';
             echo '<br />this->thisTimeDate<pre>~' . print_r($thisTimeDate, true) . '~</pre><br />';
             echo '<br />this->allowedAdmin<pre>~' . print_r($this->allowedAdmin, true) . '~</pre><br />';
             echo '<br />this->predictionMember->admintipp<pre>~' . print_r($this->predictionMember->admintipp, true) . '~</pre><br />';
             echo '<br />this->use_tipp_admin<pre>~' . print_r($this->config['use_tipp_admin'], true) . '~</pre><br />';
         }
         $matchTimeDate = $matchTimeDate - $closingtime;
         $tippAllowed = $thisTimeDate < $matchTimeDate && $resultHome == '-' && $resultAway == '-' || $this->allowedAdmin && $this->predictionMember->admintipp;
         //$tippAllowed = true;
         if (!$tippAllowed) {
             $disabled = ' disabled="disabled" ';
         } else {
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_view_tippentry_do.php

示例5: foreach

$dummyOutputShown = false;
foreach ($this->predictionProjectS as $predictionProject) {
    if ($this->model->pjID == 0 || $this->model->pjID == $predictionProject->project_id) {
        if ($predictionProjectSettings = $this->model->getPredictionProject($predictionProject->project_id)) {
            //$predictionProjectSettings->start_date='2010-08-08';
            //$time=time();
            $time = strtotime($predictionProjectSettings->start_date);
            //$date=date("Y-m-d",$time);
            //echo $date.'/';
            $time += 86400;
            // Ein Tag in Sekunden
            $showDate = date("Y-m-d", $time);
            //echo $showDate;
            $thisTimeDate = JoomleagueHelper::getTimestamp('', 1, $predictionProjectSettings->serveroffset);
            //$competitionStartTimeDate = JoomleagueHelper::getTimestamp($predictionProjectSettings->start_date,1,$predictionProjectSettings->serveroffset);
            $competitionStartTimeDate = JoomleagueHelper::getTimestamp($showDate, 1, $predictionProjectSettings->serveroffset);
            $showChamp = $thisTimeDate > $competitionStartTimeDate;
            //if (($showChamp) || ($this->showediticon))
            if ($this->show_debug_info) {
                echo '<br />predictionuser info -> time <pre>~' . print_r($time, true) . '~</pre><br />';
                echo '<br />predictionuser info -> showDate <pre>~' . print_r($showDate, true) . '~</pre><br />';
                echo '<br />predictionuser info -> thisTimeDate <pre>~' . print_r($thisTimeDate, true) . '~</pre><br />';
                echo '<br />predictionuser info -> competitionStartTimeDate <pre>~' . print_r($competitionStartTimeDate, true) . '~</pre><br />';
                echo '<br />predictionuser info -> showChamp <pre>~' . print_r($showChamp, true) . '~</pre><br />';
            }
            if ($showChamp) {
                if ($res =& $this->model->getPredictionProjectTeams($predictionProject->project_id)) {
                    foreach ($res as $team) {
                        foreach ($this->champTeams as $key => $value) {
                            if ($team->value == $value) {
                                $found = true;
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:31,代码来源:default_info.php


注:本文中的JoomleagueHelper::getTimestamp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。