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


PHP Tools::formatDate方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     echo 'Test';
     $aa = file_get_contents('/home/zhanghe/code/php/phalcon/app/library/rsa_1024_pub.pem');
     echo $aa . '<br/>';
     echo Tools::formatDate() . '<br/>';
     echo Tools::realIp() . '<br/>';
     //echo Tools::validateLogin().'<br/>';
     die;
 }
开发者ID:stylenic,项目名称:phalcon,代码行数:10,代码来源:TestController.php

示例2: display

 protected function display()
 {
     if (Tools::isConnectedUser()) {
         // only teamMembers & observers can access this page
         if (0 == $this->teamid || $this->session_user->isTeamCustomer($this->teamid)) {
             $this->smartyHelper->assign('accessDenied', TRUE);
         } else {
             $team = TeamCache::getInstance()->getTeam($this->teamid);
             $formatedteamName = str_replace(" ", "_", $team->getName());
             // dates
             $month = date('m');
             $year = date('Y');
             // The first day of the current month
             $startdate = Tools::getSecurePOSTStringValue("startdate", Tools::formatDate("%Y-%m-%d", mktime(0, 0, 0, $month, 1, $year)));
             $this->smartyHelper->assign('startDate', $startdate);
             $startTimestamp = Tools::date2timestamp($startdate);
             // The current date plus one year
             $nbDaysInMonth = date("t", mktime(0, 0, 0, $month, 1, $year));
             $enddate = Tools::getSecurePOSTStringValue("enddate", Tools::formatDate("%Y-%m-%d", mktime(23, 59, 59, $month, $nbDaysInMonth, $year)));
             $this->smartyHelper->assign('endDate', $enddate);
             $endTimestamp = Tools::date2timestamp($enddate);
             $endTimestamp += 24 * 60 * 60 - 1;
             // + 1 day -1 sec.
             if ('computeCsvMonthly' == $_POST['action']) {
                 $timeTracking = new TimeTracking($startTimestamp, $endTimestamp, $this->teamid);
                 $myFile = Constants::$codevOutputDir . DIRECTORY_SEPARATOR . 'reports' . DIRECTORY_SEPARATOR . $formatedteamName . "_Mantis_" . date("Ymd") . ".csv";
                 ExportCsvTools::exportManagedIssuesToCSV($this->teamid, $startTimestamp, $endTimestamp, $myFile);
                 $this->smartyHelper->assign('managedIssuesToCSV', basename($myFile));
                 $myFile = Constants::$codevOutputDir . DIRECTORY_SEPARATOR . 'reports' . DIRECTORY_SEPARATOR . $formatedteamName . "_Projects_" . date("Ymd", $timeTracking->getStartTimestamp()) . "-" . date("Ymd", $timeTracking->getEndTimestamp()) . ".csv";
                 $this->exportProjectMonthlyActivityToCSV($timeTracking, $myFile);
                 $this->smartyHelper->assign('projectMonthlyActivityToCSV', basename($myFile));
                 // reduce scope to enhance speed
                 $reports = array();
                 for ($i = 1; $i <= 12; $i++) {
                     $reports[] = basename(ExportCsvTools::exportHolidaystoCSV($i, $year, $this->teamid, $formatedteamName, Constants::$codevOutputDir . DIRECTORY_SEPARATOR . 'reports'));
                 }
                 $this->smartyHelper->assign('reports', $reports);
                 $this->smartyHelper->assign('reportsDir', Constants::$codevOutputDir . DIRECTORY_SEPARATOR . 'reports');
             }
         }
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:42,代码来源:export_csv_monthly.php

示例3: display

 protected function display()
 {
     if (Tools::isConnectedUser()) {
         // only teamMembers & observers can access this page
         if (0 == $this->teamid || $this->session_user->isTeamCustomer($this->teamid)) {
             $this->smartyHelper->assign('accessDenied', TRUE);
         } else {
             $isManager = $this->session_user->isTeamManager($this->teamid);
             $isObserver = $this->session_user->isTeamObserver($this->teamid);
             if ($isManager || $isObserver) {
                 // observers have access to the same info
                 $this->smartyHelper->assign('isManager', true);
             }
             // dates
             $month = date('m');
             $year = date('Y');
             $startdate = Tools::getSecurePOSTStringValue("startdate", Tools::formatDate("%Y-%m-%d", mktime(0, 0, 0, $month, 1, $year)));
             $this->smartyHelper->assign('startDate', $startdate);
             $startTimestamp = Tools::date2timestamp($startdate);
             $nbDaysInMonth = date("t", $startTimestamp);
             $enddate = Tools::getSecurePOSTStringValue("enddate", Tools::formatDate("%Y-%m-%d", mktime(0, 0, 0, $month, $nbDaysInMonth, $year)));
             $this->smartyHelper->assign('endDate', $enddate);
             $endTimestamp = Tools::date2timestamp($enddate);
             #$isDetailed = Tools::getSecurePOSTStringValue('cb_detailed','');
             #$this->smartyHelper->assign('isDetailed', $isDetailed);
             if ('computeMonthlyActivityReport' == $_POST['action']) {
                 $timeTracking = new TimeTracking($startTimestamp, $endTimestamp, $this->teamid);
                 $tracks = $timeTracking->getTimeTracks();
                 $this->smartyHelper->assign('monthlyActivityReport', $this->getMonthlyActivityReport($tracks));
                 // ConsistencyCheck
                 $consistencyErrors = $this->getConsistencyErrors($timeTracking);
                 if (count($consistencyErrors) > 0) {
                     $this->smartyHelper->assign('ccheckErrList', $consistencyErrors);
                     $this->smartyHelper->assign('ccheckButtonTitle', count($consistencyErrors) . ' ' . T_("Errors"));
                     $this->smartyHelper->assign('ccheckBoxTitle', count($consistencyErrors) . ' ' . T_("days are incomplete or undefined"));
                 }
             }
         }
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:40,代码来源:team_monthly_activity_report.php

示例4: display

 protected function display()
 {
     if (Tools::isConnectedUser()) {
         // only teamMembers & observers can access this page
         if (0 == $this->teamid || $this->session_user->isTeamCustomer($this->teamid)) {
             $this->smartyHelper->assign('accessDenied', TRUE);
         } else {
             // dates
             $weekDates = Tools::week_dates(date('W'), date('Y'));
             $startdate = Tools::getSecurePOSTStringValue("startdate", Tools::formatDate("%Y-%m-%d", $weekDates[1]));
             $this->smartyHelper->assign('startDate', $startdate);
             $enddate = Tools::getSecurePOSTStringValue("enddate", Tools::formatDate("%Y-%m-%d", $weekDates[5]));
             $this->smartyHelper->assign('endDate', $enddate);
             $isDetailed = Tools::getSecurePOSTIntValue('withJobDetails', 0);
             $this->smartyHelper->assign('isJobDetails', $isDetailed);
             $isExtTasksPrj = Tools::getSecurePOSTIntValue('withExtTasksPrj', 0);
             $this->smartyHelper->assign('isExtTasksPrj', $isExtTasksPrj);
             $isSideTasksPrj = Tools::getSecurePOSTIntValue('withSideTasksPrj', 1);
             $this->smartyHelper->assign('isSideTasksPrj', $isSideTasksPrj);
             if ('computeProjectActivityReport' == $_POST['action']) {
                 $startTimestamp = Tools::date2timestamp($startdate);
                 $endTimestamp = Tools::date2timestamp($enddate);
                 $endTimestamp = mktime(23, 59, 59, date('m', $endTimestamp), date('d', $endTimestamp), date('Y', $endTimestamp));
                 $timeTracking = new TimeTracking($startTimestamp, $endTimestamp, $this->teamid);
                 $this->smartyHelper->assign('projectActivityReport', $this->getProjectActivityReport($timeTracking->getProjectTracks(true), $this->teamid, $isDetailed));
                 // WorkingDaysPerProjectPerUser
                 $data = $timeTracking->getWorkingDaysPerProjectPerUser($isExtTasksPrj, true, $isSideTasksPrj);
                 foreach ($data as $smartyKey => $smartyVariable) {
                     $this->smartyHelper->assign($smartyKey, $smartyVariable);
                 }
                 $data = $this->getWorkingDaysPerProjectPerUser($startTimestamp, $endTimestamp, $isExtTasksPrj, $isSideTasksPrj);
                 foreach ($data as $smartyKey => $smartyVariable) {
                     $this->smartyHelper->assign($smartyKey, $smartyVariable);
                 }
             }
         }
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:38,代码来源:project_activity_report.php

示例5: display

 protected function display()
 {
     if (Tools::isConnectedUser()) {
         $session_user = UserCache::getInstance()->getUser($_SESSION['userid']);
         $mTeamList = $session_user->getDevTeamList();
         $lTeamList = $session_user->getLeadedTeamList();
         $oTeamList = $session_user->getObservedTeamList();
         $managedTeamList = $session_user->getManagedTeamList();
         $teamList = $mTeamList + $lTeamList + $oTeamList + $managedTeamList;
         $defaultTeam = isset($_SESSION['teamid']) ? $_SESSION['teamid'] : 0;
         $teamid = Tools::getSecureGETIntValue('teamid', $defaultTeam);
         $_SESSION['teamid'] = $teamid;
         $this->smartyHelper->assign('teams', SmartyTools::getSmartyArray($teamList, $teamid));
         // if current team is not in allowed list, do not display
         if (array_key_exists($teamid, $teamList)) {
             $team = TeamCache::getInstance()->getTeam($teamid);
             $start_year = date("Y", $team->getDate());
             $start_month = date("m", $team->getDate());
             $start_day = date("d", $team->getDate());
             $statusNames = Config::getInstance()->getValue("statusNames");
             ksort($statusNames);
             $this->smartyHelper->assign('statusNames', $statusNames);
             $periodStatsReport = new PeriodStatsReport($start_year, $start_month, $start_day, $teamid);
             $periodStatsList = $periodStatsReport->computeReport();
             $periods = array();
             foreach ($periodStatsList as $date => $ps) {
                 $status = array();
                 foreach ($statusNames as $s => $sname) {
                     $status[$s] = $ps->getStatusCount($s);
                 }
                 $periods[Tools::formatDate("%B %Y", $date)] = $status;
             }
             $this->smartyHelper->assign('periods', $periods);
         }
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:36,代码来源:mantis_reports.php

示例6: display

 protected function display()
 {
     if (Tools::isConnectedUser()) {
         // only teamMembers & observers can access this page
         if (0 == $this->teamid || $this->session_user->isTeamCustomer($this->teamid)) {
             $this->smartyHelper->assign('accessDenied', TRUE);
         } else {
             $projects[0] = T_('All projects');
             $projects += TeamCache::getInstance()->getTeam($this->teamid)->getProjects(false);
             $projectid = 0;
             if (isset($_POST['projectid']) && array_key_exists($_POST['projectid'], $projects)) {
                 $projectid = Tools::getSecurePOSTIntValue('projectid');
                 $_SESSION['projectid'] = $_POST['projectid'];
             } else {
                 if (isset($_SESSION['projectid']) && array_key_exists($_SESSION['projectid'], $projects)) {
                     $projectid = $_SESSION['projectid'];
                 }
             }
             $this->smartyHelper->assign('projects', SmartyTools::getSmartyArray($projects, $projectid));
             // The first day of the current week
             $weekDates = Tools::week_dates(date('W'), date('Y'));
             $startdate = Tools::getSecurePOSTStringValue('startdate', Tools::formatDate("%Y-%m-%d", $weekDates[1]));
             $this->smartyHelper->assign('startDate', $startdate);
             // The current date plus one year
             $enddate = Tools::getSecurePOSTStringValue('enddate', Tools::formatDate("%Y-%m-%d", strtotime('+6 month')));
             $this->smartyHelper->assign('endDate', $enddate);
             if ('computeGantt' == $_POST['action']) {
                 $startT = Tools::date2timestamp($startdate);
                 $endT = Tools::date2timestamp($enddate);
                 #$endT += 24 * 60 * 60 -1; // + 1 day -1 sec.
                 // draw graph
                 $this->smartyHelper->assign('urlGraph', 'teamid=' . $this->teamid . '&projects=' . $projectid . '&startT=' . $startT . '&endT=' . $endT);
             }
         }
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:36,代码来源:gantt_report.php

示例7: getSmartyVariables

 public function getSmartyVariables($isAjaxCall = false)
 {
     $totalLoad = 0;
     foreach ($this->execData as $duration) {
         $totalLoad += $duration;
     }
     // table data
     $tableData = array('projectLoad' => $this->execData, 'totalLoad' => $totalLoad, 'workdays' => Holidays::getInstance()->getWorkdays($this->startTimestamp, $this->endTimestamp));
     // ------------------------
     // pieChart data
     $jqplotData = Tools::array2plot($this->execData);
     $smartyVariables = array('loadPerProjectIndicator_tableData' => $tableData, 'loadPerProjectIndicator_jqplotData' => empty($jqplotData) ? NULL : $jqplotData, 'loadPerProjectIndicator_startDate' => Tools::formatDate("%Y-%m-%d", $this->startTimestamp), 'loadPerProjectIndicator_endDate' => Tools::formatDate("%Y-%m-%d", $this->endTimestamp));
     if (false == $isAjaxCall) {
         $smartyVariables['loadPerProjectIndicator_ajaxFile'] = self::getSmartySubFilename();
         $smartyVariables['loadPerProjectIndicator_ajaxPhpURL'] = self::getAjaxPhpURL();
     }
     return $smartyVariables;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:18,代码来源:LoadPerProjectIndicator.class.php

示例8: getSmartyVariables

 public function getSmartyVariables($isAjaxCall = false)
 {
     $loadPerJobs = $this->execData['loadPerJobs'];
     $data = array();
     $formatedColors = array();
     foreach ($loadPerJobs as $jobItem) {
         $data[$jobItem['name']] = $jobItem['nbDays'];
         $formatedColors[] = '#' . $jobItem['color'];
     }
     $seriesColors = '["' . implode('","', $formatedColors) . '"]';
     // ["#FFCD85","#C2DFFF"]
     $startTimestamp = NULL == $this->startTimestamp ? $this->execData['realStartTimestamp'] : $this->startTimestamp;
     $endTimestamp = NULL == $this->endTimestamp ? $this->execData['realEndTimestamp'] : $this->endTimestamp;
     $smartyVariables = array('loadPerJobIndicator_tableData' => $loadPerJobs, 'loadPerJobIndicator_jqplotData' => empty($data) ? NULL : Tools::array2json($data), 'loadPerJobIndicator_colors' => $formatedColors, 'loadPerJobIndicator_jqplotSeriesColors' => $seriesColors, 'loadPerJobIndicator_startDate' => Tools::formatDate("%Y-%m-%d", $startTimestamp), 'loadPerJobIndicator_endDate' => Tools::formatDate("%Y-%m-%d", $endTimestamp));
     if (false == $isAjaxCall) {
         $smartyVariables['loadPerJobIndicator_ajaxFile'] = self::getSmartySubFilename();
         $smartyVariables['loadPerJobIndicator_ajaxPhpURL'] = self::getAjaxPhpURL();
     }
     return $smartyVariables;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:20,代码来源:LoadPerJobIndicator2.class.php

示例9: getMonth

 /**
  * @param int $month
  * @param int $year
  * @param Issue $issue The issue
  * @param TimeTrack[] $trackList
  * @return mixed[]
  */
 private function getMonth($month, $year, Issue $issue, array $trackList)
 {
     $totalDuration = 0;
     // if no work done this month, do not display month
     $found = 0;
     foreach ($trackList as $tt) {
         if ($month == date('m', $tt->getDate()) && $year == date('Y', $tt->getDate())) {
             $found += 1;
             $totalDuration += $tt->getDuration();
         }
     }
     if (0 == $found) {
         return NULL;
     }
     $monthTimestamp = mktime(0, 0, 0, $month, 1, $year);
     $monthFormated = Tools::formatDate("%B %Y", $monthTimestamp);
     $nbDaysInMonth = date("t", $monthTimestamp);
     $months = array();
     for ($i = 1; $i <= $nbDaysInMonth; $i++) {
         if ($i < 10) {
             $months[] = "0" . $i;
         } else {
             $months[] = $i;
         }
     }
     $jobs = new Jobs();
     $userList = $issue->getInvolvedUsers();
     $users = NULL;
     $timeTracks = $issue->getTimeTracks();
     foreach ($userList as $uid => $username) {
         $userTotalDuration = 0;
         // build $durationByDate[] for this user
         $durationByDate = array();
         $jobColorByDate = array();
         foreach ($timeTracks as $tt) {
             if ($tt->getUserId() == $uid) {
                 $date = $tt->getDate();
                 if (array_key_exists($date, $durationByDate)) {
                     $durationByDate[$date] += $tt->getDuration();
                 } else {
                     $durationByDate[$date] = $tt->getDuration();
                 }
                 $jobColorByDate[$date] = $jobs->getJobColor($tt->getJobId());
             }
         }
         $usersDetails = NULL;
         for ($i = 1; $i <= $nbDaysInMonth; $i++) {
             $todayTimestamp = mktime(0, 0, 0, $month, $i, $year);
             if (array_key_exists($todayTimestamp, $durationByDate)) {
                 $userTotalDuration += $durationByDate[$todayTimestamp];
                 $usersDetails[] = array("jobColor" => $jobColorByDate[$todayTimestamp], "jobDuration" => $durationByDate[$todayTimestamp]);
             } else {
                 // if weekend or holiday, display gray
                 $holidays = Holidays::getInstance();
                 $h = $holidays->isHoliday($todayTimestamp);
                 if (NULL != $h) {
                     $usersDetails[] = array("jobColor" => Holidays::$defaultColor, "jobDescription" => $h->description);
                 } else {
                     $usersDetails[] = array();
                 }
             }
         }
         $users[] = array("username" => $username, "jobs" => $usersDetails, 'totalDuration' => 0 == $userTotalDuration ? '' : $userTotalDuration);
     }
     return array("monthFormated" => $monthFormated, "totalDuration" => $totalDuration, "months" => $months, "users" => $users);
 }
开发者ID:dfuzeau,项目名称:codev,代码行数:73,代码来源:issue_info.php

示例10: getDays

 /**
  * Get days of a month
  * @param int $nbDaysInMonth The number of days in a month
  * @param int $month The month
  * @param int $year The year
  * @return mixed[int]
  */
 function getDays($nbDaysInMonth, $month, $year)
 {
     $today = date("d-m-Y");
     $days = array();
     for ($i = 1; $i <= $nbDaysInMonth; $i++) {
         $curDate = mktime(0, 0, 0, $month, $i, $year);
         if ($today == date("d-m-Y", $curDate)) {
             $title = T_('today');
         } else {
             $title = Tools::formatDate("%A", $curDate);
         }
         $days[sprintf("%02d", $i)] = array('title' => $title, 'selected' => $today == date("d-m-Y", $curDate));
     }
     return $days;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:22,代码来源:holidays_report.php

示例11: getSmartyVariables

 /**
  *
  * @param boolean $isAjaxCall
  * @return array
  */
 public function getSmartyVariables($isAjaxCall = false)
 {
     $team = TeamCache::getInstance()->getTeam($this->teamid);
     $teamProjects = $team->getProjects(false, true, true);
     $teamProjects['allSidetasksProjects'] = '-- ' . T_('All Sidetasks Projects') . ' --';
     $teamProjects['allProdProjects'] = '-- ' . T_('All Production Projects') . ' --';
     $teamProjects['allProjects'] = '-- ' . T_('All Projects') . ' --';
     $projects = SmartyTools::getSmartyArray($teamProjects, $this->selectedProject);
     //self::$logger->error(var_export($projects, true));
     $data = array();
     foreach ($this->execData as $catInfo) {
         if (0 != $catInfo['duration']) {
             $data[$catInfo['catName']] = $catInfo['duration'];
         }
     }
     $jqplotData = empty($data) ? NULL : Tools::array2plot($data);
     $smartyVariables = array('loadPerProjCategoryIndicator_startDate' => Tools::formatDate("%Y-%m-%d", $this->startTimestamp), 'loadPerProjCategoryIndicator_endDate' => Tools::formatDate("%Y-%m-%d", $this->endTimestamp), 'loadPerProjCategoryIndicator_projects' => $projects, 'loadPerProjCategoryIndicator_tableData' => $this->execData, 'loadPerProjCategoryIndicator_jqplotData' => $jqplotData, 'loadPerProjCategoryIndicator_' . self::OPTION_DISPLAY_TASKS => $this->isDisplayTasks);
     if (false == $isAjaxCall) {
         $smartyVariables['loadPerProjCategoryIndicator_ajaxFile'] = self::getSmartySubFilename();
         $smartyVariables['loadPerProjCategoryIndicator_ajaxPhpURL'] = self::getAjaxPhpURL();
     }
     return $smartyVariables;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:28,代码来源:LoadPerProjCategoryIndicator.class.php

示例12: getSmartyVariables

 /**
  *
  * @param boolean $isAjaxCall
  * @return array
  */
 public function getSmartyVariables($isAjaxCall = false)
 {
     $availableTeams = SmartyTools::getSmartyArray($this->execData['teamList'], $this->displayedTeam);
     $smartyVariables = array('timetrackDetailsIndicator_availableTeams' => $availableTeams, 'timetrackDetailsIndicator_startDate' => Tools::formatDate("%Y-%m-%d", $this->execData['startTimestamp']), 'timetrackDetailsIndicator_endDate' => Tools::formatDate("%Y-%m-%d", $this->execData['endTimestamp']), 'timetrackDetailsIndicator_timetracks' => $this->execData['timetracks'], 'timetrackDetailsIndicator_' . self::OPTION_DISPLAYED_TEAM => $this->displayedTeam);
     if (false == $isAjaxCall) {
         $smartyVariables['timetrackDetailsIndicator_ajaxFile'] = self::getSmartySubFilename();
         $smartyVariables['timetrackDetailsIndicator_ajaxPhpURL'] = self::getAjaxPhpURL();
     }
     return $smartyVariables;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:15,代码来源:TimetrackDetailsIndicator.class.php

示例13: displayCommandSet

 /**
  * @param SmartyHelper $smartyHelper
  * @param CommandSet $commandset
  */
 public static function displayCommandSet(SmartyHelper $smartyHelper, CommandSet $commandset, $isManager, $selectedFilters = '')
 {
     #$smartyHelper->assign('commandsetId', $commandset->getId());
     $smartyHelper->assign('teamid', $commandset->getTeamid());
     $smartyHelper->assign('commandsetName', $commandset->getName());
     $smartyHelper->assign('commandsetReference', $commandset->getReference());
     $smartyHelper->assign('commandsetDesc', $commandset->getDesc());
     $smartyHelper->assign('commandsetBudget', $commandset->getBudgetDays());
     $smartyHelper->assign('commandsetCost', $commandset->getCost());
     $smartyHelper->assign('commandsetCurrency', $commandset->getCurrency());
     if (!is_null($commandset->getDate())) {
         $smartyHelper->assign('commandsetDate', Tools::formatDate("%Y-%m-%d", $commandset->getDate()));
     }
     $smartyHelper->assign('cmdList', self::getCommandSetCommands($commandset->getId(), Command::type_general));
     $smartyHelper->assign('cmdsetDetailedMgr', self::getCommandSetDetailedMgr($commandset->getId(), Command::type_general));
     // Budget
     $cmdList = $commandset->getCommands(Command::type_general);
     $cmdsProvAndMeeCost = 0;
     foreach ($cmdList as $cmd) {
         // TODO math should not be in here !
         $mgrEE = $cmd->getIssueSelection()->mgrEffortEstim;
         $cmdProvAndMeeCost = $mgrEE * $cmd->getAverageDailyRate() + $cmd->getProvisionBudget(TRUE);
         $cmdsProvAndMeeCost += $cmdProvAndMeeCost;
     }
     $smartyHelper->assign('cmdsProvAndMeeCost', $cmdsProvAndMeeCost);
     $color1 = $cmdProvAndMeeCost > $commandset->getCost() ? "fcbdbd" : "bdfcbd";
     $smartyHelper->assign('cmdsProvAndMeeCostColor', $color1);
     //$cmdTotalElapsed = $commandset->getIssueSelection()->getElapsed($cmd->$commandset(), $commandset->getDeadline());
     $csetTotalElapsed = $commandset->getIssueSelection(Command::type_general)->getElapsed();
     $smartyHelper->assign('commandsetTotalElapsed', $csetTotalElapsed);
     $smartyHelper->assign('cmdProvisionList', self::getProvisionList($commandset));
     $smartyHelper->assign('cmdProvisionTotalList', self::getProvisionTotalList($commandset));
     // DetailedChargesIndicator
     $data = self::getDetailedCharges($commandset, $isManager, $selectedFilters);
     foreach ($data as $smartyKey => $smartyVariable) {
         $smartyHelper->assign($smartyKey, $smartyVariable);
     }
 }
开发者ID:fg-ok,项目名称:codev,代码行数:42,代码来源:commandset_tools.php

示例14: getSmartyVariables

 /**
  *
  * @return type
  */
 public function getSmartyVariables($isAjaxCall = false)
 {
     $theoBacklog = $this->execData['theo'];
     $realBacklog = $this->execData['real'];
     $startTimestamp = $this->startTimestamp;
     $endTimestamp = strtotime(date("Y-m-d", $this->endTimestamp) . " +1 month");
     $interval = ceil($this->interval / 20);
     // TODO why 20 ?
     $graphData = "[" . Tools::array2plot($theoBacklog) . ',' . Tools::array2plot($realBacklog) . "]";
     $smartyVariables = array('progressHistoryIndicator2_jqplotData' => $graphData, 'progressHistoryIndicator2_plotMinDate' => Tools::formatDate("%Y-%m-%d", $startTimestamp), 'progressHistoryIndicator2_plotMaxDate' => Tools::formatDate("%Y-%m-%d", $endTimestamp), 'progressHistoryIndicator2_plotInterval' => $interval, 'progressHistoryIndicator2_' . self::OPTION_INTERVAL => $this->interval);
     if (false == $isAjaxCall) {
         $smartyVariables['progressHistoryIndicator2_ajaxFile'] = self::getSmartySubFilename();
         $smartyVariables['progressHistoryIndicator2_ajaxPhpURL'] = self::getAjaxPhpURL();
     }
     return $smartyVariables;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:20,代码来源:ProgressHistoryIndicator2.class.php

示例15: getHolidays

 /**
  * Get holidays
  * @static
  * @return mixed[int]
  */
 public static function getHolidays()
 {
     $query = 'SELECT * FROM `codev_holidays_table` ORDER BY date DESC';
     $result = SqlWrapper::getInstance()->sql_query($query);
     if (!$result) {
         return NULL;
     }
     $holidays = array();
     while ($row = SqlWrapper::getInstance()->sql_fetch_object($result)) {
         $holidays[$row->id] = array("date" => Tools::formatDate("%d %b %Y (%a)", $row->date), "desc" => $row->description, "color" => $row->color);
     }
     return $holidays;
 }
开发者ID:fg-ok,项目名称:codev,代码行数:18,代码来源:holidays.class.php


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