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


PHP CDate::format方法代码示例

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


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

示例1: isHoliday

function isHoliday($date = 0)
{
    // Query database for settings
    $holiday_manual = db_loadResult('SELECT holiday_manual FROM holiday_settings');
    $holiday_auto = db_loadResult('SELECT holiday_auto FROM holiday_settings');
    $holiday_driver = db_loadResult('SELECT holiday_driver FROM holiday_settings');
    if (!$date) {
        $date = new CDate();
    }
    if ($holiday_manual) {
        // Check whether the date is blacklisted
        $sql = "SELECT * FROM holiday ";
        $sql .= "WHERE ( date(holiday_start_date) <= '";
        $sql .= $date->format('%Y-%m-%d');
        $sql .= "' AND date(holiday_end_date) >= '";
        $sql .= $date->format('%Y-%m-%d');
        $sql .= "' AND holiday_white=0 ) ";
        $sql .= "OR ( ";
        $sql .= " DATE_FORMAT(holiday_start_date, '%m-%d') <= '";
        $sql .= $date->format('%m-%d');
        $sql .= "' AND DATE_FORMAT(holiday_end_date, '%m-%d') >= '";
        $sql .= $date->format('%m-%d');
        $sql .= "' AND holiday_annual=1";
        $sql .= " AND holiday_white=0 ) ";
        if (db_loadResult($sql)) {
            return 0;
        }
        // Check if we have a whitelist item for this date
        $sql = "SELECT * FROM holiday ";
        $sql .= "WHERE ( date(holiday_start_date) <= '";
        $sql .= $date->format('%Y-%m-%d');
        $sql .= "' AND date(holiday_end_date) >= '";
        $sql .= $date->format('%Y-%m-%d');
        $sql .= "' AND holiday_white=1 ) ";
        $sql .= "OR ( ";
        $sql .= " DATE_FORMAT(holiday_start_date, '%m-%d') <= '";
        $sql .= $date->format('%m-%d');
        $sql .= "' AND DATE_FORMAT(holiday_end_date, '%m-%d') >= '";
        $sql .= $date->format('%m-%d');
        $sql .= "' AND holiday_annual=1";
        $sql .= " AND holiday_white=1 ) ";
        if (db_loadResult($sql)) {
            return 1;
        }
    }
    if ($holiday_auto) {
        // Still here? Ok, lets poll the automatic system
        $drivers_alloc = Date_Holidays::getInstalledDrivers();
        $driver_object = Date_Holidays::factory($drivers_alloc[$holiday_driver]['title'], $date->getYear(), 'en_EN');
        if (!Date_Holidays::isError($driver_object)) {
            if ($driver_object->getHolidayForDate($date)) {
                return 1;
            }
        }
    }
    // No hits, must be a working day
    return 0;
}
开发者ID:slawekmikula,项目名称:dotproject,代码行数:58,代码来源:holiday_func.php

示例2: showchilddept_maintenance

function showchilddept_maintenance(&$a, $level = 0)
{
    global $AppUI, $df, $rownum;
    if (strlen($a["dept_batching_maintenance"]) == 0) {
        $batching_expire_date = null;
    } else {
        $batching_expire_date = new CDate($a["dept_batching_maintenance"]);
    }
    $s .= '<td><a href="?m=departments&amp;a=view&amp;dept_id=' . $a['dept_id'] . '">' . $a['dept_name'] . '</a>';
    $s .= '<input type="hidden" name="dept_id[]" id="dept_id' . $rownum . '" value="' . $a['dept_id'] . '" />';
    $s .= '</td>';
    $s .= '<td> <input type="text" class="text" name="batching_maintenance[]" id="batching_maintenance' . $rownum . '" disabled="disabled" value="' . ($batching_expire_date ? $batching_expire_date->format($df) : '') . '"/>';
    $s .= '<input type="hidden" name="dept_batching_maintenance[]" id="dept_batching_maintenance' . $rownum . '" value="' . ($batching_expire_date ? $batching_expire_date->format(FMT_TIMESTAMP_DATE) : '') . '" />';
    $s .= '<a href="#" onclick="javascript:popCalendar(getRow(event))"> <img src="./images/calendar.gif" name="img_expiredate" width="24" height="12" alt="' . $AppUI->_('Calendar') . '" border="0" /></a>';
    $s .= '</td>';
    $dept_checked = time() > strtotime($a['dept_batching_maintenance']) ? "checked='checked'" : "";
    //checked for expired dept.
    $s .= "<td align='center'><input type='checkbox' value='{$a['dept_id']}' {$dept_checked} name='select_dept[]'></td>";
    echo '<tr>' . $s . '</tr>';
    $rownum = $rownum + 1;
}
开发者ID:srinivasulurao,项目名称:jonel,代码行数:21,代码来源:batching-maintenance-report.php

