Exemplo n.º 1
0
<?php

require_once 'class/config.inc.php';
$page = new basic_page();
/*******Checking Authentication****************/
$page->auth->Checklogin();
$user = new User();
$notify = new Notification();
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
require_once 'class/class.calendar.php';
$cal = new GCalendar(USER, PASS);
/**********************************************/
/*******Setting Page access Rules & checking Authorization****************/
/*$access_rule = array(	"Admin"		=>"Admin" 
					);
$page -> setAccessRules($access_rule);
$page -> setAccessRulesType('all');		// any or all
$page -> CheckAuthorization();*/
/************************************************************************/
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("CALENDAR MANAGEMENT");
$page->setActiveButton('6');
$page->setInnerNav('');
//$page -> setImportCss1('main_style.css');
//$page -> setImportCss2('form.css'); // each page should have it's own .css sheet.  Link mulitple sheets here and below
$page->SetDynamicCSS_1('main_style.php');
Exemplo n.º 2
0
require_once 'class/class.contacts.php';
require_once 'class/class.bugs.php';
require_once 'Zend/Loader.php';
require_once 'class/class.CapacityReport.php';
require_once 'class/class.WorkOrder.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
require_once 'class/class.calendar.php';
if (PHONE_SYSTEM == "asterisk") {
    require_once "class/class.asterisk.php";
    $asterisk = new Asterisk();
}
if (EMAIL_SYSTEM == 'gmail') {
    $cal = new GCalendar(USER, PASS);
}
$page = new basic_page();
$user = new User();
$page->auth->Checklogin();
$notify = new Notification();
$contact = new Company_Global();
$contact->SetUserID($page->auth->Get_user_id());
$contact->SetUserName($page->auth->Get_user_name());
$news = new News();
$message = new Message();
$ajax = new PHPLiveX();
$user = new User();
$task = new Tasks();
$bugs = new Bugs();
$capacity = new CapacityReport();
Exemplo n.º 3
0
<?php

ini_set("display_errors", 1);
define("DATE_ATOM", "Y-m-d\\TH:i:sP", true);
require_once 'Zend/Loader.php';
require_once 'tpl/class.calendar.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
Zend_Loader::loadClass('Zend_Http_Client');
$cal = new GCalendar('*****@*****.**', 'soundbooka123');
require "tpl/inc/head.php";
?>
<body>
<link type="text/css" rel="stylesheet" href="css/jscal2.css">
<link type="text/css" rel="stylesheet" href="css/border-radius.css">
<script src="js/jscal2.js"></script>
<script src="js/en.js"></script>

<div id="page"> 
<?php 
require "tpl/inc/header.php";
?>
 
<?php 
require "tpl/inc/path.php";
?>
 
  <div id="content"> 
	  <div id="left-col"> 
		  <div id="left-col-border"> 
Exemplo n.º 4
0
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GCalendar is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GCalendar.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Allon Moritz
 * @copyright 2007-2009 Allon Moritz
 * @version $Revision: 2.1.2 $
 */
defined('_JEXEC') or die('Restricted access');
require_once 'calendar/gcalendar.php';
$params = $this->params;
echo "<div class=\"contentpane" . $params->get('pageclass_sfx') . "\">\n";
echo $params->get('textbefore');
$model =& $this->getModel();
$calendar = new GCalendar($model);
$calendar->weekStart = $params->get('weekstart');
$calendar->showSelectionList = $params->get('show_selection') == 'yes';
$calendar->dateFormat = $params->get('dateformat');
$calendar->columnInWeekViewEqual = $params->get('columnInWeekViewEqual') == 'yes';
$calendar->defaultView = $params->get('defaultView');
$calendar->display();
echo $params->get('textafter');
echo "</div>\n";
echo "<div style=\"text-align:center;margin-top:10px\" id=\"gcalendar_powered\"><a href=\"http://gcalendar.laoneo.net\">Powered by GCalendar</a></div>\n";
Exemplo n.º 5
0
function link_to_google($id = "", $pass = "")
{
    global $xoopsDB, $xoopsTpl;
    $cate_title_arr = "";
    //抓出現有google行事曆
    $sql = "select `cate_title`,`cate_handle` from " . $xoopsDB->prefix("tad_cal_cate") . " where `cate_handle`!=''";
    $result = $xoopsDB->query($sql) or web_error($sql);
    while (list($cate_title, $cate_handle) = $xoopsDB->fetchRow($result)) {
        $all_handle[] = $cate_handle;
        $cate_title_arr[$cate_handle] = $cate_title;
    }
    require "../class/gcalendar.class.php";
    $gmail = new GCalendar($id, $pass);
    $gmail->authenticate();
    $Calendars = $gmail->getOwnCalendars();
    if (empty($Calendars)) {
        redirect_header($_SERVER['PHP_SELF'], 3, _MA_TADCAL_NO_GOOGLE_CAL);
    }
    $i = 0;
    $all = "";
    foreach ($Calendars as $j => $cal) {
        $Events = $gmail->getEvents($cal['handle'], 10);
        if (empty($Events['data']['items'])) {
            continue;
        }
        $all[$i]['cate_handle'] = $cate_handle;
        $all[$i]['cate_title'] = $cate_title_arr[$cal['handle']];
        $all[$i]['totalResults'] = $Events['data']['totalResults'];
        $all[$i]['cal_title'] = $cal['title'];
        $all[$i]['handle'] = $cal['handle'];
        $all[$i]['in_array'] = !is_array($all_handle) ? false : in_array($cal['handle'], $all_handle);
        $all[$i]['j'] = $j;
        $i++;
    }
    $xoopsTpl->assign('id', $id);
    $xoopsTpl->assign('pass', $pass);
    $xoopsTpl->assign('op', 'link_to_google');
    $xoopsTpl->assign('all', $all);
}