$pathway_mapper =  "<div style='padding-bottom:5px;'>
							<a href='".APP_PATH_WEBROOT."DataExport/sas_pathway_mapper.php?pid=$project_id'
							><img src='".APP_PATH_IMAGES."download_pathway_mapper.gif'></a> &nbsp; 
						</div>";
}
*/
## NOTICES FOR CITATIONS (GRANT AND/OR SHARED LIBRARY) AND DATE-SHIFT NOTICE
//Do not display grant statement unless $grant_cite has been set for this project.
$citationText = "";
if ($grant_cite != "") {
    $citationText .= "{$lang['data_export_tool_77']} {$site_org_type} {$lang['data_export_tool_78']} <b>({$grant_cite})</b> \n\t\t\t\t\t   {$lang['data_export_tool_79']}\n\t\t\t\t\t   <div style='padding:8px 0 0;'>{$lang['data_export_tool_80']}";
} else {
    $citationText .= "<div>" . $lang['data_export_tool_81'];
}
$citationText .= " " . $lang['data_export_tool_82'] . " <a href='http://projectredcap.org/cite.php' target='_blank' style='text-decoration:underline;'>{$lang['data_export_tool_83']}</a>){$lang['period']}</div>";
// If instruments have been downloaded from the Shared Library, provide citatation
if ($Proj->formsFromLibrary()) {
    $citationText .= "<div style='padding:8px 0 0;'>\n\t\t\t\t\t\t{$lang['data_export_tool_144']}\n\t\t\t\t\t\t<a href='javascript:;' style='text-decoration:underline;' onclick=\"simpleDialog(null,null,'rsl_cite',550);\">{$lang['data_export_tool_145']}</a>\n\t\t\t\t\t  </div>";
}
if ($citationText != '') {
    $citationText = RCView::fieldset(array('style' => 'margin-top:10px;padding-left:8px;background-color:#FFFFD3;border:1px solid #FFC869;color:#800000;'), RCView::legend(array('style' => 'font-weight:bold;'), $lang['data_export_tool_147']) . RCView::div(array('style' => 'padding:5px 8px 8px 2px;'), $citationText));
}
// If dates were date-shifted, give note of that.
$dateShiftText = "";
if ($dateShiftDates) {
    $dateShiftText = RCView::fieldset(array('class' => 'red', 'style' => 'margin-top:10px;padding:0 0 0 8px;max-width:1000px;'), RCView::legend(array('style' => 'font-weight:bold;'), $lang['global_03']) . RCView::div(array('style' => 'padding:5px 8px 8px 2px;'), "{$lang['data_export_tool_85']} {$date_shift_max} {$lang['data_export_tool_86']}"));
}
// RESPONSE
$dialog_title = RCView::img(array('src' => 'tick.png', 'style' => 'vertical-align:middle')) . RCView::span(array('style' => 'color:green;vertical-align:middle;font-size:15px;'), $lang['data_export_tool_05']);
$dialog_content = RCView::div(array('style' => 'margin-bottom:20px;'), $lang['data_export_tool_183'] . $citationText . $dateShiftText) . RCView::div(array('style' => 'background-color:#F0F0F0;border:1px solid #888;padding:10px 5px;margin-bottom:10px;'), RCView::table(array('style' => 'border-collapse:collapse;width:100%;table-layout:fixed;'), RCView::tr(array(), RCView::td(array('rowspan' => '3', 'valign' => 'top', 'style' => 'padding-left:10px;width:70px;'), RCView::img(array('src' => $docs_logo, 'title' => $docs_header))) . RCView::td(array('rowspan' => '3', 'valign' => 'top', 'style' => 'line-height:14px;border-right:1px solid #ccc;font-family:Verdana;font-size:11px;padding-right:20px;'), RCView::div(array('style' => 'font-size:14px;font-weight:bold;margin-bottom:10px;'), $docs_header) . $instr) . RCView::td(array('valign' => 'top', 'class' => 'nowrap', 'style' => 'color:#666;font-size:11px;padding:0 5px 0 10px;width:125px;'), $lang['data_export_tool_184'])) . RCView::tr(array(), RCView::td(array('valign' => 'top', 'class' => 'nowrap', 'style' => 'padding:10px 0 0 20px;'), RCView::SP . RCView::SP . RCView::SP . RCView::a(array('href' => APP_PATH_WEBROOT . "FileRepository/file_download.php?pid={$project_id}&id={$data_edoc_id}" . ($outputFormat == 'r' ? '&exporttype=R' : ($outputFormat == 'stata' ? '&exporttype=STATA' : ''))), trim(LongitudinalReports::getDownloadIcon($syntax_edoc_id == null ? $outputFormat : '', $dateShiftDates))) . $pathway_mapper)) . RCView::tr(array(), RCView::td(array('valign' => 'bottom', 'style' => 'padding-left:20px;'), $senditLinks))));
print json_encode(array('title' => $dialog_title, 'content' => $dialog_content));