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


PHP display_time函数代码示例

本文整理汇总了PHP中display_time函数的典型用法代码示例。如果您正苦于以下问题:PHP display_time函数的具体用法?PHP display_time怎么用?PHP display_time使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: list_regs

function list_regs($reg_array)
{
    $list = '';
    foreach ($reg_array as $reg) {
        $ticket = '';
        switch ($reg['ticket']) {
            case 'dag':
                $ticket = 'dag (€ 10)';
                break;
            case 'dag_overnacht':
                $ticket = 'dag met overnachting (€ 12,50)';
                break;
            case 'overnacht':
                $ticket = 'overnachting (€ 7,50)';
                break;
            default:
                $ticket = 'onbekend';
                break;
        }
        $extra = !empty($reg['sharing']) || !empty($reg['comments']) ? 'ja' : '-';
        $list .= '<tr>';
        $list .= '<td>' . $reg['fullname'] . '</td>';
        $list .= '<td>' . $ticket . '</td>';
        $list .= '<td>' . $extra . '</td>';
        $list .= '<td>' . display_time($reg['time']) . '</td>';
        $list .= '</tr>' . "\r\n";
    }
    return $list;
}
开发者ID:JongMenS,项目名称:JongMenS.github.io,代码行数:29,代码来源:registerlist-cmVnaXN0ZXJsaXN0.php

