2 // Copyright (C) 2011 Tony McCormick <tony@mi-squared.com>
3 // Brady Miller <brady@sparmy.com>
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // Open websearch for patient education materials
12 //SANITIZE ALL ESCAPES
13 $sanitize_all_escapes=true;
16 //STOP FAKE REGISTER GLOBALS
17 $fake_register_globals=false;
20 //Include required scripts/libraries
21 require_once("../globals.php");
24 // Reference website links
26 'Medline' => 'http://vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta?v%3Aproject=medlineplus&query=[%]&x=12&y=15',
27 'eMedicine' => 'http://search.medscape.com/reference-search?newSearchHeader=1&queryText=[%]',
28 'WebMD' => 'http://www.webmd.com/search/search_results/default.aspx?query=[%]&sourceType=undefined'
32 $form_lookup_at = (isset($_POST['form_lookup_at'])) ?
$_POST['form_lookup_at'] : '';
33 $form_diagnosis = (isset($_POST['form_diagnosis'])) ?
$_POST['form_diagnosis'] : '';
38 <?php
html_header_show();?
>
39 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
40 <script type
="text/javascript" src
="../../library/js/jquery.1.3.2.js"></script
>
42 <script type
="text/javascript">
43 function searchResultsPopup(search_term
,link
) {
44 link_formatted
= link
.replace("[%]",encodeURIComponent(search_term
));
46 window
.open(link_formatted
);
50 <title
><?
echo htmlspecialchars( xl('Find Patient Education Materials'), ENT_NOQUOTES
); ?
></title
>
53 <body
class="body_top">
55 <span
class='title'><?php
echo htmlspecialchars( xl('Web Search'), ENT_NOQUOTES
); ?
> - <?php
echo htmlspecialchars( xl('Patient Education Materials'), ENT_NOQUOTES
); ?
></span
>
57 <form method
='post' action
='patient_edu_web_lookup.php' id
='theform' onsubmit
='return top.restoreSession()'>
59 <div id
="report_parameters">
64 <div style
='float:left'>
68 <?php
echo htmlspecialchars( xl('Search in'), ENT_NOQUOTES
);
70 echo "<select name='form_lookup_at'>\n";
71 foreach ($websites as $key => $value) {
72 echo " <option value='" . htmlspecialchars($key, ENT_QUOTES
) . "'";
73 if ($key == $form_lookup_at) echo ' selected';
74 echo ">" . htmlspecialchars( xl($key), ENT_NOQUOTES
) . "</option>\n";
81 <input type
='text' name
='form_diagnosis' size
='60' value
='<?php echo htmlspecialchars($form_diagnosis, ENT_QUOTES); ?>'
82 title
='<?php echo htmlspecialchars( xl('Search Text
'), ENT_QUOTES); ?>'>
90 <td align
='left' valign
='middle' height
="100%">
91 <table style
='border-left:1px solid; width:100%; height:100%' >
94 <div style
='margin-left:15px'>
95 <a href
='#' class='css_button' onclick
='$("#theform").submit();'>
97 <?php
echo htmlspecialchars( xl('Submit'), ENT_NOQUOTES
); ?
>
109 </div
> <!-- end of parameters
-->
113 echo htmlspecialchars( xl('Please input search criteria above, and click Submit to view results. (Results will be displayed in a pop up window)'), ENT_NOQUOTES
);
117 <?php
if (!empty($form_diagnosis) && !empty($form_lookup_at)) { ?
>
118 <script type
="text/javascript">
119 searchResultsPopup('<?php echo addslashes($form_diagnosis); ?>','<?php echo addslashes($websites[$form_lookup_at]) ?>');