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


PHP CUtils::getCurrentYearPart方法代码示例

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


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

示例1: getSchedule

 /**
  * Расписание
  * 
  * @return CArrayList
  */
 public function getSchedule()
 {
     if (is_null($this->_schedules)) {
         $this->_schedules = new CArrayList();
         $query = new CQuery();
         $query->select("schedule.*")->from(TABLE_SCHEDULE . " as schedule")->condition("schedule.id=" . $this->getId() . " and schedule.year=" . CUtils::getCurrentYear()->getId() . " and schedule.month=" . CUtils::getCurrentYearPart()->getId());
         foreach ($query->execute()->getItems() as $item) {
             $schedule = new CSchedule(new CActiveRecord($item));
             $this->_schedules->add($schedule->getId(), $schedule);
         }
     }
     return $this->_schedules;
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:18,代码来源:CLecturerOuter.class.php

示例2: mysql_fetch_array

    $a = mysql_fetch_array($res_all);
    $def_settings['year_name'] = $a['name'];
    $query_all = 'select id,name from  time_parts where id="' . $def_settings['part_id'] . '"';
    $res_all = mysql_query($query_all);
    $a = mysql_fetch_array($res_all);
    $def_settings['part_name'] = $a['name'];
} else {
    /**
     * Переписано для использования новой системы глобальных настроек
     */
    $def_settings["year_name"] = CUtils::getCurrentYear()->name;
    $def_settings["date_start"] = CUtils::getCurrentYear()->date_start;
    $def_settings["date_end"] = CUtils::getCurrentYear()->date_end;
    $def_settings["year_id"] = CUtils::getCurrentYear()->getId();
    $def_settings["part_id"] = CUtils::getCurrentYearPart()->getId();
    $def_settings["part_name"] = CUtils::getCurrentYearPart()->name;
}
if ($_SESSION['auth'] == 1) {
    if (!$view_all_mode || !$write_mode) {
        $_SESSION['lect_id'] = $_SESSION['id'];
        $_SESSION['lect_fio'] = $_SESSION['FIO'];
    } else {
        if (isset($_GET['user_id']) && $_GET['user_id'] != 0) {
            $_SESSION['lect_id'] = $_GET['user_id'];
            $res = mysql_query('select fio from users where id="' . $_SESSION['lect_id'] . '" limit 0,1');
            if (mysql_num_rows($res) > 0) {
                $a = mysql_fetch_array($res);
                $_SESSION['lect_fio'] = $a['fio'];
            }
        }
    }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:31,代码来源:lect_time_table_all.php


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