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


PHP calendar_get_popup函数代码示例

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


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

示例1: calendar_get_mini


//.........这里部分代码省略.........
                $event = $events[$eventid];
                if (!empty($event->modulename)) {
                    $popupicon = $CFG->modpixpath . '/' . $event->modulename . '/icon.gif';
                    $popupalt = $event->modulename;
                } else {
                    if ($event->courseid == SITEID) {
                        // Site event
                        $popupicon = $CFG->pixpath . '/c/site.gif';
                        $popupalt = '';
                    } else {
                        if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {
                            // Course event
                            $popupicon = $CFG->pixpath . '/c/course.gif';
                            $popupalt = '';
                        } else {
                            if ($event->groupid) {
                                // Group event
                                $popupicon = $CFG->pixpath . '/c/group.gif';
                                $popupalt = '';
                            } else {
                                if ($event->userid) {
                                    // User event
                                    $popupicon = $CFG->pixpath . '/c/user.gif';
                                    $popupalt = '';
                                }
                            }
                        }
                    }
                }
                $popupcontent .= '<div><img class="icon" src="' . $popupicon . '" alt="' . $popupalt . '" /><a href="' . $dayhref . '#event_' . $event->id . '">' . format_string($event->name, true) . '</a></div>';
            }
            //Accessibility: functionality moved to calendar_get_popup.
            if ($display->thismonth && $day == $d) {
                $popup = calendar_get_popup(true, $events[$eventid]->timestart, $popupcontent);
            } else {
                $popup = calendar_get_popup(false, $events[$eventid]->timestart, $popupcontent);
            }
            // Class and cell content
            if (isset($typesbyday[$day]['startglobal'])) {
                $class .= ' event_global';
            } else {
                if (isset($typesbyday[$day]['startcourse'])) {
                    $class .= ' event_course';
                } else {
                    if (isset($typesbyday[$day]['startgroup'])) {
                        $class .= ' event_group';
                    } else {
                        if (isset($typesbyday[$day]['startuser'])) {
                            $class .= ' event_user';
                        }
                    }
                }
            }
            $cell = '<a href="' . $dayhref . '" ' . $popup . '>' . $day . '</a>';
        } else {
            $cell = $day;
        }
        if (isset($typesbyday[$day]['durationglobal'])) {
            $class .= ' duration_global';
        } else {
            if (isset($typesbyday[$day]['durationcourse'])) {
                $class .= ' duration_course';
            } else {
                if (isset($typesbyday[$day]['durationgroup'])) {
                    $class .= ' duration_group';
                } else {
开发者ID:kai707,项目名称:ITSA-backup,代码行数:67,代码来源:lib.php

示例2: calendar_get_mini


//.........这里部分代码省略.........
                        // Site event.
                        $popupicon = 'i/siteevent';
                    } else {
                        if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {
                            // Course event.
                            $popupicon = 'i/courseevent';
                        } else {
                            if ($event->groupid) {
                                // Group event.
                                $popupicon = 'i/groupevent';
                            } else {
                                // Must be a user event.
                                $popupicon = 'i/userevent';
                            }
                        }
                    }
                }
                $dayhref->set_anchor('event_' . $event->id);
                $popupcontent .= html_writer::start_tag('div');
                $popupcontent .= $OUTPUT->pix_icon($popupicon, $popupalt, $component);
                $name = format_string($event->name, true);
                // Show ical source if needed.
                if (!empty($event->subscription) && $CFG->calendar_showicalsource) {
                    $a = new stdClass();
                    $a->name = $name;
                    $a->source = $event->subscription->name;
                    $name = get_string('namewithsource', 'calendar', $a);
                }
                $popupcontent .= html_writer::link($dayhref, $name);
                $popupcontent .= html_writer::end_tag('div');
            }
            //Accessibility: functionality moved to calendar_get_popup.
            if ($display->thismonth && $day == $d) {
                $popupid = calendar_get_popup(true, $events[$eventid]->timestart, $popupcontent);
            } else {
                $popupid = calendar_get_popup(false, $events[$eventid]->timestart, $popupcontent);
            }
            // Class and cell content
            if (isset($typesbyday[$day]['startglobal'])) {
                $class .= ' calendar_event_global';
            } else {
                if (isset($typesbyday[$day]['startcourse'])) {
                    $class .= ' calendar_event_course';
                } else {
                    if (isset($typesbyday[$day]['startgroup'])) {
                        $class .= ' calendar_event_group';
                    } else {
                        if (isset($typesbyday[$day]['startuser'])) {
                            $class .= ' calendar_event_user';
                        }
                    }
                }
            }
            $cell = html_writer::link($dayhref, $day, array('id' => $popupid));
        } else {
            $cell = $day;
        }
        $durationclass = false;
        if (isset($typesbyday[$day]['durationglobal'])) {
            $durationclass = ' duration_global';
        } else {
            if (isset($typesbyday[$day]['durationcourse'])) {
                $durationclass = ' duration_course';
            } else {
                if (isset($typesbyday[$day]['durationgroup'])) {
                    $durationclass = ' duration_group';
开发者ID:miguelangelUvirtual,项目名称:uEducon,代码行数:67,代码来源:lib.php


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