Beispiel #1
0
function selectEvents()
{
    global $ax, $set, $msg, $fileName, $fileDes, $usrName, $catName, $fromDda, $fromMda, $tillDda, $tillMda;
    if (!$fileName) {
        $fileName = substr(translit($set['calendarTitle'], true), 0, 60);
    }
    echo "<form action='index.php?lc' method='post'>\n\t\t<table class='fieldBox'>\n\t\t<tr><td class='legend' colspan='2'>&nbsp;{$ax['iex_create_ics']}&nbsp;</td></tr>\n\t\t<tr><td class='label'>{$ax['iex_file_name']}:</td><td><input type='text' name='fileName' maxlength='60' value=\"{$fileName}\" maxlength='40' size='26'> .ics</td></tr>\n\t\t<tr><td class='label'>{$ax['iex_file_description']}:</td><td><input type='text' name='fileDes' value=\"{$fileDes}\" maxlength='50' size='30'></td></tr><tr><td colspan='2'><hr>\n</td></tr><tr><td colspan='2'>{$ax['iex_filters']}</td></tr>\n\t\t<tr><td class='label'>{$ax['iex_owner']}:</td><td><select name='usrName' >\n";
    userMenu($usrName);
    echo "</select></td></tr>\n<tr><td class='label'>{$ax['iex_category']}:</td><td><select name='catName' >\n";
    catList($catName);
    echo "</select></td></tr>\n\t\t<tr><td class='label'>{$ax['iex_between_dates']}:</td><td>\n\t\t<input type='text' name='fromDda' id='fromDda' value='" . IDtoDD($fromDda) . "' size='8'>\n\t\t<button title=\"{$ax['iex_select_start_date']}\" onclick=\"dPicker(1,'nill','fromDda');return false;\">&larr;</button> &#8211;\n\t\t<input type='text' name='tillDda' id='tillDda' value='" . IDtoDD($tillDda) . "' size='8'>\n\t\t<button title=\"{$ax['iex_select_end_date']}\" onclick=\"dPicker(1,'nill','tillDda');return false;\">&larr;</button></td></tr>\n\t\t<tr><td class='label'>{$ax['iex_changed_between']}:</td><td>\n\t\t<input type='text' name='fromMda' id='fromMda' value='" . IDtoDD($fromMda) . "' size='8'>\n\t\t<button title=\"{$ax['iex_select_start_date']}\" onclick=\"dPicker(1,'nill','fromMda');return false;\">&larr;</button> &#8211;\n\t\t<input type='text' name='tillMda' id='tillMda' value='" . IDtoDD($tillMda) . "' size='8'>\n\t\t<button title=\"{$ax['iex_select_end_date']}\" onclick=\"dPicker(1,'nill','tillMda');return false;\">&larr;</button></td></tr>\n\t\t</table>\n\t\t<input class='noPrint' type='submit' name='create' value=\"{$ax['iex_create_file']}\">\n";
    if (isset($_POST['create']) and $msg == $ax['iex_file_created']) {
        $icalfName = $fileName ? $fileName : $set['calendarTitle'];
        $icalfName = substr(translit($icalfName, true) . '.ics', 0, 60);
        $rName = str_replace('.', '-' . date("Ymd-Hi") . '.', $icalfName);
        echo "&nbsp;&nbsp;&nbsp;&nbsp;<button class='noPrint' type='button' onclick=\"location.href='dloader.php?ftd={$icalfName}&amp;rName={$rName}'\">{$ax['iex_download_file']}</button>\n";
    }
    echo "</form>\n<div style='clear:right'></div>\n";
}
Beispiel #2
0
<?php

define('COOKIE_SESSION', true);
require_once "db.php";
session_start();
requireLogin();
userMenu();
flashMessages();
if (!isset($_GET['id'])) {
    $_SESSION['err'] = 'Missing value for id';
    header('Location: error.php');
    return;
}
$sql = sprintf("SELECT name,lkey,id FROM LTI_Courses WHERE id=%s AND key_id=%s", $db->quote($_GET['id']), $CFG->localkeyid);
$q = $db->query($sql);
$course = $q->fetch();
if (!$course) {
    $_SESSION['error'] = 'Bad value for id';
    header('Location: error.php');
    return;
}
?>
<iframe name="basicltiLaunchFrame"  id="basicltiLaunchFrame" src="launch.php?id=<?php 
echo $_GET['id'];
?>
"
width="100%" height="600" scrolling="auto" frameborder="1" transparency>
<p>frames_required</p>
</iframe>