示例3: showchilddept_maintenance

function showchilddept_maintenance(&$a, $level = 0)
{
    global $AppUI, $df, $rownum;
    if (strlen($a["dept_batching_maintenance"]) == 0) {
        $batching_expire_date = null;
    } else {
        $batching_expire_date = new CDate($a["dept_batching_maintenance"]);
    }
    $s .= '<td align="center"><a href="?m=departments&amp;a=view&amp;dept_id=' . $a['dept_id'] . '">' . $a['dept_name'] . '</a>';
    $s .= '<input type="hidden" name="dept_id[]" id="dept_id' . $rownum . '" value="' . $a['dept_id'] . '" />';
    $s .= '</td>';
    $s .= '<td align="center"> <input type="text" class="text" name="batching_maintenance[]" id="batching_maintenance' . $rownum . '" disabled="disabled" value="' . ($batching_expire_date ? $batching_expire_date->format($df) : '') . '"/>';
    $s .= '<input type="hidden" name="dept_batching_maintenance[]" id="dept_batching_maintenance' . $rownum . '" value="' . ($batching_expire_date ? $batching_expire_date->format(FMT_TIMESTAMP_DATE) : '') . '" />';
    $s .= '<a href="#" onclick="javascript:popCalendar(getRow(event))"> <img src="./images/calendar.gif" name="img_expiredate" width="24" height="12" alt="' . $AppUI->_('Calendar') . '" border="0" /></a>';
    $s .= '</td>';
    $calAdder = '<a href="javascript:void(0)" onclick="javascript:popCalendarAccept(getRow(event))"> <img src="./images/calendar.gif" name="img_expiredate2" width="24" height="12" alt="' . $AppUI->_('Calendar') . '" border="0" /></a>';
    $last_report_generation_date = $a['last_report_generation_date'] == "0000-00-00 00:00:00" ? "Not Generated Yet" : date("d/M/Y", strtotime($a['last_report_generation_date']));
    $last_report_accept_date = date("d/M/Y", strtotime($a['last_report_accept_date']));
    $last_report_accept_date_hidden = date("Ymd", strtotime($a['last_report_accept_date']));
    $s .= "<td align='center'>{$last_report_generation_date}</td><td align='center'><input class='text' id='last_report_accept_date_hidden{$rownum}' name='last_report_accept_date_hidden[]' value='{$last_report_accept_date_hidden}' type='hidden'><input type='text' name='last_report_accept_date[]' id='last_report_accept_date{$rownum}' class='text' value='{$last_report_accept_date}' disabled>{$calAdder}</td>";
    echo '<tr>' . $s . '</tr>';
    $rownum = $rownum + 1;
}
开发者ID:srinivasulurao,项目名称:jonel,代码行数:23,代码来源:ae_batching_maintenance.php

