<?php

/**
 * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
require_once '../../lib/base.php';
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
// Create default calendar ...
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
if (count($calendars) == 0) {
    OC_Calendar_Calendar::addCalendar(OC_User::getUser(), 'default', 'Default calendar');
    $calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
}
OC_UTIL::addScript('calendar', 'calendar');
OC_UTIL::addStyle('calendar', 'style');
OC_UTIL::addScript('', 'jquery.multiselect');
OC_UTIL::addStyle('', 'jquery.multiselect');
OC_APP::setActiveNavigationEntry('calendar_index');
$output = new OC_TEMPLATE('calendar', 'calendar', 'user');
$output->printPage();
Exemple #2
0
// load required style sheets:
OC_Util::addStyle('files_svgedit', 'ocsvg');
// load required javascripts:
OC_Util::addScript('files_svgedit', 'svg-edit/embedapi');
OC_Util::addScript('files_svgedit', 'ocsvgEditor');
OC_Util::addScript('files_svgedit', 'canvg/canvg');
OC_Util::addScript('files_svgedit', 'canvg/rgbcolor');
OC_Util::addScript('files_svgedit', 'base64');
//OC_Util::addScript('files_svgedit', 'jsPDF/libs/sprintf');
//OC_Util::addScript('files_svgedit', 'jsPDF/jspdf');
OC_Util::addScript('files_svgedit', 'jsPDF/jspdf.min');
OC_Util::addScript('files_svgedit', 'svgToPdf');
OC_App::setActiveNavigationEntry('files_index');
$path = $_GET['file'];
if (method_exists('OC_Filesystem', 'is_writable')) {
    $writable = OC_Filesystem::is_writable($path);
} else {
    $writable = OC_Filesystem::is_writeable($path);
}
if (isset($_GET['file']) and $writable) {
    $filecontents = OC_Filesystem::file_get_contents($path);
    $filemtime = OC_Filesystem::filemtime($path);
} else {
    $filecontents = "";
    $filemtime = 0;
}
$tmpl = new OC_TEMPLATE("files_svgedit", "editor", "user");
$tmpl->assign('fileContents', json_encode($filecontents));
$tmpl->assign('filemTime', $filemtime);
$tmpl->assign('filePath', json_encode($path));
$tmpl->printPage();
<?php

/**
 * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
require_once '../../../lib/base.php';
$l10n = new OC_L10N('calendar');
if (!OC_USER::isLoggedIn()) {
    die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar");
$output->printpage();
<?php

/**
 * Copyright (c) 2012 Thomas Tanghus <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
function bailOut($msg)
{
    OC_JSON::error(array('data' => array('message' => $msg)));
    OC_Log::write('core', 'ajax/vcategories/edit.php: ' . $msg, OC_Log::DEBUG);
    exit;
}
function debug($msg)
{
    OC_Log::write('core', 'ajax/vcategories/edit.php: ' . $msg, OC_Log::DEBUG);
}
require_once '../../../lib/base.php';
OC_JSON::checkLoggedIn();
$app = isset($_GET['app']) ? $_GET['app'] : null;
if (is_null($app)) {
    bailOut('Application name not provided.');
}
OC_JSON::checkAppEnabled($app);
$tmpl = new OC_TEMPLATE("core", "edit_categories_dialog");
$vcategories = new OC_VCategories($app);
$categories = $vcategories->categories();
debug(print_r($categories, true));
$tmpl->assign('categories', $categories);
$tmpl->printpage();