本文整理汇总了PHP中calendar类的典型用法代码示例。如果您正苦于以下问题:PHP calendar类的具体用法?PHP calendar怎么用?PHP calendar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了calendar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: show_task_calendar_recursive
function show_task_calendar_recursive()
{
$calendar = new calendar(2, 20);
$calendar->set_cal_person($_GET["personID"]);
$calendar->set_return_mode("calendar");
$calendar->draw();
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:7,代码来源:calendar.php
示例2: show_task_calendar_recursive
function show_task_calendar_recursive()
{
$current_user =& singleton("current_user");
$tasksGraphPlotHomeStart = $current_user->prefs["tasksGraphPlotHomeStart"];
$tasksGraphPlotHome = $current_user->prefs["tasksGraphPlotHome"];
$calendar = new calendar($tasksGraphPlotHomeStart, $tasksGraphPlotHome);
$calendar->set_cal_person($current_user->get_id());
$calendar->set_return_mode("home");
$calendar->draw($template);
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:10,代码来源:task_calendar_home_item.inc.php
示例3: calendarEdit
/**
* CALENDAR
* getting default list
*
* @param string $httpData->PRO_UID (opional)
*/
public function calendarEdit($httpData)
{
global $RBAC;
//$RBAC->requirePermissions('PM_SETUP_ADVANCE');
G::LoadClass('configuration');
G::LoadClass('calendar');
$CalendarUid = str_replace('"', '', isset($_GET['id']) ? $_GET['id'] : G::GenerateUniqueID());
$calendarObj = new calendar();
if (isset($_GET['id']) && $_GET['id'] != "") {
$fields = $calendarObj->getCalendarInfoE($CalendarUid);
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
// For a new Calendar
if (!isset($fields['CALENDAR_UID'])) {
$fields['CALENDAR_UID'] = $CalendarUid;
$fields['OLD_NAME'] = '';
//Default Business Hour
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_DAY'] = 7;
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
}
// Copy Calendar
if (isset($_GET['cp']) && $_GET['cp'] == 1) {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['CALENDAR_NAME'] = G::LoadTranslation("ID_COPY_OF") . " " . $fields['CALENDAR_NAME'];
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
}
$c = new Configurations();
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$this->includeExtJS('admin/calendarEdit');
$this->setView('admin/calendarEdit');
$businessDayArray = array();
for ($i = 0; $i < sizeof($fields['BUSINESS_DAY']); $i++) {
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i + 1];
}
$fields['BUSINESS_DAY'] = $businessDayArray;
//validating if the calendar is new, it means that we don't have the $_GET array
$fields['HOLIDAY'] = isset($_GET['id']) && $_GET['id'] != '' ? $fields['HOLIDAY'] : array();
$holidayArray = array();
for ($i = 0; $i < sizeof($fields['HOLIDAY']); $i++) {
$holidayArray[$i] = $fields['HOLIDAY'][$i + 1];
}
$_GET['id'] = isset($_GET['id']) && $_GET['id'] != '' ? $_GET['id'] : '';
$fields['HOLIDAY'] = $holidayArray;
$fields['NEWCALENDAR'] = 'NO';
if (isset($_GET['id']) && $_GET['id'] == '') {
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['NEWCALENDAR'] = 'YES';
}
$this->setJSVar('CALENDAR_UID', $fields['CALENDAR_UID']);
$this->setJSVar('fields', $fields);
G::RenderPage('publish', 'extJs');
}
开发者ID:emildev35,项目名称:processmaker,代码行数:60,代码来源:admin.php
示例4: data
function data($msg, $params)
{
$arg = funcs::utfToAscii($msg->args);
if (empty($arg)) {
$data = time();
} else {
$data = calendar::parse_date($arg);
if (!$data) {
return new BotMsg('Podana data nie została rozpoznana<br />' . "\n" . '<br />' . "\n" . '<u>Przykłady:</u><br />' . "\n" . 'data<br />' . "\n" . 'data pojutrze<br />' . "\n" . 'data 1.01.2009');
}
}
if (date('d.m.Y') == date('d.m.Y', $data)) {
$txt = 'Dziś jest ';
} else {
$txt = 'Wybrany dzień to ';
}
include './data/data/data.php';
$txt .= self::$dni[date('w', $data)] . ', ' . date('j', $data) . ' ' . self::$miesiace[date('n', $data)] . ' ' . date('Y', $data) . ' r., ' . (date('z', $data) + 1) . ' dzień roku.<br />' . "\n" . '<br />' . "\n";
$msg->session->setClass('pogoda');
if (!isset($msg->session->geo)) {
$geo = array('lon' => '52.25', 'lat' => '21.0');
} else {
$geo = $msg->session->geo;
}
$txt .= 'Imieniny: ' . $imieniny[date('n', $data)][date('j', $data)] . '<br />' . "\n" . 'Wschód Słońca: ' . date_sunrise($data, SUNFUNCS_RET_STRING, $geo['lat'], $geo['lon'], 90.58, 1 + date('I')) . '<br />' . "\n" . 'Zachód Słońca: ' . date_sunset($data, SUNFUNCS_RET_STRING, $geo['lat'], $geo['lon'], 90.58, 1 + date('I'));
return new BotMsg($txt);
}
开发者ID:Alambos,项目名称:bot,代码行数:27,代码来源:handler.php
示例5: launch
public function launch(Request $request, Response $response)
{
$response->addVar('NomPeriode', calendar::getPeriodName(time()));
$response->addVar('TypeSemaineCourante', calendar::getTypeCurrentWeek());
$response->addVar('SemaineCourante', calendar::getCurrentWeek());
$this->render("./lib/template/indexSuccess.php");
$this->printOut();
}
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:index.php
示例6: calendarAction
/**
* @Route("/calendar/{year}/{weekNumber}",name="calendar")
*
*/
public function calendarAction($year = null, $month = null)
{
$c = new calendar();
//utlisisateurs sur le site et le mois
$data = array();
//$data['absences'] = array();
$data[] = array('fullName' => 'Math Patrick DOHOU 2', 'bookings' => array(array('dateStart' => '2015-04-01', 'dateEnd' => '2015-04-31', 'startTime' => '06:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb')));
$data[] = array('fullName' => 'Jean Patrick DOHOU', 'bookings' => array(array('dateStart' => '2015-04-01', 'dateEnd' => '2015-04-03', 'startTime' => '06:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb'), array('dateStart' => '2015-04-05', 'dateEnd' => '2015-04-06', 'startTime' => '15:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb')));
$data[] = array('fullName' => 'Ame Patrick DOHOU', 'bookings' => array(array('dateStart' => '2015-04-01', 'dateEnd' => '2015-04-03', 'startTime' => '06:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb'), array('dateStart' => '2015-04-05', 'dateEnd' => '2015-04-06', 'startTime' => '15:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb')));
$data[] = array('fullName' => 'Hervé Patrick DOHOU', 'bookings' => array(array('dateStart' => '2015-04-01', 'dateEnd' => '2015-04-03', 'startTime' => '06:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb'), array('dateStart' => '2015-04-05', 'dateEnd' => '2015-04-06', 'startTime' => '15:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb')));
$data[] = array('fullName' => 'Balle Patrick DOHOU', 'bookings' => array(array('dateStart' => '2015-04-01', 'dateEnd' => '2015-04-03', 'startTime' => '06:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb'), array('dateStart' => '2015-04-05', 'dateEnd' => '2015-04-06', 'startTime' => '15:00', 'endTime' => '22:00', 'commentaire' => 'bbbbbbbbbb')));
// var_dump($data);
$params = array('calendars' => $c->getDaysOfYearAndMonth(2015, 4), 'users' => $data);
// hervé à travaillé : date01/04/2015
// var_dump( $c->getDaysOfYearAndMonth());
return $this->render('MyPrivSecuCalendarBundle:Calendar:calendar.html.twig', $params);
}
开发者ID:hpdev225,项目名称:myguard,代码行数:21,代码来源:CalendarController.php
示例7: calender
function calender()
{
$cal = new calendar();
$sx = '<h1>' . msg("calender") . '</h1>';
$sx .= '<table width="100%" class="lt1" border=0>';
$data1 = date("Ym");
if (date("m") == 12) {
$data2 = date("Y") + 1 . '01';
} else {
$data2 = date("Ym") + 1;
}
/* Actual Month */
$act1 = $cal->actions($data1);
$sx .= '<TR valign="top">';
$sx .= '<TD width="10%">';
$sx .= '<center><font class="lt1"><B>' . msg('month_' . substr($data1, 4, 2)) . '/' . substr($data1, 0, 4) . '</B></font>';
$sx .= $cal->calendar($data1, $act1, '#1C4161');
$sx .= '<TD width="90%">';
$sx .= $cal->actions_list($act1);
/* Space */
$sx .= '<TR valign="top">';
$sx .= '<TD width="10%"> ';
/* Next Month */
$act2 = $cal->actions($data2);
$sx .= '<TR valign="top">';
$sx .= '<TD width="10%">';
$sx .= '<center><font class="lt1"><B>' . msg('month_' . substr($data2, 4, 2)) . '/' . substr($data2, 0, 4) . '</B></font>';
$sx .= $cal->calendar($data2, $act2, '#1C4161');
$sx .= '<TD width="90%">';
$sx .= $cal->actions_list($act2);
$sx .= '</table>';
return $sx;
}
开发者ID:bireme,项目名称:proethos,代码行数:33,代码来源:_class_resume.php
示例8: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $focus_time = null)
{
parent::__construct($room, $focus_time);
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:19,代码来源:calendar_month.php
示例9: init
/**
* initialization of some parameters
*/
public function init($request)
{
parent::init($request);
if ($this->url == '') {
$this->url = 'primary';
}
if ($this->count == 0) {
$this->count = 10;
}
$this->calendar_ids = explode(',', $this->url);
}
开发者ID:aschwith,项目名称:smartvisu,代码行数:14,代码来源:googleV3.php
示例10: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $course, $start_time = 8, $end_time = 5, $focus_time = null)
{
parent::__construct($room, $focus_time);
$this->course = $course;
if ($start_time > $end_time) {
$this->start_time = $end_time;
$this->end_time = $start_time;
} else {
$this->start_time = $start_time;
$this->end_time = $end_time;
}
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:27,代码来源:calendar_week.php
示例11: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $day - UNIX time stamp representing the day wanted
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $day, $course, $start_time = 8, $end_time = 5, $show_toolbar = true, $focus_time = null)
{
parent::__construct($room, $focus_time);
$this->course = $course;
$this->day = $day;
$this->miniCal = $day;
if ($start_time > $end_time) {
$this->start_time = $end_time;
$this->end_time = $start_time;
} else {
$this->start_time = $start_time;
$this->end_time = $end_time;
}
$this->show_toolbar = $show_toolbar;
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:31,代码来源:calendar_day.php
示例12: validatePassword
public function validatePassword($sPassword, $sLastUpdate, $iChangePasswordNextTime)
{
if (!defined('PPP_MINIMUM_LENGTH')) {
define('PPP_MINIMUM_LENGTH', 5);
}
if (!defined('PPP_MAXIMUM_LENGTH')) {
define('PPP_MAXIMUM_LENGTH', 20);
}
if (!defined('PPP_NUMERICAL_CHARACTER_REQUIRED')) {
define('PPP_NUMERICAL_CHARACTER_REQUIRED', 0);
}
if (!defined('PPP_UPPERCASE_CHARACTER_REQUIRED')) {
define('PPP_UPPERCASE_CHARACTER_REQUIRED', 0);
}
if (!defined('PPP_SPECIAL_CHARACTER_REQUIRED')) {
define('PPP_SPECIAL_CHARACTER_REQUIRED', 0);
}
if (!defined('PPP_EXPIRATION_IN')) {
define('PPP_EXPIRATION_IN', 0);
}
if (!defined('PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN')) {
define('PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN', 0);
}
if (function_exists('mb_strlen')) {
$iLength = mb_strlen($sPassword);
} else {
$iLength = strlen($sPassword);
}
$aErrors = array();
if ($iLength < PPP_MINIMUM_LENGTH) {
$aErrors[] = 'ID_PPP_MINIMUM_LENGTH';
}
if ($iLength > PPP_MAXIMUM_LENGTH) {
$aErrors[] = 'ID_PPP_MAXIMUM_LENGTH';
}
if (PPP_NUMERICAL_CHARACTER_REQUIRED == 1) {
if (preg_match_all('/[0-9]/', $sPassword, $aMatch, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) == 0) {
$aErrors[] = 'ID_PPP_NUMERICAL_CHARACTER_REQUIRED';
}
}
if (PPP_UPPERCASE_CHARACTER_REQUIRED == 1) {
if (preg_match_all('/[A-Z]/', $sPassword, $aMatch, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) == 0) {
$aErrors[] = 'ID_PPP_UPPERCASE_CHARACTER_REQUIRED';
}
}
if (PPP_SPECIAL_CHARACTER_REQUIRED == 1) {
if (preg_match_all('/[��\\!|"@�#$~%�&�\\/()=\'?��*+\\-_.:,;]/', $sPassword, $aMatch, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE) == 0) {
$aErrors[] = 'ID_PPP_SPECIAL_CHARACTER_REQUIRED';
}
}
if (PPP_EXPIRATION_IN > 0) {
G::LoadClass('calendar');
$oCalendar = new calendar();
if ($oCalendar->pmCalendarUid == '') {
$oCalendar->pmCalendarUid = '00000000000000000000000000000001';
$oCalendar->getCalendarData();
}
$fDays = $oCalendar->calculateDuration(date('Y-m-d H:i:s'), $sLastUpdate);
if ($fDays > PPP_EXPIRATION_IN * 24) {
$aErrors[] = 'ID_PPP_EXPIRATION_IN';
}
}
if (PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN == 1) {
if ($iChangePasswordNextTime == 1) {
$aErrors[] = 'ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN';
}
}
return $aErrors;
}
开发者ID:bqevin,项目名称:processmaker,代码行数:69,代码来源:UsersProperties.php
示例13: or
/*
Copyright Intermesh 2003
Author: Merijn Schering <[email protected]>
Version: 1.0 Release date: 08 July 2003
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
*/
//date('Ymd', time())
require "../../Group-Office.php";
if ($calendar_module = $GO_MODULES->get_module('calendar')) {
require $calendar_module['path'] . "classes/calendar.class.inc";
}
$cal = new calendar();
require $GO_LANGUAGE->get_language_file('calendar');
//echo '1=='.$_REQUEST['event_id'];
$getevent = $cal->get_event($_REQUEST['event_id']);
//echo '2=='.$getevent['end_time'].'-->'.time();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (isset($_POST['calendars'])) {
$cal->set_event_status($_REQUEST['event_id'], '1', $_POST['email']);
while ($calendar_id = array_shift($_POST['calendars'])) {
if (!$cal->event_is_subscribed($_POST['event_id'], $calendar_id)) {
if ($cal->subscribe_event($_POST['event_id'], $calendar_id)) {
if (!$cal->set_event_status($_POST['event_id'], '1', $_POST['email'])) {
$error = true;
}
} else {
$error = true;
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:accept.php
示例14: delete
/**
* Delete user
*
* This function is used to delete a user from the system.
* The user cannot be deleted if he is the last system administrator.
* <br/>Example:
* <code>
* $user = EfrontUserFactory :: factory('jdoe');
* $user -> delete();
* </code>
*
* @return boolean True if the user was deleted successfully
* @since 3.5.0
* @access public
*/
public function delete()
{
// Added by Masoud Sadjadi on July 6, 2014 to support vLab in eFront
$vLab_username = $this->user['login'];
$this->logout();
///MODULES2 - Module user delete events - Before anything else
// Get all modules (NOT only the ones that have to do with the user type)
$modules = eF_loadAllModules();
// Trigger all necessary events. If the function has not been re-defined in the derived module class, nothing will happen
foreach ($modules as $module) {
$module->onDeleteUser($this->user['login']);
}
try {
$directory = new EfrontDirectory($this->user['directory']);
$directory->delete();
} catch (EfrontFileException $e) {
$message = _USERDIRECTORYCOULDNOTBEDELETED . ': ' . $e->getMessage() . ' (' . $e->getCode() . ')';
//This does nothing at the moment
}
foreach ($this->aspects as $aspect) {
$aspect->delete();
}
calendar::deleteUserCalendarEvents($this->user['login']);
eF_updateTableData("f_forums", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_updateTableData("f_messages", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_updateTableData("f_topics", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_updateTableData("f_poll", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_updateTableData("news", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_updateTableData("files", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("f_folders", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("f_personal_messages", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("bookmarks", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("comments", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("f_users_to_polls", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("logs", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("rules", "users_LOGIN='" . $this->user['login'] . "'");
//eF_deleteTableData("users_online", "users_LOGIN='".$this -> user['login']."'");
eF_deleteTableData("user_times", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_surveys", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_done_surveys", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("survey_questions_done", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("lessons_timeline_topics_data", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("events", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("profile_comments", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_content", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_lessons", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_courses", "users_LOGIN='" . $this->user['login'] . "'");
if (G_VERSIONTYPE != 'community') {
#cpp#ifndef COMMUNITY
eF_deleteTableData("payments", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("facebook_connect", "users_LOGIN='" . $this->user['login'] . "'");
eF_deleteTableData("users_to_skillgap_tests", "users_LOGIN='" . $this->user['login'] . "'");
}
#cpp#endif
//This line was in EfrontProfessor and EfrontStudent without an obvious reason. Admins may also be members of groups
eF_deleteTableData("users_to_groups", "users_LOGIN='" . $this->user['login'] . "'");
//Changing order of these lines because of #4318, where system removal notification was set (user triggering the event)
eF_deleteTableData("notifications", "recipient='" . $this->user['login'] . "'");
EfrontEvent::triggerEvent(array("type" => EfrontEvent::SYSTEM_REMOVAL, "users_LOGIN" => $this->user['login'], "users_name" => $this->user['name'], "users_surname" => $this->user['surname']));
eF_deleteTableData("users", "login='" . $this->user['login'] . "'");
// Added by Masoud Sadjadi on July 6, 2014 to support vLab in eFront
// Beging addition
// $vLab_username = $this -> user['login'];
$vLab_username_urlEncoded = rawurlencode($vLab_username);
$vLab_courseid = 123;
// Kaseya 7.0 Fundamentals Workshop
$vLab_courseid_urlEncoded = rawurlencode($vLab_courseid);
// $vLab_moodleURL = "http://localhost/moodle19";
$vLab_moodleURL = "http://ita-portal.cis.fiu.edu";
// auto delete
$str = $vLab_moodleURL . "/mod/deva/embedded/auto-delete.php?username={$vLab_username_urlEncoded}&courseid={$vLab_courseid_urlEncoded}";
// echo $str . '<br>';
$payload = file_get_contents($str);
// echo $payload;
return true;
}
开发者ID:kaseya-university,项目名称:efront,代码行数:91,代码来源:user.class-backup.php
示例15: do_retour
//.........这里部分代码省略.........
$transfert_mauvais_site = true;
} else {
//if (($pmb_transferts_actif)&&($stuff->pret_idempr))
//le message à l'écran
$html_erreur_site .= $msg[expl_retour_bad_location];
}
$html_erreur_site .= "</div>";
print pmb_bidi($html_erreur_site);
// fin de if ($stuff->expl_location != $deflt_docs_location)
}
if ($stuff->expl_note) {
$alert_sound_list[] = "critique";
print pmb_bidi("<hr /><div class='erreur'>{$msg[377]} :</div><div class='message_important'>" . $stuff->expl_note . "</div>");
} elseif ($pmb_play_pret_sound) {
$alert_sound_list[] = "information";
}
// zone du dernier emrunteur
if ($stuff->expl_lastempr) {
$dernier_empr = "<hr /><div class='row'>{$msg['expl_prev_empr']} ";
$link = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($stuff->lastempr_cb) . "'>";
$dernier_empr .= $link . $stuff->lastempr_prenom . ' ' . $stuff->lastempr_nom . ' (' . $stuff->lastempr_cb . ')</a>';
$dernier_empr .= "</div><hr />";
}
if ($stuff->pret_idempr) {
// l'exemplaire était effectivement emprunté
// calcul du retard éventuel
$rqt_date = "select ((TO_DAYS(CURDATE()) - TO_DAYS('{$stuff->pret_retour}'))) as retard ";
$resultatdate = mysql_query($rqt_date);
$resdate = mysql_fetch_object($resultatdate);
$retard = $resdate->retard;
if ($retard > 0) {
//Calcul du vrai nombre de jours
$date_debut = explode("-", $stuff->pret_retour);
$ndays = calendar::get_open_days($date_debut[2], $date_debut[1], $date_debut[0], date("d"), date("m"), date("Y"));
if ($ndays > 0) {
$retard = (int) $ndays;
print "<br /><div class='erreur'>" . $msg[369] . " : " . $retard . " " . $msg[370] . "</div>";
$alert_sound_list[] = "critique";
}
}
//Calcul du blocage
if ($pmb_blocage_retard) {
$date_debut = explode("-", $stuff->pret_retour);
$ndays = calendar::get_open_days($date_debut[2], $date_debut[1], $date_debut[0], date("d"), date("m"), date("Y"));
if ($ndays > $pmb_blocage_delai) {
$ndays = $ndays * $pmb_blocage_coef;
if ($ndays > $pmb_blocage_max && $pmb_blocage_max != 0) {
$ndays = $pmb_blocage_max;
}
} else {
$ndays = 0;
}
if ($ndays > 0) {
//Le lecteur est-il déjà bloqué ?
$date_fin_blocage_empr = mysql_result(mysql_query("select date_fin_blocage from empr where id_empr='" . $stuff->pret_idempr . "'"), 0, 0);
//Calcul de la date de fin
$date_fin = calendar::add_days(date("d"), date("m"), date("Y"), $ndays);
if ($date_fin > $date_fin_blocage_empr) {
//Mise à jour
mysql_query("update empr set date_fin_blocage='" . $date_fin . "' where id_empr='" . $stuff->pret_idempr . "'");
print "<br /><div class='erreur'>" . sprintf($msg["blocage_retard_pret"], formatdate($date_fin)) . "</div>";
$alertsound_list[] = "critique";
} else {
print "<br /><div class='erreur'>" . sprintf($msg["blocage_already_retard_pret"], formatdate($date_fin_blocage_empr)) . "</div>";
$alertsound_list[] = "critique";
}
开发者ID:bouchra012,项目名称:PMB,代码行数:67,代码来源:pret_func.inc.php
示例16: basename
$smarty->assign("T_CALENDAR_OPTIONS", $calendarOptions);
$smarty->assign("T_CALENDAR_LINK", basename($_SERVER['PHP_SELF']) . "?ctg=calendar");
isset($_GET['add_another']) ? $smarty->assign('T_ADD_ANOTHER', "1") : null;
$events = calendar::getCalendarEventsForUser($currentUser);
$events = calendar::getCalendarEventsForUser($currentUser);
if ($_SESSION['s_type'] != 'administrator' && $_SESSION['s_current_branch']) {
//this applies to branch urls
$currentBranch = new EfrontBranch($_SESSION['s_current_branch']);
$branchTreeUsers = array_keys($currentBranch->getBranchTreeUsers());
foreach ($events as $key => $value) {
if ($value['type'] != 'global' && !in_array($value['users_LOGIN'], $branchTreeUsers)) {
unset($events[$key]);
}
}
}
$events = calendar::sortCalendarEventsByTimestamp($events);
$smarty->assign("T_CALENDAR_EVENTS", $events);
//Assign events and specific day timestamp to smarty, to be used from calendar
$smarty->assign("T_VIEW_CALENDAR", $view_calendar);
}
/********** Facebook profile ******/
if ($GLOBALS['configuration']['social_modules_activated'] & FB_FUNC_DATA_ACQUISITION) {
if (isset($_SESSION['facebook_user']) && $_SESSION['facebook_user']) {
$smarty->assign("T_FB_INFORMATION", $_SESSION['facebook_details']);
} else {
$smarty->assign("T_PREVIOUSMAINURL", $_SESSION['previousMainUrl']);
$smarty->assign("T_OPEN_FACEBOOK_SESSION", 1);
$smarty->assign("T_FACEBOOK_API_KEY", $GLOBALS['configuration']['facebook_api_key']);
}
}
//-----------------------------------------
开发者ID:kaseya-university,项目名称:efront,代码行数:31,代码来源:social.php
示例17: or
Version: 1.0 Release date: 08 July 2003
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
*/
define('SHOW_ALL', 0);
define('SHOW_OWN', 1);
define('SHOW_SUB', 2);
require "../../Group-Office.php";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('calendar');
require $GO_LANGUAGE->get_language_file('calendar');
require $GO_MODULES->path . 'classes/calendar.class.inc';
$cal = new calendar();
$post_action = isset($_REQUEST['post_action']) ? $_REQUEST['post_action'] : '';
$task = isset($_POST['task']) ? $_POST['task'] : '';
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
$link_back = isset($_REQUEST['link_back']) ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
$view_type = isset($_REQUEST['view_type']) ? $_REQUEST['view_type'] : 0;
$calendar_id = isset($_REQUEST['calendar_id']) ? $_REQUEST['calendar_id'] : 0;
$db = new db();
switch ($task) {
case 'delete_calendar':
$calendar = $cal->get_calendar($_POST['delete_calendar_id']);
if ($GO_SECURITY->user_id == $calendar['user_id']) {
if ($cal->delete_calendar($_POST['delete_calendar_id'])) {
$holidays->delete_holidays($GO_SECURITY->user_id, $_POST['delete_calendar_id']);
$GO_SECURITY->delete_acl($calendar['acl_write']);
$GO_SECURITY->delete_acl($calendar['acl_read']);
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:calendars.php
示例18: getRssSource
private function getRssSource($source, $mode, $lesson)
{
$feeds = $this->getProvidedFeeds();
foreach ($feeds as $value) {
if ($value['active'] && $value['mode'] == 'system') {
$systemFeeds[$value['type']] = $value;
} else {
if ($value['active'] && $value['mode'] == 'lesson') {
$lessonFeeds[$value['type']] = $value;
}
}
}
if ($mode == 'system' && !in_array($source, array_keys($systemFeeds))) {
return array();
} elseif ($mode == 'lesson' && !in_array($source, array_keys($lessonFeeds))) {
return array();
}
$data = array();
switch ($source) {
case 'announcements':
if ($mode == 'system') {
$news = news::getNews(0, true);
} elseif ($mode == 'lesson') {
if ($lesson) {
$news = news::getNews($lesson, true);
} else {
$lessons = eF_getTableDataFlat("lessons", "id, name");
$lessonNames = array_combine($lessons['id'], $lessons['name']);
$news = news::getNews($lessons['id'], true);
}
}
$count = 1;
foreach ($news as $value) {
if ($mode == 'lesson' && !$lesson) {
$value['title'] = $lessonNames[$value['lessons_ID']] . ': ' . $value['title'];
$link = G_SERVERNAME . 'userpage.php?lessons_ID=' . $value['lessons_ID'] . '&ctg=news&view=' . $value['id'];
} else {
$link = G_SERVERNAME . 'userpage.php?ctg=news&view=' . $value['id'];
}
$data[] = array('title' => $value['title'], 'link' => $link, 'description' => $value['data']);
/*
if ($count++ == $this -> feedLimit) {
break;
}
*/
}
break;
case 'catalog':
$constraints = array("return_objects" => false, 'archive' => false, 'active' => true);
$result = EfrontCourse::getAllCourses($constraints);
$directionsTree = new EfrontDirectionsTree();
$directionPaths = $directionsTree->toPathString();
foreach ($result as $value) {
$pathString = $directionPaths[$value['directions_ID']] . ' → ' . $value['name'];
$data[] = array('title' => $pathString, 'link' => G_SERVERNAME . 'index.php?ctg=lesson_info&courses_ID=' . $value['id'], 'description' => implode("<br>", unserialize($value['info'])));
}
$result = eF_getTableData("lessons", "id,name,directions_ID, info", "archive=0 and instance_source = 0 and active=1 and course_only=0", "name");
foreach ($result as $value) {
$pathString = $directionPaths[$value['directions_ID']] . ' → ' . $value['name'];
$data[] = array('title' => $pathString, 'link' => G_SERVERNAME . 'index.php?ctg=lesson_info&lessons_ID=' . $value['id'], 'description' => implode("<br>", unserialize($value['info'])));
}
$data = array_values(eF_multisort($data, 'title', 'asc'));
//Sort results based on path string
break;
case 'calendar':
if ($mode == 'system') {
$events = calendar::getGlobalCalendarEvents();
} elseif ($mode == 'lesson') {
if ($lesson) {
$events = calendar::getLessonCalendarEvents($lesson);
} else {
$events = calendar::getCalendarEventsForAllLessons();
}
}
foreach ($events as $value) {
$value['name'] ? $title = formatTimestamp($value['timestamp']) . ' (' . $value['name'] . ')' : ($title = formatTimestamp($value['timestamp']));
$data[] = array('title' => $title, 'link' => G_SERVERNAME . 'userpage.php?ctg=calendar&view_calendar=' . $value['timestamp'] . '&type=0', 'description' => $value['data']);
}
break;
/*
case 'history':
$currentUser = $this -> getCurrentUser();
$eventObjects = array();
$result = eF_getTableData("events", "*", "", "timestamp DESC limit 100");
foreach ($result as $value) {
$eventObject = new EfrontEvent($value);
$eventObject -> createMessage();
pr($eventObject);
}
break;
*/
/*
case 'history':
$currentUser = $this -> getCurrentUser();
$eventObjects = array();
$result = eF_getTableData("events", "*", "", "timestamp DESC limit 100");
foreach ($result as $value) {
//.........这里部分代码省略.........
开发者ID:bqq1986,项目名称:efront,代码行数:101,代码来源:module_rss.class.php
示例19: do_retour_doc
function do_retour_doc()
{
global $dbh;
global $msg;
global $pmb_gestion_amende, $pmb_gestion_financiere, $pmb_blocage_retard, $pmb_blocage_max, $pmb_blocage_delai, $pmb_blocage_coef;
// récupération localisation exemplaire
$query = "select t.tdoc_libelle as type_doc";
$query .= ", l.location_libelle as location";
$query .= ", s.section_libelle as section";
$query .= " from docs_type t";
$query .= ", docs_location l";
$query .= ", docs_section s";
$query .= " where t.idtyp_doc=" . $this->expl_typdoc;
$query .= " and l.idlocation=" . $this->expl_location;
$query .= " and s.idsection=" . $this->expl_section;
$query .= " limit 1";
$result = pmb_mysql_query($query, $dbh);
$info_doc = pmb_mysql_fetch_object($result);
$this->type_doc = $info_doc->type_doc;
if ($this->nbparts > 1) {
$this->type_doc .= " (" . $this->nbparts . ")";
}
$this->location = $info_doc->location;
$this->section = $info_doc->section;
if ($this->expl_note) {
$this->error_message = $msg[377];
}
if ($this->pret_idempr) {
// calcul du retard éventuel
$rqt_date = "select ((TO_DAYS(CURDATE()) - TO_DAYS('{$this->pret_retour}'))) as retard ";
$resultatdate = pmb_mysql_query($rqt_date);
$resdate = pmb_mysql_fetch_object($resultatdate);
$retard = $resdate->retard;
if ($retard > 0) {
//Calcul du vrai nombre de jours
$date_debut = explode("-", $this->pret_retour
|
请发表评论