<?php session_start(); require "../connect.php"; require "../includes/functions.php"; // Verify user before load content if (!authen()) { die('¡ÃØ³Ò Loing à¾×èÍà¢éÒÊÙèÃкºÍÕ¡¤ÃÑé§'); } require "header.php"; $th_year = date('Y') + 543 . date('-m-d'); $datenow = date("Y-m-d"); if (isset($_GET['do']) && $_GET['do'] == 'save') { // $ht_etc = $_POST['ht_etc']; $ht_etc = isset($_POST['ht_etc']) ? implode(',', $_POST['ht_etc']) : ''; // Retinal and Foot Exam $retinal_date = $_POST['retinal_date']; $retinal = $_POST['retinal']; $foot_date = $_POST['foot_date']; $foot = $_POST['foot']; $tooth_date = $_POST['tooth_date']; $tooth = $_POST['tooth']; $edit_date = date("Y-m-d H:i:s"); // echo "<pre>"; // var_dump($_POST); // exit; // ÍѾഷ¢éÍÁÙÅã¹µÒÃÒ§ $strSQL = "UPDATE diabetes_clinic_history SET "; $strSQL .= "dm_no = '" . $_POST["dm_no"] . "' "; $strSQL .= ",thidate = '" . $_POST["thaidate"] . "' "; $strSQL .= ",dateN = '" . $dateN . "' ";
<?php include '../bootstrap.php'; // Verify user before load content if (authen() === false) { die('Session ка╢мрбь <a href="../login_page.php">╓ет║╥уХ╧уХ</a> Ю╬вХм╥с║рцЮ╒ИрйыХцп╨╨му║╓цяИ╖'); } // ╨я╧╥ж║╒Имаые $do = input('do'); if ($do === 'save') { $dateN = date("Y-m-d"); $register = date("Y-m-d H:i:s"); $hn = input('hn', NULL); $retinal_date = input('retinal_date'); $retinal = input('retinal', NULL); $foot_date = input('foot_date'); $foot = input('foot', NULL); $tooth_date = input('tooth_date'); $tooth = input('tooth', NULL); // if ($retinal_date !== false && $retinal === NULL) { $retinal = 'No DR'; } if ($foot_date !== false && $foot === NULL) { $foot = 'Low Risk'; } if ($tooth_date !== false && $tooth === NULL) { $tooth = '1'; } $date_footcare = input('date_footcare', NULL); $date_nutrition = input('date_nutrition', NULL);
function categorylist($username, $password){ if(authen($username, $password) == 0){ echo "Login fail!"; exit(); }else{ header("Content-type: text/xml"); $sql = "select category_id, category_safe_name from ".table_prefix."categories where category_enabled = 1"; $rs = mysql_query($sql) or die(mysql_error()); $xml_output = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; $xml_output .= "<categorylist>\n"; while($row = mysql_fetch_array($rs)){ $xml_output .= " <cate><id>". $row[category_id]."</id>\n<name>".$row[category_safe_name]."</name></cate>\n"; } $xml_output .= "</categorylist>\n"; echo $xml_output; } }
<?php include 'bootstrap.php'; if(authen() === false ){ die('Session ������� <a href="login_page.php">��ԡ�����</a> ���ͷӡ���������к��ա����'); } ###### ��á�зӵ�ҧ� �� ���� ź ��� �������ա���ʴ��Ţͧ View ###### $action = input('action'); if( $action === 'save' ){ $phar_code = input('phar_code'); $author = get_session('sOfficer'); $date_add = get_date_ad(); $db = Mysql::load(); // recheck �ա�ͺ $sql = "SELECT `row_id` FROM `druglst` WHERE `drugcode` LIKE :drug_code "; $data = array(':drug_code' => "$phar_code%"); $db->select($sql, $data); $drug_rows = $db->get_rows(); $sql = "SELECT `drug_code` FROM `allergic_list` WHERE `drug_code` = :drug_code "; $data = array(':drug_code' => $phar_code); $db->select($sql, $data); $allergic_rows = $db->get_rows(); if( $drug_rows > 0 && $allergic_rows === 0 ){
<?php include 'bootstrap.php'; if( !authen() ) die ('¡ÃسÒà¢éÒÊÙèÃкº <a href="login_page.php">¤ÅÔ¡·Õè¹Õèà¾×èÍà¢éÒÊÙèÃкºÍÕ¡¤ÃÑé§</a>'); define('WARD_STAT', 1); DB::load(); /** * ¨Ñ´¡ÒâéÍÁÙÅ */ // ¡ÒáÃзӵèÒ§æ àªè¹ ºÑ¹·Ö¡, á¡éä¢, ź $action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : false; $task = isset($_REQUEST['task']) ? trim($_REQUEST['task']) : false; // ˹éÒµèÒ§¡ÒÃáÊ´§¼ÅµèÒ§æ àªè¹ ˹éÒÃÒ¡ÒÃ, ˹éÒ¿ÍÃìÁ $page = isset($_REQUEST['page']) ? trim($_REQUEST['page']) : false; // ¨Ø´¡ÒÃáÊ´§¼Åã¹Ë¹éÒ¹Ñé¹æ $view = isset($_REQUEST['view']) ? trim($_REQUEST['view']) : false; // if( !function_exists('clean_dead_hn') ){ function clean_dead_hn($post){ $dead_lists = array(); $test_count = count($post['dead_hn']); for( $i=0; $i<$test_count; $i++ ){ // skip if empty if( empty($post['dead_hn'][$i]) ) continue ;
<?php require 'bootstrap.php'; if(authen() === false ){ die('¡ÃØ³Ò Login ÍÕ¡¤ÃÑé§ <a href="../nindex.htm">¤ÅÔ¡·Õè¹Õèà¾×èÍ Login</a>'); } // Load Databse DB::load(); // Check hn and action $hn = isset($_REQUEST['hn']) ? trim($_REQUEST['hn']) : false ; $action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : false ; if( $action === 'save' ){ $now = date('Y-m-d H:i:s'); $items = $_POST['items']; $sql_drugcode = "SELECT `drugcode` FROM `druglst` WHERE `row_id` = :id"; foreach($items as $key => $item){ // ËÒ parent drug code $item_key = DB::select($sql_drugcode, array(':id' => trim($key)), true); $parent_code = trim($item_key['drugcode']); // àªç¡ parent ¨Ò¡ã¹ cross $sql = " SELECT `id`,`hn`,`children` FROM `druginteraction_cross` WHERE `hn` = '$hn' AND `parent` = '$parent_code' "; $test_parent = DB::select($sql, null, true);
<?php include 'bootstrap.php'; if(authen() === false ){ die('Session ка╢мрбь <a href="login_page.php">╓ет║╥уХ╧уХ</a> Ю╬вХм╥с║рцЮ╒ИрйыХцп╨╨му║╓цяИ╖'); } define('_SURVEY', 1); // Load Databse DB::load(); $db = Mysql::load(); // $db->set_charset('UTF8'); $task = isset($_REQUEST['task']) ? trim($_REQUEST['task']) : false ; $action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : false ; $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : false ; $hn = isset($_REQUEST['hn']) ? trim($_REQUEST['hn']) : false ; $th_date = ( date('Y')+543 ).date('-m-d'); // $full_months = array("а║цр╓а" => "01" ,"║ьаюр╬я╧╦Л" => "02", "ау╧р╓а" => "03" , "Юаирб╧" => "04" ,"╬диюр╓а" => "05" ,"ат╤ь╧рб╧" => "06" , "║ц║╝р╓а" => "07" , "йт╖кр╓а" => "08" , "║я╧брб╧" => "09" , "╣ьер╓а" => "10" , "╬дх╗т║рб╧" => "11" , "╦я╧гр╓а" => "12" ); $full_months = array( "01" => "а║цр╓а", "02" => "║ьаюр╬я╧╦Л", "03" => "ау╧р╓а", "04" => "Юаирб╧", "05" => "╬диюр╓а", "06" => "ат╤ь╧рб╧", "07" => "║ц║╞р╓а", "08" => "йт╖кр╓а", "09" => "║я╧брб╧", "10" => "╣ьер╓а", "11" => "╬дх╗т║рб╧",