" class="help" onclick="window.open( 'help_pref.php', 'cal_help', 'dependent,menubar,scrollbars,height=400,width=400,innerHeight=420,outerWidth=420' );" /></h2>


<form action="<?php 
echo htmlspecialchars($formaction);
?>
" method="post" onsubmit="return valid_form( this );" name="prefform">
<input type="hidden" name="currenttab" id="currenttab" value="<?php 
echo $currenttab;
?>
" />
<?php 
if ($user) {
    echo "<input type=\"hidden\" name=\"user\" value=\"{$user}\" />\n";
}
echo display_admin_link();
?>
<input type="submit" value="<?php 
etranslate('Save Preferences');
?>
" name="" />
&nbsp;&nbsp;&nbsp;
<?php 
if ($updating_public) {
    ?>
 <input type="hidden" name="public" value="1" />
<?php 
}
/*if ( $updating_public )*/
// If user is admin of a non-user cal, and non-user cal is "public"
// (meaning it is a public calendar that requires no login), then allow
示例#2
0
print_header($GROUPS_ENABLED == 'Y' ? array('js/assistant_edit.php/true') : '');
ob_start();
echo '
    <form action="assistant_edit_handler.php" method="post" ' . 'name="assistanteditform">' . ($user ? '
      <input type="hidden" name="user" value="' . $user . '" />' : '') . '
      <h2>';
$assistStr = translate('Assistants');
if ($is_nonuser_admin) {
    nonuser_load_variables($user, 'nonuser');
    echo $nonuserfullname . ' ' . $assistStr . '<br />
      -- ' . translate('Admin mode') . ' --';
} else {
    echo translate('Your assistants');
}
echo '</h2>
      ' . display_admin_link() . '
      <table>
        <tr>
          <td class="aligntop"><label for="users">' . $assistStr . ':</label></td>
          <td>
            <select name="users[]" id="users" size="10" multiple="multiple">';