示例4: addHelpDeskTaskLog

 function addHelpDeskTaskLog()
 {
     global $AppUI, $helpdesk_available;
     if ($helpdesk_available && $this->file_helpdesk_item != 0) {
         // create task log with information about the file that was uploaded
         $task_log = new CHDTaskLog();
         $task_log->task_log_help_desk_id = $this->_hditem->item_id;
         if ($this->_message != 'deleted') {
             $task_log->task_log_name = 'File ' . $this->file_name . ' uploaded';
         } else {
             $task_log->task_log_name = 'File ' . $this->file_name . ' deleted';
         }
         $task_log->task_log_description = $this->file_description;
         $task_log->task_log_creator = $AppUI->user_id;
         $date = new CDate();
         $task_log->task_log_date = $date->format(FMT_DATETIME_MYSQL);
         if ($msg = $task_log->store()) {
             $AppUI->setMsg($msg, UI_MSG_ERROR);
         }
     }
     return NULL;
 }
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:22,代码来源:files.class.php

示例5: CDate

}
require_once $AppUI->getSystemClass('CustomFields');
//一些转化
// convert dates to SQL format first
if ($obj->project_start_date) {
    $date = new CDate($obj->project_start_date);
    $obj->project_start_date = $date->format(FMT_DATETIME_MYSQL);
}
if ($obj->project_end_date) {
    $date = new CDate($obj->project_end_date);
    $date->setTime(23, 59, 59);
    $obj->project_end_date = $date->format(FMT_DATETIME_MYSQL);
}
if ($obj->project_actual_end_date) {
    $date = new CDate($obj->project_actual_end_date);
    $obj->project_actual_end_date = $date->format(FMT_DATETIME_MYSQL);
}
// let's check if there are some assigned departments to project
//部门分配
if (!dPgetParam($_POST, "project_departments", 0)) {
    //返回一个部门的id
    $obj->project_departments = implode(",", dPgetParam($_POST, "dept_ids", array()));
}
$del = dPgetParam($_POST, 'del', 0);
// prepare (and translate) the module name ready for the suffix
if ($del) {
    $project_id = dPgetParam($_POST, 'project_id', 0);
    $canDelete = $obj->canDelete($msg, $project_id);
    if (!$canDelete) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:do_project_aed.php

示例6: CDate

    $s .= $CR . '<td width="99%"><a href="?m=helpdesk&a=view&item_id=' . $row["item_id"] . '">' . $row["item_title"] . '</a></td>';
    $s .= $CR . "<td nowrap align=\"center\">";
    if ($row["assigned_email"]) {
        $s .= $CR . "<a href=\"mailto:" . $row["assigned_email"] . "\">" . $row['assigned_fullname'] . "</a>";
    } else {
        $s .= $CR . $row['assigned_fullname'];
    }
    $s .= $CR . "</td>";
    $s .= $CR . '<td align="center" nowrap>' . $AppUI->_($ist[@$row["item_status"]]) . '</td>';
    $s .= $CR . '<td align="center" nowrap>' . $AppUI->_($ipr[@$row["item_priority"]]) . '</td>';
    //Lets retrieve the updated date
    //	$sql = "SELECT MAX(status_date) status_date FROM helpdesk_item_status WHERE status_item_id =".$row['item_id'];
    //	$sdrow = db_loadList( $sql );
    //	$dateu = new CDate( $sdrow[0]['status_date'] );
    $dateu = new CDate($row['item_updated']);
    $s .= $CR . '<td align="center" nowrap>' . @$dateu->format($format) . '</td>';
    if ($row['project_id']) {
        $s .= $CR . '<td align="center" style="background-color: #' . $row['project_color_identifier'] . ';" nowrap><a href="./index.php?m=projects&a=view&project_id=' . $row['project_id'] . '" style="color: ' . bestColor(@$row["project_color_identifier"]) . ';">' . $row['project_name'] . '</a></td>';
    } else {
        $s .= $CR . '<td align="center">-</td>';
    }
    $s .= $CR . '</tr></form>';
}
print "{$s}\n";
// Pagination
$pages = 0;
if ($total_results > $items_per_page) {
    $pages_per_side = $HELPDESK_CONFIG['pages_per_side'];
    $pages = ceil($total_results / $items_per_page) - 1;
    if ($page < $pages_per_side) {
        $start = 0;
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:list.php

示例7: getTaskLinks

/**
* Sub-function to collect tasks within a period
*
* @param Date the starting date of the period
* @param Date the ending date of the period
* @param array by-ref an array of links to append new items to
* @param int the length to truncate entries by
* @param int the company id to filter by
* @author Andrew Eddie <eddieajau@users.sourceforge.net>
*/
function getTaskLinks($startPeriod, $endPeriod, &$links, $strMaxLen, $company_id = 0)
{
    global $a, $AppUI, $dPconfig;
    $tasks = CTask::getTasksForPeriod($startPeriod, $endPeriod, $company_id, $AppUI->user_id, true);
    $durnTypes = dPgetSysVal('TaskDurationType');
    $link = array();
    $sid = 3600 * 24;
    // assemble the links for the tasks
    foreach ($tasks as $row) {
        // the link
        $link['href'] = "?m=tasks&a=view&task_id=" . $row['task_id'];
        $link['alt'] = $row['project_name'] . ":\n" . $row['task_name'];
        // the link text
        if (strlen($row['task_name']) > $strMaxLen) {
            $row['task_name'] = substr($row['task_name'], 0, $strMaxLen) . '...';
        }
        $link['text'] = '<span style="color:' . bestColor($row['color']) . ';background-color:#' . $row['color'] . '">' . $row['task_name'] . '</span>';
        // determine which day(s) to display the task
        $start = new CDate($row['task_start_date']);
        $end = $row['task_end_date'] ? new CDate($row['task_end_date']) : null;
        $durn = $row['task_duration'];
        $durnType = $row['task_duration_type'];
        if (($start->after($startPeriod) || $start->equals($startPeriod)) && ($start->before($endPeriod) || $start->equals($endPeriod))) {
            $temp = $link;
            $temp['alt'] = "START [" . $row['task_duration'] . ' ' . $AppUI->_($durnTypes[$row['task_duration_type']]) . "]\n" . $link['alt'];
            if ($a != 'day_view') {
                $temp['text'] = dPshowImage(dPfindImage('block-start-16.png')) . $temp['text'];
            }
            $links[$start->format(FMT_TIMESTAMP_DATE)][] = $temp;
        }
        if ($end && $end->after($startPeriod) && $end->before($endPeriod) && $start->before($end)) {
            $temp = $link;
            $temp['alt'] = "FINISH\n" . $link['alt'];
            if ($a != 'day_view') {
                $temp['text'] .= dPshowImage(dPfindImage('block-end-16.png'));
            }
            $links[$end->format(FMT_TIMESTAMP_DATE)][] = $temp;
        }
        // convert duration to days
        if ($durnType < 24.0) {
            if ($durn > $dPconfig['daily_working_hours']) {
                $durn /= $dPconfig['daily_working_hours'];
            } else {
                $durn = 0.0;
            }
        } else {
            $durn *= $durnType / 24.0;
        }
        // fill in between start and finish based on duration
        // notes:
        // start date is not in a future month, must be this or past month
        // start date is counted as one days work
        // business days are not taken into account
        $target = $start;
        $target->addSeconds($durn * $sid);
        if (Date::compare($target, $startPeriod) < 0) {
            continue;
        }
        if (Date::compare($start, $startPeriod) > 0) {
            $temp = $start;
            $temp->addSeconds($sid);
        } else {
            $temp = $startPeriod;
        }
        // Optimised for speed, AJD.
        while (Date::compare($endPeriod, $temp) > 0 && Date::compare($target, $temp) > 0 && ($end == null || $temp->before($end))) {
            $links[$temp->format(FMT_TIMESTAMP_DATE)][] = $link;
            $temp->addSeconds($sid);
        }
    }
}
开发者ID:klr2003,项目名称:sourceread,代码行数:81,代码来源:links_tasks.php

示例8: db_dateTime2locale

/**
* Document::db_dateTime2locale()
*
* { Description }
*
*/
function db_dateTime2locale($dateTime, $format)
{
    if (intval($dateTime)) {
        $date = new CDate($dateTime);
        return $date->format($format);
    } else {
        return null;
    }
}
开发者ID:Esleelkartea,项目名称:gestion-de-primeras-muestras,代码行数:15,代码来源:db_connect.php

示例9: CDate

 /**
  * CMonthCalendar::_drawMain()
  *
  * { Description }
  *
  */
 function _drawMain()
 {
     global $AppUI;
     $today = new CDate();
     $today = $today->format('%Y%m%d%w');
     $date = $this->this_month;
     $this_day = intval($date->getDay());
     $this_month = intval($date->getMonth());
     $this_year = intval($date->getYear());
     setlocale(LC_TIME, 'en_AU');
     $cal = Date_Calc::getCalendarMonth($this_month, $this_year, '%Y%m%d%w', LOCALE_FIRST_DAY);
     setlocale(LC_ALL, $AppUI->user_lang);
     $df = $AppUI->getPref('SHDATEFORMAT');
     $html = '';
     foreach ($cal as $week) {
         $html .= "\n<tr>";
         if ($this->showWeek) {
             $html .= "\n\t" . '<td class="week">';
             $html .= $this->dayFunc ? '<a href="javascript:' . $this->weekFunc . "('" . $week[0] . "')" . '">' : '';
             $html .= dPshowImage(dPfindImage('view.week.gif'), 16, 15, $AppUI->_('Week View'));
             $html .= $this->dayFunc ? '</a>' : '';
             $html .= "</td>";
         }
         foreach ($week as $day) {
             $this_day = new CDate($day);
             $y = intval(substr($day, 0, 4));
             $m = intval(substr($day, 4, 2));
             $d = intval(substr($day, 6, 2));
             $dow = intval(substr($day, 8, 1));
             if ($m != $this_month) {
                 $class = 'empty';
             } else {
                 if ($day == $today) {
                     $class = 'today';
                 } else {
                     if ($dow == 0 || $dow == 6) {
                         $class = 'weekend';
                     } else {
                         $class = 'day';
                     }
                 }
             }
             $day = substr($day, 0, 8);
             $html .= "\n\t" . '<td class="' . $class . '"';
             if ($this->showHighlightedDays && isset($this->highlightedDays[$day])) {
                 $html .= ' style="border: 1px solid ' . $this->highlightedDays[$day] . '"';
             }
             $html .= ' onclick="' . $this->dayFunc . "('" . $day . "','" . $this_day->format($df) . "')" . '">';
             if ($m == $this_month) {
                 if ($this->dayFunc) {
                     $html .= '<a href="javascript:' . $this->dayFunc . "('" . $day . "','" . $this_day->format($df) . "')" . '" class="' . $class . '">';
                 }
                 $html .= $d . ($this->dayFunc ? '</a>' : '');
                 if ($this->showEvents) {
                     $html .= $this->_drawEvents(substr($day, 0, 8));
                 }
             }
             $html .= "</td>";
         }
         $html .= "\n</tr>";
     }
     return $html;
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:69,代码来源:calendar.class.php

示例10: remind

 /**
  * Called by the Event Queue processor to process a reminder
  * on a task.
  * @access		  public
  * @param		 string		   $module		  Module name (not used)
  * @param		 string		   $type Type of event (not used)
  * @param		 integer		$id ID of task being reminded
  * @param		 integer		$owner		  Originator of event
  * @param		 mixed		  $args event-specific arguments.
  * @return		  mixed		   true, dequeue event, false, event stays in queue.
  -1, event is destroyed.
 */
 function remind($module, $type, $id, $owner, &$args)
 {
     global $locale_char_set, $AppUI;
     $q = new DBQuery();
     $df = $AppUI->getPref('SHDATEFORMAT');
     $tf = $AppUI->getPref('TIMEFORMAT');
     // If we don't have preferences set for these, use ISO defaults.
     if (!$df) {
         $df = '%Y-%m-%d';
     }
     if (!$tf) {
         $tf = '%H:%m';
     }
     $df .= ' ' . $tf;
     // At this stage we won't have an object yet
     if (!$this->load($id)) {
         return -1;
         // No point it trying again later.
     }
     $this->htmlDecode();
     // Only remind on working days.
     $today = new CDate();
     if (!$today->isWorkingDay()) {
         return true;
     }
     // Check if the task is completed
     if ($this->task_percent_complete == 100) {
         return -1;
     }
     // Grab the assignee list
     $q->addTable('user_tasks', 'ut');
     $q->leftJoin('users', 'u', 'u.user_id = ut.user_id');
     $q->leftJoin('contacts', 'c', 'c.contact_id = u.user_contact');
     $q->addQuery('c.contact_id, contact_first_name, contact_last_name, contact_email');
     $q->addWhere('ut.task_id = ' . $id);
     $contacts = $q->loadHashList('contact_id');
     $q->clear();
     // Now we also check the owner of the task, as we will need
     // to notify them as well.
     $owner_is_not_assignee = false;
     $q->addTable('users', 'u');
     $q->leftJoin('contacts', 'c', 'c.contact_id = u.user_contact');
     $q->addQuery('c.contact_id, contact_first_name, contact_last_name, contact_email');
     $q->addWhere('u.user_id = ' . $this->task_owner);
     if ($q->exec(ADODB_FETCH_NUM)) {
         list($owner_contact, $owner_first_name, $owner_last_name, $owner_email) = $q->fetchRow();
         if (!isset($contacts[$owner_contact])) {
             $owner_is_not_assignee = true;
             $contacts[$owner_contact] = array('contact_id' => $owner_contact, 'contact_first_name' => $owner_first_name, 'contact_last_name' => $owner_last_name, 'contact_email' => $owner_email);
         }
     }
     $q->clear();
     // build the subject line, based on how soon the
     // task will be overdue.
     $starts = new CDate($this->task_start_date);
     $expires = new CDate($this->task_end_date);
     $now = new CDate();
     $diff = $expires->dateDiff($now);
     $prefix = $AppUI->_('Task Due', UI_OUTPUT_RAW);
     if ($diff == 0) {
         $msg = $AppUI->_('TODAY', UI_OUTPUT_RAW);
     } else {
         if ($diff == 1) {
             $msg = $AppUI->_('TOMORROW', UI_OUTPUT_RAW);
         } else {
             if ($diff < 0) {
                 $msg = $AppUI->_(array('OVERDUE', abs($diff), 'DAYS'));
                 $prefix = $AppUI->_('Task', UI_OUTPUT_RAW);
             } else {
                 $msg = $AppUI->_(array($diff, 'DAYS'));
             }
         }
     }
     $q->addTable('projects');
     $q->addQuery('project_name');
     $q->addWhere('project_id = ' . $this->task_project);
     $project_name = htmlspecialchars_decode($q->loadResult());
     $q->clear();
     $subject = $prefix . ' ' . $msg . ' ' . $this->task_name . '::' . $project_name;
     $body = $AppUI->_('Task Due', UI_OUTPUT_RAW) . ': ' . $msg . "\n" . $AppUI->_('Project', UI_OUTPUT_RAW) . ': ' . $project_name . "\n" . $AppUI->_('Task', UI_OUTPUT_RAW) . ': ' . $this->task_name . "\n" . $AppUI->_('Start Date', UI_OUTPUT_RAW) . ': ' . $starts->format($df) . "\n" . $AppUI->_('Finish Date', UI_OUTPUT_RAW) . ': ' . $expires->format($df) . "\n" . $AppUI->_('URL', UI_OUTPUT_RAW) . ': ' . DP_BASE_URL . '/index.php?m=tasks&a=view&task_id=' . $this->task_id . '&reminded=1' . "\n\n" . $AppUI->_('Resources', UI_OUTPUT_RAW) . ":\n";
     foreach ($contacts as $contact) {
         if ($owner_is_not_assignee || $contact['contact_id'] != $owner_contact) {
             $body .= $contact['contact_first_name'] . ' ' . $contact['contact_last_name'] . ' <' . $contact['contact_email'] . ">\n";
         }
     }
     $body .= "\n" . $AppUI->_('Description', UI_OUTPUT_RAW) . ":\n" . $this->task_description . "\n";
     $mail = new Mail();
     foreach ($contacts as $contact) {
//.........这里部分代码省略.........
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:101,代码来源:tasks.class.php

示例11: arraySelect

echo $AppUI->_('Internal Division');
?>
</td>
			<td width="100%" nowrap="nowrap" colspan="2">
<?php 
echo arraySelect($companies_internal, 'project_company_internal', 'class="text" size="1"', $row->project_company_internal);
?>
</td>
 		</tr>
		<tr>
			<td align="right" nowrap="nowrap"><?php 
echo $AppUI->_('Start Date');
?>
</td>
			<td nowrap="nowrap">	 <input type="hidden" name="project_start_date" value="<?php 
echo $start_date->format(FMT_TIMESTAMP_DATE);
?>
" />
				<input type="text" class="text" name="start_date" id="date1" value="<?php 
echo $start_date->format($df);
?>
" class="text" disabled="disabled" />

				<a href="#" onClick="popCalendar('start_date', 'start_date');">
					<img src="./images/calendar.gif" width="24" height="12" alt="<?php 
echo $AppUI->_('Calendar');
?>
" border="0" />
				</a>
			</td>
			<td rowspan="6" valign="top">
开发者ID:kilivan,项目名称:dotproject,代码行数:31,代码来源:addedit.php

示例12: CTask

     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->removeAssigned($bulk_task_unassign);
     }
 }
 //Action: Other Actions
 if (isset($_POST['bulk_task_other']) && $bulk_task_other != '') {
     if ($upd_task->task_id) {
         //Option 1 - Mark as finished
         if ($bulk_task_other == '1') {
             $upd_task->task_percent_complete = 100;
             if (!$upd_task->task_end_date || $upd_task->task_end_date == '0000-00-00 00:00:00') {
                 $end_date = null;
                 $end_date = new CDate();
                 $upd_task->task_end_date = $end_date->format(FMT_DATETIME_MYSQL);
             }
             $upd_task->store();
             //Option 2 - Mark as milestone
         } elseif ($bulk_task_other == '2') {
             $upd_task->task_milestone = 1;
             $upd_task->store();
             //Option 3 - Mark as non milestone
         } elseif ($bulk_task_other == '3') {
             $upd_task->task_milestone = 0;
             $upd_task->store();
             //Option 4 - Mark as dynamic
         } elseif ($bulk_task_other == '4') {
             $upd_task->task_dynamic = 1;
             $upd_task->store();
             //Option 5 - Mark as non dynamic
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:31,代码来源:do_task_bulk_aed.php

示例13: displayFiles


//.........这里部分代码省略.........
)
	  </a>
<?php 
        }
        ?>
		</td>
		<td width="10%" nowrap="nowrap" align="center">
		  <?php 
        echo $file_types[$row['file_category']];
        ?>
		</td>
		<td width="5%" align="center">
		  <a href="./index.php?m=tasks&a=view&task_id=<?php 
        echo $row['file_task'];
        ?>
">
		  <?php 
        echo $row['task_name'];
        ?>
		  </a>
		</td>
		<td width="15%" nowrap="nowrap">
		  <?php 
        echo $row["contact_first_name"] . ' ' . $row["contact_last_name"];
        ?>
		</td>
		<td width="5%" nowrap="nowrap" align="right">
		  <?php 
        echo file_size(intval($row['file_size']));
        ?>
		</td>
		<td width="15%" nowrap="nowrap" align="right">
		  <?php 
        echo $file_date->format($df . ' ' . $tf);
        ?>
		</td>
		<td width="10%"><?php 
        echo $row['file_co_reason'];
        ?>
</td>
		<td nowrap="nowrap" align="center">
		  
<?php 
        if ($canEdit && empty($row['file_checkout'])) {
            ?>
			  <a href="?m=files&a=co&file_id=<?php 
            echo $row['file_id'];
            ?>
">
			  <?php 
            echo dPshowImage(DP_BASE_URL . '/modules/files/images/up.png', '16', '16', 'checkout', 'checkout file');
            ?>
			  </a>
<?php 
        } else {
            if ($row['file_checkout'] == $AppUI->user_id) {
                ?>
			  <a href="?m=files&a=addedit&ci=1&file_id=<?php 
                echo $row['file_id'];
                ?>
">
			  <?php 
                echo dPshowImage(DP_BASE_URL . '/modules/files/images/down.png', '16', '16', 'checkin', 'checkin file');
                ?>
			  </a>
<?php 
开发者ID:slawekmikula,项目名称:dotproject,代码行数:67,代码来源:folders_table.php

示例14: CDate

 /**
  * CMonthCalendar::_drawMain()
  *
  * { Description }
  *
  */
 function _drawMain()
 {
     global $AppUI;
     $today = new CDate();
     $today = $today->format("%Y%m%d%w");
     $date = $this->this_month;
     $this_day = intval($date->getDay());
     $this_month = intval($date->getMonth());
     $this_year = intval($date->getYear());
     $cal = Date_Calc::getCalendarMonth($this_month, $this_year, "%Y%m%d%w", LOCALE_FIRST_DAY);
     $df = $AppUI->getPref('SHDATEFORMAT');
     $html = '';
     foreach ($cal as $week) {
         $html .= "\n<tr>";
         if ($this->showWeek) {
             $html .= "\n\t<td class=\"week\">";
             $html .= $this->dayFunc ? "<a href=\"javascript:{$this->weekFunc}('{$week['0']}')\">" : '';
             $html .= '<img src="./images/view.week.gif" width="16" height="15" border="0" alt="Week View" /></a>';
             $html .= $this->dayFunc ? "</a>" : '';
             $html .= "\n\t</td>";
         }
         foreach ($week as $day) {
             $this_day = new CDate($day);
             $y = intval(substr($day, 0, 4));
             $m = intval(substr($day, 4, 2));
             $d = intval(substr($day, 6, 2));
             $dow = intval(substr($day, 8, 1));
             if ($m != $this_month) {
                 $class = 'empty';
             } else {
                 if ($day == $today) {
                     $class = 'today';
                 } else {
                     if ($dow == 0 || $dow == 6) {
                         $class = 'weekend';
                     } else {
                         $class = 'day';
                     }
                 }
             }
             $day = substr($day, 0, 8);
             $html .= "\n\t<td class=\"{$class}\"";
             if ($this->showHighlightedDays && isset($this->highlightedDays[$day])) {
                 $html .= " style=\"border: 1px solid " . $this->highlightedDays[$day] . "\"";
             }
             $html .= ">";
             if ($m == $this_month) {
                 if ($this->dayFunc) {
                     $html .= "<a href=\"javascript:{$this->dayFunc}('{$day}','" . $this_day->format($df) . "')\" class=\"{$class}\">";
                     $html .= "{$d}";
                     $html .= "</a>";
                 } else {
                     $html .= "{$d}";
                 }
                 if ($this->showEvents) {
                     $html .= $this->_drawEvents(substr($day, 0, 8));
                 }
             }
             $html .= "\n\t</td>";
         }
         $html .= "\n</tr>";
     }
     return $html;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:70,代码来源:calendar.class.php

示例15: sprintf

<?php 
    $total_sum += $sum_project;
}
?>
    <tr>
        <td>&nbsp;</th>
        <td style="text-align:center; font-weight:bold;"><?php 
echo $AppUI->_('Total');
?>
:</td>
<?php 
$date = new CDate($start_report);
for ($i = 1; $i <= $start_report->getDaysInMonth(); $i++) {
    ?>
	<td style="text-align:center; font-weight:bold; "><?php 
    echo sprintf("%.1f", $user_by_day[$date->format('%Y-%m-%d')]);
    ?>
</td>
<?php 
    $date->addDays(1);
}
?>
    <td style="text-align:center;"><strong> <?php 
echo sprintf("%.1f", $total_sum);
?>
</strong></td>
    </tr>
</table>
	
	
开发者ID:slawekmikula,项目名称:dotproject,代码行数:28,代码来源:vw_monthly_by_user.php


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