Location: PHPKode > projects > TherapyDoc > therapydoc_1.3.1_3/view/referrals/prepare_conversion.php
<?php
session_start();
if(!$_SESSION['myusername']){
	header("location:../../index.php");
}
header("Cache-Control: no-cache");
header("Pragma: no-cache");
header("Expires: ".gmdate("D, d M Y H:i:s",time()+(-1*60))." GMT");
header('Content-type: text/html; charset=utf-8');

include 'globals.inc';
require_once "include_b.php";

$_SESSION['review']="SELECT r.referral_id AS rid,CONCAT(r.fname,' ',r.lname) AS name,CONCAT(p.fname,' ',p.lname) AS pname, r.date AS rdate, r.city AS rcity,
CONCAT(IF(r.pt='1','PT',''),IF(r.ot='1',' OT',''),IF(r.st='1',' ST','')) AS disciplines
FROM tbl_referral_info AS r	LEFT JOIN tbl_physician AS p ON r.physician_id = p.physician_id WHERE r.reviewed = 1 AND r.patient='0' ORDER BY name";
?>
<html>
<head>
<script type="text/javascript" src="../../classes/therapydoc/menu.js"></script>
<script src="../../classes/rico21/src/prototype.js" type="text/javascript"></script>
<script src="../../classes/rico21/src/rico.js" type="text/javascript"></script>
<script type="text/javascript">
Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');
	Rico.onLoad(function() {
	  var review_buffer = new Rico.Buffer.AjaxSQL('../../classes/therapydoc/physician/xml_maker.php');
	  

//---- Context Menu----
	  function reviewMenu(grid,r,c,onBlankRow) {
		  var id=review_buffer.getWindowValue(r,0)
		  if (review_buffer.getWindowValue(r,c) !== null)
		    grid.menu.addMenuItem("View Details", detail);
		    
		    function detail() {
		    	window.location = "referral_detail.php?referral_id="+id+"&&mp=1";
			    	
		    }
		 }
		
	  var grid_options = { prefetchBuffer: true,
			  			   hdrIconsFirst: true,
			  			   FilterLocation: -1,  
			  			   sortAscendImg: 'sort_asc.gif',
			  			   sortDescendImg: 'sort_desc.gif',
			  			   highlightElem: 'cursorRow',
			  			   scrollBarWidth: 20,
			  			   minPageRows: 15,
			  			   maxPageRows: 20,
			  			   columnSpecs: [{width:50},{filterUI:'t',width:200},
			  			  			     {filterUI: 't',width:200},
			  			  			     {width:88},
			  			  			     {filterUI:'t',width:130},
			  			  			     {filterUI:'t2',width:80},
			  			  			     {width:50},{width:40}],
			  			   menuEvent: 'contextmenu'
			  };
	   
	  var grid = new Rico.LiveGrid('review', review_buffer, grid_options);
		grid.menu=new Rico.GridMenu();
		grid.menu.options.dataMenuHandler=reviewMenu;
	});
</script>
<link href="../../CSS/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper"><?php include '../../classes/therapydoc/menu.php';?>
<div class="txt">
<h1>Convert Referrals to Patients</h1>
</div>
<table id="wrapper_table" class="plain">
	<tr>
	<td><table id="table1" class="plain" width="850"><tr><td class="center">
	<?php
				echo "<p class='ricoBookmark'><span id='review_bookmark'> </span></p>		
				<table width='1024' id='review'><tr>
				<th>ID</th>
				<th>Referral Name</th>
    			<th>Physician Name</th>
    			<th>Referral Date</th>
    			<th>Referral City</th>
    			<th>Disciplines</th><th></th><th></th></tr></table></td></tr></table></td></tr></table></td></tr>";
				?>
</table>
</div>
</body>
</html>
Return current item: TherapyDoc