~alexharrington/xibo/pyclient-1.1.0a22

« back to all changes in this revision

Viewing changes to server/lib/pages/clock.class.php

  • Committer: Dan Garner
  • Date: 2008-12-14 14:42:52 UTC
  • mto: (1.1.80 Xibo)
  • mto: This revision was merged to the branch mainline in revision 2.
  • Revision ID: mail@dangarner.co.uk-20081214144252-8dosaegtfwvv0dsl
Moved 3rd Party libraries to their own folder.
Updated jQuery to the latest revision and now use jQuery UI instead of individual plugins.

Tabs are not currently working

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * Xibo - Digitial Signage - http://www.xibo.org.uk
4
 
 * Copyright (C) 2009 Daniel Garner
5
 
 *
6
 
 * This file is part of Xibo.
7
 
 *
8
 
 * Xibo is free software: you can redistribute it and/or modify
9
 
 * it under the terms of the GNU Affero General Public License as published by
10
 
 * the Free Software Foundation, either version 3 of the License, or
11
 
 * any later version. 
12
 
 *
13
 
 * Xibo is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU Affero General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU Affero General Public License
19
 
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
20
 
 */ 
21
 
defined('XIBO') or die("Sorry, you are not allowed to directly access this page.<br /> Please press the back button in your browser.");
22
 
 
23
 
class clockDAO
24
 
{
25
 
        private $db;
26
 
        private $user;
27
 
 
28
 
        function __construct(database $db, user $user) 
29
 
        {
30
 
                $this->db       =& $db;
31
 
                $this->user =& $user;
32
 
                
33
 
        }
34
 
        
35
 
        function displayPage() 
36
 
        {               
37
 
                return false;
38
 
        }
39
 
        
40
 
        function on_page_load() 
41
 
        {
42
 
                return '';
43
 
        }
44
 
        
45
 
        function echo_page_heading() 
46
 
        {
47
 
                return true;
48
 
        }
49
 
        
50
 
        /**
51
 
         * Shows the Time Information
52
 
         * @return 
53
 
         */
54
 
        function ShowTimeInfo()
55
 
        {
56
 
                $db                             =& $this->db;
57
 
                $response               = new ResponseManager();
58
 
                $datemanager    = new DateManager($db);
59
 
                                
60
 
                $output  = '<h3>' . __('System Information') . '</h3>';
61
 
                $output .= '<ul>';
62
 
                $output .= '<li>' . __('Local Time') . ': ' . $datemanager->GetClock() . '</li>';
63
 
                $output .= '<li>' . __('System Time') . ': ' . $datemanager->GetSystemClock() . '</li>';
64
 
                $output .= '<li>' . __('Local Date') . ': ' . $datemanager->GetLocalDate('Y-m-d H:i:s') . '</li>';
65
 
                $output .= '<li>' . __('System Date') . ': ' . $datemanager->GetSystemDate('Y-m-d H:i:s') . '</li>';
66
 
                $output .= '</ul>';
67
 
                
68
 
                $response->SetFormRequestResponse($output, __('Date / Time Information'), '480px', '240px');
69
 
                $response->Respond();
70
 
        }
71
 
        
72
 
        /**
73
 
         * Gets the Time
74
 
         * @return 
75
 
         */
76
 
        function GetClock()
77
 
        {
78
 
                $db                             =& $this->db;
79
 
                $response               = new ResponseManager();
80
 
                $datemanager    = new DateManager($db);
81
 
                
82
 
                $output = $datemanager->GetClock();
83
 
                
84
 
                $response->SetFormRequestResponse($output, __('Date / Time Information'), '480px', '240px');
85
 
                $response->clockUpdate  = true;
86
 
                $response->success              = false;
87
 
                $response->Respond();
88
 
        }
89
 
}
90
 
?>
 
 
b'\\ No newline at end of file'