## ============================================= ## ## ============================================= ##

Hello from ". $_SERVER['SERVER_NAME'] ." Located at ". $_SERVER['SERVER_ADDR'] ."

//

Click for MedPix Home Page

Click for MedPix Home Page

NOTE: We have re-built the MedPix system onto a new webserver.
Major functionality has been restored - but if you find something broken, please send me a message -
Contact MedPix
Thanks!

Contact MedPix Chief Editor

## =========================================== ## ## CONTACT THE WEBMASTER ##

USUHS Homepage and Webmaster

Contact the USU Webmaster


## ============================================= ## ## DISPLAY SERVER CONFIGURATION ## ## if ($display_config == -1) phpinfo(); ## ============================================= ## ## EXTRACT VALUES FROM AN ARRAY ## ## ============================================= ## /* extract($_GET,EXTR_IF_EXISTS); extract($_POST,EXTR_IF_EXISTS); */ /* extract ( $_GET, EXTR_SKIP); extract ( $_POST, EXTR_SKIP); */ ## ============================================================= ## ## EXTRACT AND CLEAN VARIABLES FROM URL (GET) AND FORMS (POST) ## ## ============================================================= ## /* function clean($elem){ start function if(is_array($elem)) foreach ($elem as $key => $value) $elem[$key] = htmlentities($elem[$key]); return $elem; } clean($_GET); extract ( $_GET, EXTR_SKIP); clean($_POST); extract ( $_POST, EXTR_SKIP); */ include('include/clean_query_variables.php'); # ============================================================== ## ## EXTRACT AND CLEAN VARIABLES FROM URL (GET) AND FORMS (POST) ## ## ============================================================= ## ## ============================================= ##
You asked me to print this using $_GET[array]: echo $_GET["printext"]; ## ============================================= ##
if (!$printext) $printext = 'The VALUE of this variable [ $printext ] is [ NULL ]'; You asked me to print this from a variable: echo $printext; ## ============================================= ## ## CONNECT TO THE DATABASE ## ## ============================================= ## ## ============================================================= ## /* DATABASE CONNECTION include_once('include/medpix_db_connect.php3'); */ ## ================================================================================= ## ## MAKE CONNECTION TO THE DATABASE ## $db = @pg_connect("host=localhost user=nobody dbname=synapse"); ## ================================================================================= ##
if (!$db){

The MedPix Database is Offline

} else {

Reading the MedPix Database:
Display Current Inventory

## ============================================= ## ## READ DATABASE FOR INVENTORY TOTALS ## ## ============================================= ## $result=pg_exec($db,"select pk from card"); if ($result==0) dieugly(__FILE__,__LINE__,"failed retrieving userdata in default"); $num_cards = pg_numrows($result); TOTAL Topics: $num_cards pg_freeresult($result); $result=pg_exec($db,"select pk from submissions "); if ($result==0) dieugly(__FILE__,__LINE__,"failed retrieving userdata in default"); $num_submissions = pg_numrows($result);
TOTAL Submitted: $num_submissions pg_freeresult($result); $result = pg_exec($db,"select imageid from images"); if ($result==0) dieugly(__FILE__,__LINE__,"failed retrieving userdata in default"); $num_pics = pg_numrows($result);
TOTAL Images: $num_pics pg_freeresult($result); $result = pg_exec($db,"select pt_id from pt_info"); if ($result==0) dieugly(__FILE__,__LINE__,"failed retrieving userdata in default"); if ($result) $num_pts = pg_numrows($result);
TOTAL Patients: $num_pts if ($result) pg_freeresult($result); } // END IFDATABASE;

## ============================================= ## ## LOAD A SAMPLE PICTURE ## ## ============================================= ## if (!$imageid) $imageid=26;

SAMPLE PICTURE: Image ID $imageid

Image Caption below pi[ CLICK ] for Next :: Click for True Size (disabled) Image $imageid if ($imageid==26)

You should see a picture of the USS Enterprise Crew

## GRAYSCALE FOR MONITOR CALIBRATION ## ## ============================================= ##
You asked me to print this using $_GET: echo $_GET["printext"]; ## ============================================= ##