Beispiel #3
0
function display_phpc()
{
    global $phpc_messages, $phpc_redirect, $phpc_script, $phpc_prefix, $phpc_title, $phpcdb, $phpc_cal, $phpc_home_url;
    $navbar = false;
    try {
        $calendars = $phpcdb->get_calendars();
        $list = array();
        if (isset($phpc_cal)) {
            $phpc_title = $phpc_cal->get_title();
            $title_link = tag('a', attrs("href='{$phpc_home_url}?phpcid={$phpc_cal->get_cid()}'", 'class="phpc-dropdown-list-title"'), $phpc_title);
        } else {
            $phpc_title = __("(No calendars)");
            $title_link = $phpc_title;
        }
        foreach ($calendars as $calendar) {
            $list["{$phpc_home_url}?phpcid={$calendar->get_cid()}"] = $calendar->get_title();
        }
        if (sizeof($calendars) > 1) {
            $title_tag = create_dropdown_list($title_link, $list);
        } else {
            $title_tag = $title_link;
        }
        $content = do_action();
        if (sizeof($phpc_messages) > 0) {
            $messages = tag('div');
            foreach ($phpc_messages as $message) {
                $messages->add($message);
            }
            // If we're redirecting, the messages might not get
            //   seen, so don't clear them
            if (empty($phpc_redirect)) {
                $_SESSION["{$phpc_prefix}messages"] = NULL;
            }
        } else {
            $messages = '';
        }
        return tag('div', attrs('class="php-calendar ui-widget"'), userMenu(), tag('br', attrs('style="clear:both;"')), tag('div', attrs('class="phpc-title ui-widget-header"'), $title_tag), navbar(), $messages, $content, footer());
    } catch (PermissionException $e) {
        $msg = __('You do not have permission to do that: ') . $e->getMessage();
        if (is_user()) {
            return error_message_redirect($msg, $phpc_script);
        } else {
            return error_message_redirect($msg, "{$phpc_script}?action=login");
        }
    } catch (InvalidInputException $e) {
        return error_message_redirect($e->getMessage(), $e->target);
    } catch (Exception $e) {
        return display_exception($e, $navbar);
    }
}
Beispiel #4
0
}
if (strpos($totEvtTempl, '4') !== false) {
    echo "<tr><td class='arrow'>" . ($set['xField1'] ? "{$set['xField1']}" : $xx['sch_extra_field1']) . ":</td><td colspan='3'><input type='text' name='xf1' id='xf1' style='width:100%' maxlength='64' value=\"{$xf1}\"></td></tr>\n";
}
if (strpos($totEvtTempl, '5') !== false) {
    echo "<tr><td class='arrow'>" . ($set['xField2'] ? "{$set['xField2']}" : $xx['sch_extra_field2']) . ":</td><td colspan='3'><input type='text' name='xf2' id='xf2' style='width:100%' maxlength='64' value=\"{$xf2}\"></td></tr>\n";
}
echo "<tr><td colspan='4'><hr></td></tr>\n\t<tr>\n\t\t<td>{$xx['evt_start_date']}:</td>\n\t\t<td><input type='text' name='sda' id='sda' value='{$sda}' size='8'><button title=\"{$xx['evt_select_date']}\" onclick=\"dPicker(0,'nill','sda','eda');return false;\">&larr;</button></td>\n\t\t<td id='dTimeS'{$hidden}><input type='text' name='sti' id='sti' value='{$sti}' size='6'><button title=\"{$xx['evt_select_time']}\" onclick=\"tPicker('sti');return false;\">&larr;</button></td>\n\t\t<td><input type='checkbox' onclick=\"hide_times(this);\" name='ald' id='ald' value='all'{$checked}><label for='ald'>{$xx['evt_all_day']}</label></td>\n\t</tr>\n\t<tr>\n\t\t<td>{$xx['evt_end_date']}:</td>\n\t\t<td><input type='text' name='eda' id='eda' value='{$eda}' size='8'><button title=\"{$xx['evt_select_date']}\" onclick=\"dPicker(1,'nill','eda','sda');return false;\">&larr;</button></td>\n\t\t<td id='dTimeE'{$hidden}><input type='text' name='eti' id='eti' value='{$eti}' size='6'><button title=\"{$xx['evt_select_time']}\" onclick=\"tPicker('eti');return false;\">&larr;</button></td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan='4'>{$repTxt}&nbsp;<button class='noPrint' type='button' onclick=\"show('repBox');\">{$xx['evt_change']}</button><br></td>\n\t</tr>\n";
if ($set['mailServer']) {
    echo "<tr><td colspan='4'><hr></td></tr>\n\t\t\t<tr>\n<td>{$xx['evt_notify']}:</td>\n\t\t\t<td colspan='3'>\n\t\t\t<input type='checkbox' name='non' id='non' value='yes'" . ($non ? " checked='checked'" : '') . "><label for='non'>{$xx['evt_now_and_or']}</label>&nbsp;\n\t\t\t<input type='text' name='not' style='width:20px' maxlength='2' value=\"{$not}\"> {$xx['evt_days_before_event']}\n\t\t\t<span class='floatR arrow noPrint' onmouseover=\"pop(this,'" . htmlspecialchars($xx['evt_mail_help']) . "', 'normal')\">({$xx['evt_help']})</span>\n\t\t\t</td>\n</tr>\n\t\t\t<tr>\n\t\t\t<td colspan='4'>\n\t\t\t<input type='text' name='nml' id='nml' style='width:100%' maxlength='255' value=\"{$nml}\">\n\t\t\t</td>\n</tr>\n";
}
echo "<tr>\n<td colspan='4'><hr></td>\n</tr>\n\t\t<tr>\n<td>{$xx['evt_added']}:</td><td colspan='3'>" . IDTtoDDT($adt) . " {$xx['by']} ";
if ($privs > 3) {
    //manager or admin
    echo "<select name='uid' id='uid'>\n";
    userMenu($uid);
    echo "</select>\n";
} else {
    echo $own;
}
if ($mdt and $edr) {
    echo "</td>\n</tr>\n<tr>\n<td>{$xx['evt_edited']}:</td><td colspan='3'>" . IDTtoDDT($mdt) . " {$xx['by']} {$edr}";
}
echo "</td>\n</tr>\n</table>\n";
echo "<div class='repBox' id='repBox'>\n\t<div class='floatC'><b>{$xx['evt_set_repeat']}</b><hr></div>\n\t<div>\n\t\t<input type='radio' name='r_t' id='r_t0' value='0'" . (!$r_t ? " checked='checked'" : '') . "><label for='r_t0'>{$xx['evt_no_repeat']}</label>\n\t\t<br>\n\t\t<input type='radio' name='r_t' id='r_t1' value='1'" . ($r_t == "1" ? " checked='checked'" : '') . "><label for='r_t1'>{$xx['evt_repeat']}</label>\n\t\t<select name='ri1' id='ri1'>\n\t\t\t<option value='1'" . ($ri1 == '1' ? " selected='selected'>" : '>') . $xx['evt_interval1_1'] . "</option>\n\t\t\t<option value='2'" . ($ri1 == '2' ? " selected='selected'>" : '>') . $xx['evt_interval1_2'] . "</option>\n\t\t\t<option value='3'" . ($ri1 == '3' ? " selected='selected'>" : '>') . $xx['evt_interval1_3'] . "</option>\n\t\t\t<option value='4'" . ($ri1 == '4' ? " selected='selected'>" : '>') . $xx['evt_interval1_4'] . "</option>\n\t\t\t<option value='5'" . ($ri1 == '5' ? " selected='selected'>" : '>') . $xx['evt_interval1_5'] . "</option>\n\t\t\t<option value='6'" . ($ri1 == '6' ? " selected='selected'>" : '>') . $xx['evt_interval1_6'] . "</option>\n\t\t</select>\n\t\t<select name='rp1' id='rp1'>\n\t\t\t<option value='1'" . ($rp1 == '1' ? " selected='selected'>" : '>') . $xx['evt_period1_1'] . "</option>\n\t\t\t<option value='2'" . ($rp1 == '2' ? " selected='selected'>" : '>') . $xx['evt_period1_2'] . "</option>\n\t\t\t<option value='3'" . ($rp1 == '3' ? " selected='selected'>" : '>') . $xx['evt_period1_3'] . "</option>\n\t\t\t<option value='4'" . ($rp1 == '4' ? " selected='selected'>" : '>') . $xx['evt_period1_4'] . "</option>\n\t\t</select>\n\t\t<br>\n\t\t<input type='radio' name='r_t' id='r_t2' value='2'" . ($r_t == "2" ? 'checked="checked"' : '') . "><label for='r_t2'>{$xx['evt_repeat_on']}</label>\n\t\t<select name='ri2' id='ri2'>\n\t\t\t<option value='1'" . ($ri2 == '1' ? " selected='selected'>" : '>') . $xx['evt_interval2_1'] . "</option>\n\t\t\t<option value='2'" . ($ri2 == '2' ? " selected='selected'>" : '>') . $xx['evt_interval2_2'] . "</option>\n\t\t\t<option value='3'" . ($ri2 == '3' ? " selected='selected'>" : '>') . $xx['evt_interval2_3'] . "</option>\n\t\t\t<option value='4'" . ($ri2 == '4' ? " selected='selected'>" : '>') . $xx['evt_interval2_4'] . "</option>\n\t\t\t<option value='5'" . ($ri2 == '5' ? " selected='selected'>" : '>') . $xx['evt_interval2_5'] . "</option>\n\t\t</select>\n\t\t<select name='rp2' id='rp2'>\n\t\t\t<option value='1'" . ($rp2 == '1' ? " selected='selected'>" : '>') . $wkDays[1] . "</option>\n\t\t\t<option value='2'" . ($rp2 == '2' ? " selected='selected'>" : '>') . $wkDays[2] . "</option>\n\t\t\t<option value='3'" . ($rp2 == '3' ? " selected='selected'>" : '>') . $wkDays[3] . "</option>\n\t\t\t<option value='4'" . ($rp2 == '4' ? " selected='selected'>" : '>') . $wkDays[4] . "</option>\n\t\t\t<option value='5'" . ($rp2 == '5' ? " selected='selected'>" : '>') . $wkDays[5] . "</option>\n\t\t\t<option value='6'" . ($rp2 == '6' ? " selected='selected'>" : '>') . $wkDays[6] . "</option>\n\t\t\t<option value='7'" . ($rp2 == '7' ? " selected='selected'>" : '>') . $wkDays[7] . "</option>\n\t\t</select>\n\t\t{$xx['of']} \n\t\t<select name='rpm' id='rpm'>\n\t\t\t<option value='0'" . ($rpm == '0' ? " selected='selected'>" : '>') . $xx['evt_each_month'] . "</option>\n\t\t\t<option value='1'" . ($rpm == '1' ? " selected='selected'>" : '>') . $months[0] . "</option>\n\t\t\t<option value='2'" . ($rpm == '2' ? " selected='selected'>" : '>') . $months[1] . "</option>\n\t\t\t<option value='3'" . ($rpm == '3' ? " selected='selected'>" : '>') . $months[2] . "</option>\n\t\t\t<option value='4'" . ($rpm == '4' ? " selected='selected'>" : '>') . $months[3] . "</option>\n\t\t\t<option value='5'" . ($rpm == '5' ? " selected='selected'>" : '>') . $months[4] . "</option>\n\t\t\t<option value='6'" . ($rpm == '6' ? " selected='selected'>" : '>') . $months[5] . "</option>\n\t\t\t<option value='7'" . ($rpm == '7' ? " selected='selected'>" : '>') . $months[6] . "</option>\n\t\t\t<option value='8'" . ($rpm == '8' ? " selected='selected'>" : '>') . $months[7] . "</option>\n\t\t\t<option value='9'" . ($rpm == '9' ? " selected='selected'>" : '>') . $months[8] . "</option>\n\t\t\t<option value='10'" . ($rpm == '10' ? " selected='selected'>" : '>') . $months[9] . "</option>\n\t\t\t<option value='11'" . ($rpm == '11' ? " selected='selected'>" : '>') . $months[10] . "</option>\n\t\t\t<option value='12'" . ($rpm == '12' ? " selected='selected'>" : '>') . $months[11] . "</option>\n\t\t</select>\n\t\t<br><br>{$xx['evt_until']} \n\t\t<input type='text' name='rul' id='rul' value='{$rul}' size='9'>\n\t\t<button title=\"{$xx['evt_select_date']}\" onclick=\"dPicker(1,'nill','rul','sda');return false;\">&larr;</button> ({$xx['evt_blank_no_end']})\n\t</div>\n\t<div class='floatC'><hr><input type='submit' name='refresh' value=\"{$xx['evt_set']}\"></div>\n</div>\n<div class='floatC noPrint'>\n";
if ($mode == "add" or $mode == "add_exe") {
    echo "<input type='submit' name='add_exe_cls' value=\"{$xx['evt_add_close']}\">\n\t\t&nbsp;&nbsp;<input type='submit' name='add_exe' value=\"{$xx['evt_add']}\">";
} else {
    echo "<input type='submit' name='upd_exe_cls' value=\"{$xx['evt_save_close']}\">\n\t\t&nbsp;&nbsp;<input type='submit' name='upd_exe' value=\"{$xx['evt_save']}\">\n\t\t&nbsp;&nbsp;<input type='submit' name='add_exe' value=\"{$xx['evt_clone']}\">\n";
    if ($set['evtDelButton'] == 1 or $set['evtDelButton'] == 2 and $privs > 3) {
        echo "&nbsp;&nbsp;<input type='submit' name='del_exe' value=\"{$xx['evt_delete']}\">\n";
Beispiel #5
0
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' || $_SERVER['SERVER_PORT'] == 443 || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || isset($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
    $phpc_proto = "https";
} else {
    $phpc_proto = "http";
}
$phpc_home_url = "{$phpc_proto}://{$phpc_server}{$phpc_script}";
$phpc_url = $phpc_home_url . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']);
// Remove this line if you must
ini_set('arg_separator.output', '&amp;');
/*
 * Do not modify anything under this point
 */
if (!defined('IN_PHPC')) {
    define('IN_PHPC', true);
}
try {
    require_once "{$phpc_includes_path}/calendar.php";
    require_once "{$phpc_includes_path}/setup.php";
    $calendars = $phpcdb->get_calendars();
    $list = array();
    foreach ($calendars as $calendar) {
        $list["{$phpc_home_url}?phpcid={$calendar->get_cid()}"] = $calendar->get_title();
    }
    $calendar_title = $phpc_cal->get_title();
    $content = tag('div', attributes('class="php-calendar ui-widget"'), userMenu(), tag('br', attrs('style="clear:both;"')), tag('h1', attrs('class="ui-widget-header"'), create_dropdown_list(tag('a', attrs("href='{$phpc_home_url}?phpcid={$phpc_cal->get_cid()}'", 'class="phpc-dropdown-list-title"'), $calendar_title), $list)), display_phpc());
} catch (Exception $e) {
    $calendar_title = $e->getMessage();
    $content = tag('div', attributes('class="php-calendar"'), $e->getMessage());
}
$html = tag('html', attrs("lang=\"{$phpc_lang}\""), tag('head', tag('title', $calendar_title), tag('link', attrs('rel="icon"', "href=\"static/office-calendar.png\"")), get_header_tags("static"), tag('meta', attrs('http-equiv="Content-Type"', 'content="text/html; charset=UTF-8"'))), tag('body', $content));
echo '<!DOCTYPE html>', "\n", $html->toString();