示例2: translate

        </td>
      </tr>';
}
if (Doc::commentsEnabled()) {
    echo '
      <tr>
        <td class="aligntop bold">' . translate('Comments') . ':</td>
        <td>';
    $comList = new CommentList($id);
    $num_comment = $comList->getSize();
    $comment_text = '';
    for ($i = 0; $i < $num_comment; $i++) {
        $cmt = $comList->getDoc($i);
        user_load_variables($cmt->getLogin(), 'cmt_');
        $comment_text .= '
          <strong>' . htmlspecialchars($cmt->getDescription()) . '</strong> - ' . $cmt_fullname . ' ' . translate('at') . ' ' . date_to_str($cmt->getModDate(), '', false, true) . ' ' . display_time($cmt->getModTime(), 2) . ($is_admin || $login == $cmt->getLogin() || user_is_assistant($login, $cmt->getLogin()) || $login == $create_by || user_is_assistant($login, $create_by) ? ' [<a href="docdel.php?blid=' . $cmt->getId() . '" onclick="return confirm( \'' . $areYouSureStr . '\' );">' . translate('Delete') . '</a>]' : '') . '<br />
          <blockquote id="eventcomment">' . nl2br(activate_urls(htmlspecialchars($cmt->getData()))) . '
        </blockquote><div style="clear:both"></div>';
    }
    if ($num_comment == 0) {
        echo translate('None') . '<br />';
    } else {
        echo '
          ' . $num_comment . ' ' . translate('comments') . '
          <input id="showbutton" type="button" value="' . translate('Show') . '" onclick="showComments();" />
          <input id="hidebutton" type="button" value="' . translate('Hide') . '" onclick="hideComments();" /><br />
          <div id="comtext">' . $comment_text . '</div>';
        // We could put the following JS in includes/js/view_entry.php,
        // but we won't need it in many cases and we don't know whether
        // we need it until after would need to include it.
        // So, we will include it here instead.
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:view_entry.php

示例3: list_unapproved

function list_unapproved($user)
{
    global $temp_fullname, $key, $login;
    //echo "Listing events for $user <BR>";
    echo "<UL>\n";
    $sql = "SELECT webcal_entry.cal_id, webcal_entry.cal_name, " . "webcal_entry.cal_description, " . "webcal_entry.cal_priority, webcal_entry.cal_date, " . "webcal_entry.cal_time, webcal_entry.cal_duration, " . "webcal_entry_user.cal_status " . "FROM webcal_entry, webcal_entry_user " . "WHERE webcal_entry.cal_id = webcal_entry_user.cal_id " . "AND ( webcal_entry.cal_ext_for_id IS NULL " . "OR webcal_entry.cal_ext_for_id = 0 ) AND " . "webcal_entry_user.cal_login = '{$user}' AND " . "webcal_entry_user.cal_status = 'W' " . "ORDER BY webcal_entry.cal_date";
    $res = dbi_query($sql);
    $count = 0;
    $eventinfo = "";
    if ($res) {
        while ($row = dbi_fetch_row($res)) {
            $key++;
            $id = $row[0];
            $name = $row[1];
            $description = $row[2];
            $pri = $row[3];
            $date = $row[4];
            $time = $row[5];
            $duration = $row[6];
            $status = $row[7];
            $divname = "eventinfo-{$id}-{$key}";
            echo "<LI><A CLASS=\"entry\" HREF=\"view_entry.php?id={$id}";
            echo "\" onMouseOver=\"window.status='" . translate("View this entry") . "'; show(event, '{$divname}'); return true;\" onMouseOut=\"hide('{$divname}'); return true;\">";
            $timestr = "";
            if ($time > 0) {
                $timestr = display_time($time);
                if ($duration > 0) {
                    // calc end time
                    $h = (int) ($time / 10000);
                    $m = $time / 100 % 100;
                    $m += $duration;
                    $d = $duration;
                    while ($m >= 60) {
                        $h++;
                        $m -= 60;
                    }
                    $end_time = sprintf("%02d%02d00", $h, $m);
                    $timestr .= " - " . display_time($end_time);
                }
            }
            echo htmlspecialchars($name);
            echo "</A>";
            echo " (" . date_to_str($date) . ")\n";
            echo ": <A HREF=\"approve_entry.php?id={$id}&ret=list";
            if ($user == "__public__") {
                echo "&public=1";
            }
            echo "\" CLASS=\"navlinks\" onClick=\"return confirm('" . translate("Approve this entry?") . "');\">" . translate("Approve/Confirm") . "</A>, ";
            echo "<A HREF=\"reject_entry.php?id={$id}&ret=list";
            if ($user == "__public__") {
                echo "&public=1";
            }
            echo "\" CLASS=\"navlinks\" onClick=\"return confirm('" . translate("Reject this entry?") . "');\">" . translate("Reject") . "</A>";
            $eventinfo .= build_event_popup($divname, $user, $description, $timestr, $time);
            $count++;
        }
        dbi_free_result($res);
    }
    echo "</UL><P>\n";
    if ($count == 0) {
        user_load_variables($user, "temp_");
        echo translate("No unapproved events for") . " " . $temp_fullname . ".";
    } else {
        echo $eventinfo;
    }
}
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:66,代码来源:list_unapproved.php

示例4: display_time

&nbsp;</label>
  <select name="admin_WORK_DAY_START_HOUR" id="workstart">
   <?php 
    for ($i = 0; $i < 24; $i++) {
        echo "<option value=\"{$i}\"" . ($i == $s["WORK_DAY_START_HOUR"] ? " selected=\"selected\"" : "") . ">" . display_time($i * 10000, 1) . "</option>\n";
    }
    ?>
  </select>&nbsp;
  <label for="workend"><?php 
    etranslate("to");
    ?>
&nbsp;</label>
  <select name="admin_WORK_DAY_END_HOUR" id="workend">
   <?php 
    for ($i = 0; $i < 24; $i++) {
        echo "<option value=\"{$i}\"" . ($i == $s["WORK_DAY_END_HOUR"] ? " selected=\"selected\"" : "") . ">" . display_time($i * 10000, 1) . "</option>\n";
    }
    ?>
  </select>
 </td></tr>
 <tr><td class="tooltip" title="<?php 
    etooltip("disable-priority-field-help");
    ?>
">
  <?php 
    etranslate("Disable Priority field");
    ?>
:</td><td>
  <label><input type="radio" name="admin_disable_priority_field" value="Y"<?php 
    if ($s["disable_priority_field"] != "N") {
        echo " checked=\"checked\"";
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:admin.php

示例5: display_time

</label>
 <select name="pref_WORK_DAY_START_HOUR" id="pref_starthr">
<?php 
for ($i = 0; $i < 24; $i++) {
    echo "<option value=\"{$i}\"" . ($i == $prefarray['WORK_DAY_START_HOUR'] ? $selected : '') . ">" . display_time($i * 10000, 1) . "</option>\n";
}
?>
 </select>
 <label for="pref_endhr"><?php 
etranslate('to');
?>
</label>
 <select name="pref_WORK_DAY_END_HOUR" id="pref_endhr">
<?php 
for ($i = 0; $i < 24; $i++) {
    echo "<option value=\"{$i}\"" . ($i == $prefarray['WORK_DAY_END_HOUR'] ? $selected : '') . ">" . display_time($i * 10000, 1) . "</option>\n";
}
?>
 </select>
</td></tr>

</table>
</fieldset>
<fieldset>
 <legend><?php 
etranslate('Appearance');
?>
</legend>
<table   cellspacing="1" cellpadding="2"  border="0">
<tr><td class="tooltip" title="<?php 
etooltip('preferred-view-help');
开发者ID:GetInTheGo,项目名称:JohnsonFinancialService,代码行数:31,代码来源:pref.php

示例6: weekday_name

$tmp = $prad ? $s['DATE_FORMAT_TASK'] : $prefarray['DATE_FORMAT_TASK'];
for ($i = 0, $cnt = count($datestyles_task); $i < $cnt; $i++) {
    $datestyle_tk .= $option . $datestyles_task[$i] . '"' . ($tmp == $datestyles_task[$i] ? $selected : '') . '>' . $datestyles_task[++$i] . '</option>';
}
$tmp_wk = $prad ? $s['WEEK_START'] : $prefarray['WEEK_START'];
$tmp_en = $prad ? $s['WEEKEND_START'] : $prefarray['WEEKEND_START'];
for ($i = 0; $i < 7; $i++) {
    $start_wk_on .= $option . "{$i}\"" . ($i == $tmp_wk ? $selected : '') . '>' . weekday_name($i) . '</option>';
    $j = $i == 0 ? 6 : $i - 1;
    // Make sure to start with Saturday.
    $start_wkend_on .= $option . "{$j}\"" . ($j == $tmp_en ? $selected : '') . '>' . weekday_name($j) . '</option>';
}
$tmp_st = $prad ? $s['WORK_DAY_START_HOUR'] : $prefarray['WORK_DAY_START_HOUR'];
$tmp_en = $prad ? $s['WORK_DAY_END_HOUR'] : $prefarray['WORK_DAY_END_HOUR'];
for ($i = 0; $i < 24; $i++) {
    $tmp = display_time($i * 10000, 1);
    $work_hr_start .= $option . "{$i}\"" . ($i == $tmp_st ? $selected : '') . '>' . $tmp . '</option>';
    $work_hr_end .= $option . "{$i}\"" . ($i == $tmp_en ? $selected : '') . '>' . $tmp . '</option>';
}
$tmp = $prad ? $s['STARTVIEW'] : $prefarray['STARTVIEW'];
for ($i = 0, $cnt = count($choices); $i < $cnt; $i++) {
    $prefer_vu .= $option . $choices[$i] . '"' . ($tmp == $choices[$i] ? $selected : '') . '>' . htmlspecialchars($choices_text[$i]) . '</option>';
}
// Allow user to select a view also.
$tmp = $prad ? $s['STARTVIEW'] : $prefarray['STARTVIEW'];
for ($i = 0, $cnt = count($views); $i < $cnt; $i++) {
    if ($views[$i]['cal_is_global'] != 'Y' && ($prad || $views[$i]['cal_owner'] != $user)) {
        continue;
    }
    $xurl = $views[$i]['url'];
    $xurl_strip = str_replace('&amp;', '&', $xurl);
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:common_admin_pref.php

示例7: dbi_query

$sql .= "ORDER BY webcal_entry_log.cal_log_id DESC";
$res = dbi_query($sql);
$nextpage = "";
if ($res) {
    $num = 0;
    while ($row = dbi_fetch_row($res)) {
        $num++;
        if ($num > $PAGE_SIZE) {
            $nextpage = $row[7];
            break;
        } else {
            echo "<tr";
            if ($num % 2) {
                echo " class=\"odd\"";
            }
            echo "><td>\n" . $row[0] . "</td><td>\n" . $row[1] . "</td><td>\n" . date_to_str($row[3]) . "&nbsp;" . display_time($row[4]) . "</td><td>\n" . "<a title=\"" . htmlspecialchars($row[6]) . "\" href=\"view_entry.php?id={$row['5']}\">" . htmlspecialchars($row[6]) . "</a></td><td>\n";
            if ($row[2] == $LOG_CREATE) {
                etranslate("Event created");
            } else {
                if ($row[2] == $LOG_APPROVE) {
                    etranslate("Event approved");
                } else {
                    if ($row[2] == $LOG_REJECT) {
                        etranslate("Event rejected");
                    } else {
                        if ($row[2] == $LOG_UPDATE) {
                            etranslate("Event updated");
                        } else {
                            if ($row[2] == $LOG_DELETE) {
                                etranslate("Event deleted");
                            } else {
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:activity_log.php

示例8: dbi_free_result

        dbi_free_result($res);
    }
    if ($time != '-1') {
        $hour = substr($time, 0, 2);
        $minute = substr($time, 2, 2);
    }
    for ($i = 0; $i < count($partlogin); $i++) {
        // does this user want email for this?
        $send_user_mail = get_pref_setting($partlogin[$i], "EMAIL_EVENT_REJECTED");
        user_load_variables($partlogin[$i], "temp");
        $user_language = get_pref_setting($partlogin[$i], "LANGUAGE");
        if ($send_user_mail == "Y" && strlen($tempemail) && $send_email != "N") {
            if ($GLOBALS['LANGUAGE'] != $user_language && !empty($user_language) && $user_language != 'none') {
                reset_language($user_language);
            }
            $msg = translate("Hello") . ", " . $tempfullname . ".\n\n" . translate("An appointment has been rejected by") . " " . $login_fullname . ". " . translate("The subject was") . " \"" . $name . " \"\n" . translate("The description is") . " \"" . $description . "\"\n" . translate("Date") . ": " . date_to_str($fmtdate) . "\n" . (empty($hour) && empty($minute) ? "" : translate("Time") . ": " . display_time($hour * 10000 + $minute * 100)) . "\n\n\n";
            if (!empty($server_url)) {
                $url = $server_url . "view_entry.php?id=" . $id;
                $msg .= "\n\n" . $url;
            }
            $from = $email_fallback_from;
            if (strlen($login_email)) {
                $from = $login_email;
            }
            $extra_hdrs = "From: {$from}\r\nX-Mailer: " . translate("Title");
            mail($tempemail, translate($application_name) . " " . translate("Notification") . ": " . $name, html_to_8bits($msg), $extra_hdrs);
            activity_log($id, $login, $partlogin[$i], $LOG_NOTIFICATION, "Event rejected by {$app_user}");
        }
    }
}
if (empty($error)) {
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:reject_entry.php

示例9: etranslate

    etranslate("Scheduling Conflict");
    ?>
</h2>

<?php 
    etranslate("Your suggested time of");
    ?>
 <span style="font-weight:bold;">
<?php 
    if (!empty($allday) && $allday == "Y") {
        etranslate("All day event");
    } else {
        $time = sprintf("%d%02d00", $hour, $minute);
        echo display_time($time);
        if ($duration > 0) {
            echo "-" . display_time(add_duration($time, $duration));
        }
    }
    ?>
</span> <?php 
    etranslate("conflicts with the following existing calendar entries");
    ?>
:
<ul>
<?php 
    echo $conflicts;
    ?>
</ul>

<?php 
    // user can confirm conflicts
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:edit_entry_handler.php

示例10: print_entry_timebar

function print_entry_timebar($id, $date, $time, $duration, $name, $description, $status, $pri, $access, $event_owner)
{
    global $eventinfo, $login, $user, $PHP_SELF, $prefarray;
    static $key = 0;
    global $layers;
    // compute time offsets in % of total table width
    $day_start = $prefarray["WORK_DAY_START_HOUR"] * 60;
    if ($day_start == 0) {
        $day_start = 9 * 60;
    }
    $day_end = $prefarray["WORK_DAY_END_HOUR"] * 60;
    if ($day_end == 0) {
        $day_end = 19 * 60;
    }
    if ($day_end <= $day_start) {
        $day_end = $day_start + 60;
    }
    //avoid exceptions
    if ($time >= 0) {
        $ev_start = $time / 10000 * 60 + $time / 100 % 100;
        $ev_start = round(100 * ($ev_start - $day_start) / ($day_end - $day_start));
    } else {
        $ev_start = 0;
    }
    if ($duration > 0) {
        $ev_duration = round(100 * $duration / ($day_end - $day_start));
        if ($ev_start + $ev_duration > 100) {
            $ev_duration = 100 - $ev_start;
        }
    } else {
        if ($time >= 0) {
            $ev_duration = 1;
        } else {
            $ev_duration = 100 - $ev_start;
        }
    }
    $ev_padding = 100 - $ev_start - $ev_duration;
    // choose where to position the text (pos=0->before,pos=1->on,pos=2->after)
    if ($ev_duration > 20) {
        $pos = 1;
    } elseif ($ev_padding > 20) {
        $pos = 2;
    } else {
        $pos = 0;
    }
    echo "\n<!-- ENTRY BAR -->\n<table class=\"entrycont\">\n";
    echo "<tr>\n";
    echo "<td style=\"text-align:right; width:{$ev_start}%;\">";
    if ($pos > 0) {
        echo "&nbsp;</td>\n";
        echo "<td style=\"width:{$ev_duration}%;\">\n<table class=\"entrybar\">\n<tr>\n<td class=\"entry\">";
        if ($pos > 1) {
            echo "&nbsp;</td>\n</tr>\n</table></td>\n";
            echo "<td style=\"text-align:left; width:{$ev_padding}%;\">";
        }
    }
    //TODO: The following section has several nested spans.
    if ($login != $event_owner && strlen($event_owner)) {
        $class = "layerentry";
    } else {
        $class = "entry";
        if ($status == "W") {
            $class = "unapprovedentry";
        }
    }
    // if we are looking at a view, then always use "entry"
    if (strstr($PHP_SELF, "view_m.php") || strstr($PHP_SELF, "view_w.php") || strstr($PHP_SELF, "view_v.php") || strstr($PHP_SELF, "view_t.php")) {
        $class = "entry";
    }
    if ($pri == 3) {
        echo "<span style=\"font-weight:bold;\">";
    }
    $popupid = "eventinfo-{$id}-{$key}";
    $key++;
    echo "<a class=\"{$class}\" href=\"view_entry.php?id={$id}&amp;date={$date}";
    if (strlen($user) > 0) {
        echo "&amp;user=" . $user;
    }
    echo "\" onmouseover=\"window.status='" . translate("View this entry") . "'; show(event, '{$popupid}'); return true;\" onmouseout=\"hide('{$popupid}'); return true;\">";
    if ($login != $event_owner && strlen($event_owner)) {
        if ($layers) {
            foreach ($layers as $layer) {
                if ($layer['cal_layeruser'] == $event_owner) {
                    echo "<span style=\"color:" . $layer['cal_color'] . ";\">";
                }
            }
        }
    }
    echo "[{$event_owner}]&nbsp;";
    $timestr = "";
    if ($duration == 24 * 60) {
        $timestr = translate("All day event");
    } else {
        if ($time >= 0) {
            $timestr = display_time($time);
            if ($duration > 0) {
                // calc end time
                $h = (int) ($time / 10000);
                $m = $time / 100 % 100;
                $m += $duration;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:101,代码来源:functions.php

示例11: sort_events_insensitive

function sort_events_insensitive($a, $b)
{
    $retval = strnatcmp(display_time('', 0, $a->getDateTimeTS(), 24), display_time('', 0, $b->getDateTimeTS(), 24));
    return $retval ? $retval : strnatcmp(strtolower($a->getName()), strtolower($b->getName()));
}
开发者ID:GetInTheGo,项目名称:JohnsonFinancialService,代码行数:5,代码来源:functions.php

示例12: dbi_query

$sql .= "ORDER BY webcal_entry_log.cal_log_id DESC";
$res = dbi_query($sql);
$nextpage = "";
if ($res) {
    $font = "<FONT SIZE=\"-1\">";
    $num = 0;
    while ($row = dbi_fetch_row($res)) {
        $num++;
        if ($num > $PAGE_SIZE) {
            $nextpage = $row[7];
            break;
        } else {
            echo "<TR>";
            echo "<TD VALIGN=\"top\" BGCOLOR=\"{$CELLBG}\">" . $font . $row[0] . "</FONT></TD>";
            echo "<TD VALIGN=\"top\" BGCOLOR=\"{$CELLBG}\">" . $font . $row[1] . "</FONT></TD>";
            echo "<TD VALIGN=\"top\" BGCOLOR=\"{$CELLBG}\">" . $font . date_to_str($row[3]) . " " . display_time($row[4]) . "</FONT></TD>";
            echo "<TD VALIGN=\"top\" BGCOLOR=\"{$CELLBG}\">" . $font . "<A HREF=\"view_entry.php?id={$row['5']}\" CLASS=\"navlinks\">" . htmlspecialchars($row[6]) . "</A></FONT></TD>";
            echo "<TD VALIGN=\"top\" BGCOLOR=\"{$CELLBG}\">" . $font;
            if ($row[2] == $LOG_CREATE) {
                etranslate("Event created");
            } else {
                if ($row[2] == $LOG_APPROVE) {
                    etranslate("Event approved");
                } else {
                    if ($row[2] == $LOG_REJECT) {
                        etranslate("Event rejected");
                    } else {
                        if ($row[2] == $LOG_UPDATE) {
                            etranslate("Event updated");
                        } else {
                            if ($row[2] == $LOG_DELETE) {
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:31,代码来源:activity_log.php

示例13: print_header

}
if (!empty($conflicts)) {
    print_header();
    ob_start();
    echo '
    <h2>' . translate('Scheduling Conflict') . '</h2>
    ' . translate('Your suggested time of') . '
    <span class="bold">';
    if ($timetype == 'A') {
        etranslate('All day event');
    } else {
        $time = sprintf("%d%02d00", $entry_hour, $entry_minute);
        // Pass the adjusted timestamp in case the date changed due to GMT offset.
        echo display_time('', 0, $eventstart);
        if ($duration > 0) {
            echo '-' . display_time('', 0, $eventstart + $duration * 60);
        }
    }
    echo '</span>
    ' . translate('conflicts with the following existing calendar entries') . ':
    <ul>' . $conflicts . '
    </ul>
    ' . '<form name="confirm" method="post">';
    foreach ($_POST as $xkey => $xval) {
        if (is_array($xval)) {
            $xkey .= "[]";
            foreach ($xval as $ykey => $yval) {
                if (get_magic_quotes_gpc()) {
                    $yval = stripslashes($yval);
                }
                // $yval = htmlentities ( $yval );
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:edit_entry_handler.php

示例14: strlen

              <td' . (!empty($untimed[$i]) && strlen($untimed[$i]) ? ' class="hasevents"' : $class) . '>' . (!empty($untimed[$i]) && strlen($untimed[$i]) ? $untimed[$i] : '&nbsp;') . '</td>';
    $save_hour_arr[$i] = $hour_arr;
    $save_rowspan_arr[$i] = $rowspan_arr;
    $rowspan_day[$i] = 0;
}
$untimedStr = $untimed_found ? '
            <tr>
              <th class="empty">&nbsp;</th>' . $untimedStr . '
            </tr>' : '';
for ($i = $first_slot; $i <= $last_slot; $i++) {
    $time_h = intval($i * $interval / 60);
    $time_m = $i * $interval % 60;
    // Do not apply TZ offset.
    $eventsStr .= '
            <tr>
              <th class="row">' . display_time(($time_h * 100 + $time_m) * 100, 1) . '</th>';
    for ($d = $start_ind; $d <= $end_ind; $d++) {
        $dateYmd = date('Ymd', $days[$d]);
        // Class "hasevents" overrides both "today" and "weekend".
        // And class "today" overrides "weekend".
        // So, no need to list them all.
        $class = !empty($save_hour_arr[$d][$i]) && strlen($save_hour_arr[$d][$i]) ? ' class="hasevents"' : ($dateYmd == date('Ymd', $today) ? ' class="today"' : (is_weekend($days[$d]) ? ' class="weekend"' : ''));
        if ($rowspan_day[$d] > 1) {
            // This might mean there's an overlap,
            // or it could mean one event ends at 11:15 and another starts at 11:30.
            if (!empty($save_hour_arr[$d][$i])) {
                $eventsStr .= '
              <td' . $class . '>' . $save_hour_arr[$d][$i] . '</td>';
            }
            $rowspan_day[$d]--;
        } else {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:week.php

示例15: print_upcoming_event

function print_upcoming_event($e)
{
    global $display_link, $link_target, $server_url, $charset;
    if ($e['cal_access'] == 'P') {
        if ($display_link && !empty($server_url)) {
            print "<a title=\"" . $e['cal_name'] . "\" href=\"" . $server_url . "view_entry.php?id=" . $e['cal_id'] . "&amp;date=" . $e['cal_date'] . "\"";
            if (!empty($link_target)) {
                print " target=\"{$link_target}\"";
            }
            print ">";
        }
        print $e['cal_name'];
    } else {
        print "[" . translate("Confidential") . "]";
    }
    if ($display_link && !empty($server_url)) {
        print "</a>";
    }
    if ($e['cal_duration'] == 24 * 60) {
        print " (" . translate("All day event") . ")\n";
    } else {
        if ($e['cal_time'] != -1) {
            print " (" . display_time($e['cal_time']) . ")\n";
        }
    }
    print "<br />\n";
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:27,代码来源:upcoming.php


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