// Get list of all users.
$users = get_my_users();
// Get list of users for this view.
$res = dbi_execute('SELECT cal_boss, cal_assistant FROM webcal_asst
   WHERE cal_boss = ?', array($user));
if ($res) {
    while ($row = dbi_fetch_row($res)) {
        $assistantuser[$row[1]] = 1;
    }
    dbi_free_result($res);
function generate_activity_log($id = '', $sys = false, $startid = '')
{
    global $GENERAL_USE_GMT, $nextpage, $PAGE_SIZE;
    $nextpage = '';
    $size = $id ? 'h3' : 'h2';
    $sql_params = array();
    if (!empty($id)) {
        $sql_params[] = $id;
    }
    $sql_params[] = $startid;
    $ret = "<{$size}>" . ($sys ? translate('System Log') : translate('Activity Log')) . ($sys ? '' : ' &nbsp;<a href="rss_activity_log.php">' . '<img src="images/rss.png" width="14" height="14" alt="RSS 2.0 - ' . translate('Activity Log') . '" border="0"/></a>') . "</{$size}>" . display_admin_link() . '
    <table class="embactlog">
      <tr>
        <th class="usr">' . translate('User') . '</th>
        <th class="cal">' . translate('Calendar') . '</th>
        <th class="scheduled">' . translate('Date') . '/' . translate('Time') . '</th>' . ($sys || $id ? '' : '
        <th class="dsc">' . translate('Event') . '</th>') . '
        <th class="action">' . translate('Action') . '</th>
      </tr>';
    $sql = 'SELECT wel.cal_login, wel.cal_user_cal, wel.cal_type, wel.cal_date,
    wel.cal_time, wel.cal_text, ' . ($sys ? 'wel.cal_log_id FROM webcal_entry_log wel WHERE wel.cal_entry_id = 0' : 'we.cal_id, we.cal_name, wel.cal_log_id, we.cal_type
      FROM webcal_entry_log wel, webcal_entry we
      WHERE wel.cal_entry_id = we.cal_id') . (empty($id) ? '' : ' AND we.cal_id = ?') . (empty($startid) ? '' : ' AND wel.cal_log_id <= ?') . ' ORDER BY wel.cal_log_id DESC';
    $res = dbi_execute($sql, $sql_params);
    if ($res) {
        $num = 0;
        while ($row = dbi_fetch_row($res)) {
            $l_login = $row[0];
            $l_user = $row[1];
            $l_type = $row[2];
            $l_date = $row[3];
            $l_time = $row[4];
            $l_text = $row[5];
            if ($sys) {
                $l_id = $row[6];
            } else {
                $l_eid = $row[6];
                $l_ename = $row[7];
                $l_id = $row[8];
                $l_etype = $row[9];
            }
            $num++;
            if ($num > $PAGE_SIZE) {
                $nextpage = $l_id;
                break;
            } else {
                $ret .= '
      <tr' . ($num % 2 ? ' class="odd"' : '') . '>
        <td>' . $l_login . '</td>
        <td>' . $l_user . '</td>
        <td>' . date_to_str($l_date) . '&nbsp;' . display_time($l_date . $l_time, !empty($GENERAL_USE_GMT) && $GENERAL_USE_GMT == 'Y' ? 3 : 2) . '</td>
        <td>' . (!$sys && !$id ? '<a title="' . htmlspecialchars($l_ename) . '" href="view_entry.php?id=' . $l_eid . '">' . htmlspecialchars($l_ename) . '</a></td>
        <td>' : '') . display_activity_log($l_type, $l_text) . '</td>
      </tr>';
            }
        }
        dbi_free_result($res);
    }
    return $ret . '
    </table>';
}
示例#4
0
文件: report.php 项目: rhertzog/lcs
    exit;
}
$adminLinkStr = $manageStr = $nextLinkStr = $prevLinkStr = $textStr = '';
$nextStr = translate('Next');
$prevStr = translate('Previous');
$reportNameStr = $include_header ? '
    <h2>' . $report_name . '</h2>' : '';
if (!empty($report_allow_nav) && $report_allow_nav == 'Y') {
    $temp = '" href="report.php?report_id=' . $report_id . $u_url . '&amp;offset=';
    $nextLinkStr = $prevLinkStr = '
    <a class="nav" title="';
    $nextLinkStr .= $nextStr . $temp . $next . '">' . $nextStr . '</a>';
    $prevLinkStr .= $prevStr . $temp . $prev . '">' . $prevStr . '</a>&nbsp;&nbsp;';
}
if (empty($list)) {
    $textStr = str_replace('${days}', $day_str, str_replace('${report_id}', $report_id, $page_template));
    $trailerStr = print_trailer($include_header);
} else {
    $adminLinkStr = display_admin_link();
    $manageStr = '
    <h2>' . ($updating_public ? translate($PUBLIC_ACCESS_FULLNAME) . ' ' : '') . translate('Manage Reports') . '</h2>';
    $trailerStr = print_trailer();
}
echo <<<EOT
{$reportNameStr}{$prevLinkStr}{$nextLinkStr}{$manageStr}
    {$adminLinkStr}{$list}
    {$textStr}
    {$printerStr}
    {$trailerStr}
EOT
;
    }
}
print_header('', '', !empty($op['time']) && $op['time'] == 'Y' ? 'onload="enableAll( true );"' : '');
echo print_success($saved);
if (!empty($guser) && $is_admin) {
    user_load_variables($guser, 'user_');
}
ob_start();
if ($is_admin) {
    $adminStr = translate('Admin');
    $userlist = get_my_users();
    $nonuserlist = get_nonuser_cals();
    // If we are here... we must need to print out a list of users.
    echo '
    <h2>' . translate('User Access Control') . (!empty($user_fullname) ? ': ' . $user_fullname : '') . '</h2>
    ' . display_admin_link(false) . '
    <form action="access.php" method="post" name="SelectUser">
      <select name="guser" onchange="document.SelectUser.submit()">' . '
        <option value="__default__"' . ($guser == '__default__' ? $selected : '') . '>' . $defConfigStr . '</option>';
    for ($i = 0, $cnt = count($userlist); $i < $cnt; $i++) {
        echo '
        <option value="' . $userlist[$i]['cal_login'] . '"' . ($guser == $userlist[$i]['cal_login'] ? $selected : '') . '>' . $userlist[$i]['cal_fullname'] . '</option>';
    }
    for ($i = 0, $cnt = count($nonuserlist); $i < $cnt; $i++) {
        echo '
        <option value="' . $nonuserlist[$i]['cal_login'] . '"' . ($guser == $nonuserlist[$i]['cal_login'] ? $selected : '') . '>' . $nonuserlist[$i]['cal_fullname'] . ' ' . ($nonuserlist[$i]['cal_is_public'] == 'Y' ? '*' : '') . '</option>';
    }
    echo $goStr;
}
//end admin $guser != default test
if (!empty($guser) || !$is_admin) {
示例#6
0
文件: layers.php 项目: rhertzog/lcs
$areYouSureStr = translate('Are you sure you want to delete this XXX?');
$sourceStr = translate('Source');
$colorStr = translate('Color');
$duplicatesStr = translate('Duplicates');
$noStr = translate('No');
$yesStr = translate('Yes');
$disabledStr = translate('Disabled');
$enableLayersStr = translate('Enable layers');
print_header();
ob_start();
if ($ALLOW_VIEW_OTHER != 'Y') {
    echo print_not_auth(7);
} else {
    echo '
    <h2>' . ($updating_public ? translate($PUBLIC_ACCESS_FULLNAME) . '&nbsp;' : '') . translate('Layers') . '&nbsp;<img src="images/help.gif" alt="' . translate('Help') . '" class="help" onclick="window.open( ' . '\'help_layers.php\', \'cal_help\', \'dependent,menubar,scrollbars,' . 'height=400,width=400,innerHeight=420,outerWidth=420\' );" /></h2>
    ' . display_admin_link() . translate('Layers are currently') . '&nbsp;<strong>';
    if ($layers_enabled) {
        echo translate('Enabled') . '</strong>. (<a class="nav" ' . 'href="layers_toggle.php?status=off' . $u_url . '">' . translate('Disable Layers') . '</a>)<br />' . ($is_admin && empty($public) && (!empty($PUBLIC_ACCESS) && $PUBLIC_ACCESS == 'Y') ? '
    <blockquote>
      <a href="layers.php?public=1">' . translate('Click here') . '&nbsp;' . translate('to modify the layers settings for the') . '&nbsp;' . translate($PUBLIC_ACCESS_FULLNAME) . '&nbsp;' . translate('calendar') . '.</a>
    </blockquote>' : '') . '
    <a href="edit_layer.php' . ($updating_public ? '?public=1' : '') . '">' . translate('Add layer') . '</a><br />';
        $layer_count = 1;
        if ($layers) {
            foreach ($layers as $layer) {
                user_load_variables($layer['cal_layeruser'], 'layer');
                echo '
    <div class="layers" style="color: ' . $layer['cal_color'] . '">
      <h4>' . $layerStr . '&nbsp;' . $layer_count . '
        (<a title="' . $editLayerStr . '" href="edit_layer.php?id=' . $layer['cal_layerid'] . $u_url . '">' . $editStr . '</a> /
        <a title="' . $deleteLayerStr . '" href="del_layer.php?id=' . $layer['cal_layerid'] . $u_url . '" onclick="return confirm( \'' . str_replace('XXX', $layerStr, $areYouSureStr) . '\' );">' . $deleteStr . '</a>)</h4>