//Query failed
    } else {
        print "<p><b>{$lang['global_01']}{$lang['colon']}</b> {$lang['calendar_popup_28']}</p>";
        if (SUPER_USER) {
            print db_error() . "<br>QUERY:<br>{$sql}";
        }
    }
    /**
     * DISPLAY CONFIRMATION THAT CALENDAR EVENT WAS DELETED
     */
} elseif (isset($_GET['cal_id']) && is_numeric($_GET['cal_id']) && !empty($_POST) && isset($_POST['deleteCalEv'])) {
    //Query to delete calendar event
    $sql = "delete from redcap_events_calendar where cal_id = " . $_GET['cal_id'];
    //Logging
    log_event($sql, "redcap_events_calendar", "MANAGE", $_GET['cal_id'], calLogChange($_GET['cal_id']), "Delete calendar event");
    //Run query after logging because values will be deleted
    db_query($sql);
    //Show confirmation
    print "<div style='color:red;padding:30px 0 0 15px;margin-bottom:10px;font-weight:bold;font-size:16px;'>\n\t\t\t\t{$lang['calendar_popup_29']}<br><br><br>\n\t\t\t</div>";
    //Render javascript to refresh calendar underneath and close pop-up
    print "<script type='text/javascript'>\n\t\t\twindow.opener.location.reload();\n\t\t\tsetTimeout(function(){self.close();},2500);\n\t\t\t</script>";
}
/**
 * PAGE FOOTER
 */
callJSfile('Calendar.js');
$_GET['width'] = isset($_GET['width']) && is_numeric($_GET['width']) && $_GET['width'] < 1200 ? $_GET['width'] : 800;
print "</div>\n\t\t<script type='text/javascript'>\n\t\t\$(function(){\n\t\t\t// Resize window to fit contents\n\t\t\tvar maxh = window.screen.height - 100;\n\t\t\tvar divh = document.getElementById('bodydiv').offsetHeight + 130;\n\t\t\tvar newh = (divh > maxh) ? maxh : divh;\n\t\t\twindow.resizeTo({$_GET['width']},newh);\n\t\t\t// Load calendar pop-up\n\t\t\t\$('#newdate').datepicker({buttonText: 'Click to select a date',yearRange: '-100:+10',changeMonth: true, changeYear: true, dateFormat: user_date_format_jquery});\t\t\t\t\t\t\n\t\t\t// Pop-up time-select initialization\n\t\t\t\$('.time').timepicker({hour: currentTime('h'), minute: currentTime('m'), timeFormat: 'hh:mm'});\n\t\t});\n\t\t</script>";
?>
</body>
</html>
Esempio n. 2
0
    // If report name is NULL, then user doesn't have Report Builder rights AND doesn't have access to this report
    if ($report_name === null) {
        $html .= RCView::div(array('class' => 'red'), $lang['global_01'] . $lang['colon'] . " " . $lang['data_export_tool_180']);
    } else {
        // Display progress while report loads via ajax
        $html .= RCView::div(array('id' => 'report_load_progress', 'style' => 'display:none;margin:5px 0 25px 20px;color:#777;font-size:18px;'), RCView::img(array('src' => 'progress_circle.gif', 'class' => 'imgfix2')) . $lang['report_builder_60'] . " \"" . RCView::span(array('style' => 'color:#800000;font-size:18px;'), $report_name) . "\"" . RCView::span(array('id' => 'report_load_progress_pagenum_text', 'style' => 'display:none;margin-left:10px;color:#777;font-size:14px;'), "({$lang['global_14']} " . RCView::span(array('id' => 'report_load_progress_pagenum'), '1') . ")")) . RCView::div(array('id' => 'report_load_progress2', 'style' => 'display:none;margin:5px 0 0 20px;color:#999;font-size:18px;'), RCView::img(array('src' => 'hourglass.png', 'class' => 'imgfix2')) . $lang['report_builder_115']);
        // Div where report will go
        $html .= RCView::div(array('id' => 'report_parent_div', 'style' => ''), '');
    }
}
// Header
include APP_PATH_DOCROOT . 'ProjectGeneral/header.php';
print RCView::div(array('style' => 'max-width:750px;margin-bottom:10px;'), RCView::div(array('style' => 'color: #800000;font-size: 16px;font-weight: bold;float:left;'), "Longitudinal Reports") . RCView::div(array('class' => 'clear'), ''));
// JavaScript files
callJSfile('jquery_tablednd.js');
callJSfile('../../' . LR_PATH_FROM_WEBROOT . 'LongitudinalReports.js');
// Hidden dialog to choose export format
$html .= LongitudinalReports::renderExportOptionDialog();
/*// Hidden dialog for Shared Library manuscript citation
if ($Proj->formsFromLibrary()) {
	$html .= "<!-- Hidden citation for Shared Library manuscript -->
			<div class='simpleDialog' style='font-size:13px;' id='rsl_cite' title='".cleanHtml($lang['data_export_tool_146'])."'>
				Jihad S. Obeid, Catherine A. McGraw, Brenda L. Minor, Jos&eacute; G. Conde, Robert Pawluk, Michael Lin, Janey Wang, Sean R. Banks, Sheree A. Hemphill, Rob Taylor, Paul A. Harris, 
				<b>Procurement of shared data instruments for Research Electronic Data Capture (REDCap)</b>, Journal of Biomedical Informatics, Available online 10 November 2012, ISSN 1532-0464, 10.1016/j.jbi.2012.10.006.
				(<a target='_blank' style='text-decoration:underline;' href='http://www.sciencedirect.com/science/article/pii/S1532046412001608'>http://www.sciencedirect.com/science/article/pii/S1532046412001608</a>)
			</div>";
}*/
?>
<style type="text/css">
.ui-autocomplete {
	max-height: 200px;