Пример #1
0
	function input_hn($hn){
		include("connect.inc");
		$this->hn = $hn;
		$this->Thaidate = date("d-m-").(date("Y")+543);
		$sql = "Select vn, kew, toborow From opday where thdatehn = '".$this->Thaidate.$this->hn."' Order by row_id DESC limit 0,1";
		$result = Mysql_Query($sql);
		list($this->vn, $this->kew, $this->toborow) = Mysql_fetch_row($result);
		
		$sql = "Select yot, name, surname, idcard, ptright, dbirth, idguard, inrxform, note From opcard where hn = '".$this->hn."'  limit 0,1";
		list($yot, $name, $surname,$this->idcard,$this->ptright, $dbirth, $this->idguard, $this->inrxform, $this->note) = Mysql_fetch_row(Mysql_Query($sql));
		$this->ptname = $yot." ".$name." ".$surname;
		$this->age = $this->calcage($dbirth);
		
		if( $this->inrxform != ""){
			
			if($this->inrxform == "¼Ùé»èÇ¡ÅØèÁàÊÕ觵éͧä´éÃѺ¡ÒéմÇѤ«Õ¹»éͧ¡Ñ¹âää¢éËÇÑ´ãË­è(¿ÃÕ)")
				$this->inrxform .= "<BR>Influza Vaccine 0.5 ml. IM";

			$this->inrxform = "<table width='210' border='0'><TR><TD align='center'>".$this->inrxform;
			$this->inrxform .= "<TD></TR></Table>";
		}
		
		$sql = "Select tradname, advreact  From drugreact where hn = '".$this->hn."' ";
		$result = Mysql_Query($sql);
		
		if(Mysql_num_rows($result) > 0){
			$this->drugreact = "<Table width='210' border='0'><TR><TD colspan='2'><U><B>á¾éÂÒ</B></U></TD></TR>";
				while($arr = Mysql_fetch_assoc($result)){
					$this->drugreact .= "<TR><TD>ÂÒ:".$arr["tradname"]."<BR>ÍÒ¡ÒÃ:".$arr["advreact"]."</TD></TR>";
				}
			$this->drugreact .= "</Table>";
			}
		include("unconnect.inc");
	}
Пример #2
0
Файл: db.fce.php Проект: GE3/GE3
function zjistiZ($tabulka, $udaj, $podminka)
{
    $dotaz = Db_query("SELECT {$udaj} FROM {$tabulka} WHERE {$podminka}");
    $radek = @Mysql_fetch_assoc($dotaz);
    if (!mysql_error()) {
        return $radek[$udaj];
    }
    if (mysql_error()) {
        return False;
    }
}
Пример #3
0
                <Option value="" selected></Option>
                <Option value="1">Ю╓бЦ╙ИбрЦ╧╨я╜╙убркея║ар║Хм╧</Option>
                <Option value="2">ДаХаубрЦ╧╨я╜╙убркея║АкХ╖╙р╣т</Option>
                </SELECT>
    </TD>
</TR>
<TR>
	<TD align="center" colspan="2"><INPUT id="form_submit" TYPE="submit" value="   ╣║е╖    " onClick="checkForm1();" onKeyPress="if(event.keyCode == 13) checkForm1(); return false;" onKeyDown="if(event.keyCode == 38){document.form1.drug_slip.focus();}">&nbsp;<INPUT TYPE="button" value="б║Юет║" onClick="document.getElementById('drug_code').value='';document.getElementById('drug_amount').value='';document.getElementById('drug_slip').value='';document.getElementById('addoredit').value='E';">
	</TD>
</TR>
</TABLE>
<?php 
$sql = " Select row_id, item, stkcutdate From dphardep where hn = '".$_SESSION["hn_now"]."' AND whokey = 'DR' AND idname='".$_SESSION["dt_doctor"]."' AND date like '".((date("Y")+543).date("-m-d"))."%' Order by row_id DESC limit 1 ";
	$result = Mysql_Query($sql);
	if(mysql_num_rows($result) >0 ){
		$arr = Mysql_fetch_assoc($result);

		if($arr["stkcutdate"] == "00:00:00" || $arr["stkcutdate"] == ""){
			$onclick = "listdrugprov();";
		}else{
			$onclick = "alert('црб║рцбрД╢И╤ы║╣я╢й╣Йм║АеИг ЦкИ╪ыИ╩Хгбб║Юет║црб║рцбр╥уХкИм╖бр║Хм╧ ╗ж╖╗пйрарц╤╩ця╨╩ць╖црб║рцбрД╢И');";
		}

		echo "<CENTER><A HREF=\"#\" onclick=\"".$onclick."\">б║Юет║/А║ИД╒црб║рц╓цяИ╖еХрйь╢</A></CENTER><BR>";
	}?>

	</TD>
</TR>
</TABLE>
<INPUT TYPE="hidden" id="addoredit" name="addoredit" value="E">
</FORM>
Пример #4
0
	if(Mysql_num_rows($result) > 0){
		echo "<br><Div style=\"position: absolute;text-align: left; width:650px; height:300px; overflow:auto; \">";
	
		echo "<TABLE border=\"1\" bordercolor=\"#336600\" cellpadding=\"0\" cellspacing=\"0\"width=\"100%\">
		<TR>
			<TD>
			<table bgcolor=\"#FFFFCC\" width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\">
			<tr align=\"center\" bgcolor=\"#336600\">
				<td ><font style=\"color: #FFFFFF\"><strong>���� þ.</strong></font></td>
				<td ><font style=\"color: #FFFFFF\"><strong>���� þ.</strong></font></td>
				<td width=\"50\" bgcolor=\"#FF0000\"><font style=\"color: #000000\"><strong><A HREF=\"javascript:void(0);\" Onclick=\"document.getElementById('list3').innerHTML ='';\">�Դ</A></strong></font></td>
			</tr>";


		$i=1;
		while($arr = Mysql_fetch_assoc($result)){
				
			

				if($i%2==0)
					$bgcolor="#FFFFFF";
				else
					$bgcolor="#FFFFCC";

echo "<tr bgcolor=\"$bgcolor\" >
						<td  align=\"center\"><A HREF=\"javascript:void(0);\" Onclick=\"document.getElementById('".$_GET["getto1"]."').value = '".$arr["hospcode"].'-'.$arr["hosptype"].' '.$arr["name"]."';document.getElementById('list3').innerHTML ='';\">",$arr["hospcode"],"</A></td>
					<td>".$arr["hosptype"].' '.$arr["name"]."</td>	
				</tr>
				<tr bgcolor=\"#A45200\">
					<td height=\"5\"></td>
					<td height=\"5\"></td>
Пример #5
0
function dump($str)
{
    echo "<pre>";
    print_r($str);
    echo "</pre>";
}
// ¤é¹ËÒª×èÍÂÒ
if (isset($_GET["action"]) && $_GET["action"] == "drugcode") {
    include "connect.inc";
    $sql = "Select drugcode,tradname,genname from druglst  where  drugcode like '%" . $_GET["search1"] . "%' limit 10 ";
    $result = Mysql_Query($sql) or die(Mysql_error());
    if (Mysql_num_rows($result) > 0) {
        echo "<Div style=\"position: absolute;text-align: center; width:500px; height:430px; overflow:auto; \">";
        echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FF99CC\"><tr align=\"center\" bgcolor=\"#333333\"><td ><strong>&nbsp;</strong></td><td ><font style=\"color: #FFFFFF;\"><strong>ÃËÑÊÂÒ</strong></font></td><td ><font style=\"color: #FFFFFF;\"><strong>ª×èÍÂÒ(¡ÒäéÒ)</strong></font></td><td ><strong>&nbsp;&nbsp;<A HREF=\"#\" onclick=\"document.getElementById('list').innerHTML='';\"><font style=\"color: #FFFF99;\">»Ô´</font></A></strong></td></tr>";
        $i = 1;
        while ($se = Mysql_fetch_assoc($result)) {
            echo "<tr><td valign=\"top\"></td><td><A HREF=\"javascript:void(0);\" Onclick=\"document.getElementById('" . $_GET["getto"] . "').value = '", jschars($se["drugcode"]), "';document.getElementById('txt1').value = '", jschars($se["tradname"]), "';document.getElementById('txt2').value = '", jschars($se["genname"]), "';document.getElementById('list').innerHTML ='';\">", $se["drugcode"], "</A></td><td>" . $se['tradname'] . "</td><td>&nbsp;</td></tr>";
        }
        echo "</TABLE></Div>";
    }
    exit;
}
if (isset($_POST['ok'])) {
    $sel = "SELECT * \n\tFROM `druglst` \n\tWHERE `drugcode` = '" . $_POST['drugcode'] . "' ";
    $row = mysql_query($sel) or die(mysql_error());
    $result = mysql_fetch_array($row);
    // if($result['usercontrol']==""){
    $sql1 = "UPDATE `druglst` SET \n    `usercontrol` = '" . $_SESSION['sOfficer'] . "',\n    `min` = '" . $_POST['min'] . "',\n    `max` = '" . $_POST['max'] . "' \n    WHERE `drugcode` = '" . $_POST['drugcode'] . "'";
    $query1 = mysql_query($sql1) or die(mysql_error());
    // à¡çº log àÍÒäÇé´éÇÂÇèÒã¤Ãá¡éÍÐäÃ仺éÒ§
    $date_now = date('Y-m-d H:i:s');
Пример #6
0
<?php
session_start();
include("connect.inc");	


$sql = "Select * From noncof where nonconf_id = '".$_GET["id"]."' limit 1 ";
		$result = Mysql_Query($sql) or die(Mysql_error());
		$arr_edit = Mysql_fetch_assoc($result);
		$sql = "Select * From nonconf2 where nonconf_id = '".$_GET["id"]."' limit 1 ";
		$result = Mysql_Query($sql) or die(Mysql_error());
		$arr_edit2 = Mysql_fetch_assoc($result);
		
		$nonconf_id = $arr_edit["nonconf_id"];
		$date_now = $arr_edit["nonconf_date"];
		$nonconf_time1 = substr($arr_edit["nonconf_time"],0,-3);
		$nonconf_time2 = substr($arr_edit["nonconf_time"],-2);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>���§ҹ�˵ء�ó��Ӥѭ/�غѵԡ�ó�/��������ʹ���ͧ</TITLE>
<link rel="stylesheet" type="text/css" href="epoch_styles.css" />
<script type="text/javascript" src="epoch_classes.js"></script>
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style type="text/css">


a:link {color:#FF0000; text-decoration:underline;}
a:visited {color:#FF0000; text-decoration:underline;}
Пример #7
0
<?php

global $detail, $user_code;
include "connect.inc";
$Thidate = date("d-m-") . (date("Y") + 543) . date(" H:i:s");
$sql = "Select * From appoint  where hn='" . $_GET["hn"] . "' AND `date` like '" . (date("Y") + 543) . date("-m-d") . "%' AND apptime <> '¡àÅÔ¡¡ÒùѴ'  Order by row_id DESC limit 1 ";
$result = Mysql_Query($sql);
$arr = Mysql_fetch_assoc($result);
$xxx = explode("(Ç", $arr["doctor"]);
$arr["doctor"] = $xxx[0];
$sql2 = "Select * From appoint_lab where id = '" . $arr["row_id"] . "' and id != 0 ";
$result2 = Mysql_Query($sql2);
$i = false;
$list_lab_appoint = array();
while ($arr2 = Mysql_fetch_assoc($result2)) {
    array_push($list_lab_appoint, $arr2["code"]);
    $i = true;
}
$drugstk = "<TABLE cellpadding=\"0\" cellspacing=\"0\" width=\"350\" font style=\"font-family:'MS Sans Serif'; font-size:14px; line-height: 20px;\">\n\t\t\t<TR>\n\t\t\t\t<TD align=\"center\"><font face='Angsana New' size= 3 ><B>㺹Ѵ¼Ùé»èÇ þ.¤èÒÂÊØÃÈÑ¡´ÔìÁ¹µÃÕ ÅÓ»Ò§</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD><font face='Angsana New' size= 2>ª×èÍ : " . $arr["ptname"] . " &nbsp;&nbsp; HN : " . $arr["hn"] . "</TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD><font face='Angsana New' size= 3 ><B><U>Çѹ·Õè : " . $arr["appdate"] . "<font face='Angsana New' size= 2 >&nbsp;àÇÅÒ : " . $arr["apptime"] . "</U></B></TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD><font face='Angsana New' size= 2 ><B>à¾×èÍ :</B> " . $arr["detail"] . "<font face='Angsana New' size= 2 >&nbsp;<B>á¾·Âì :</B> " . $arr["doctor"] . "</TD>\n\t\t\t</TR>\n\t\t\t<TR>\n\t\t\t\t<TD><font face='Angsana New' size= 3 ><U><B>Â×è¹ãº¹Ñ´·Õè :</B> " . $arr["room"] . "</U></TD>\n\t\t\t</TR>";
if ($i) {
    $drugstk .= "<TR  style=\"line-height: 14px;\">\n\t\t\t\t<TD><font face='Angsana New' size= 1 >LAB : " . implode(", ", $list_lab_appoint) . "</TD>\n\t\t\t</TR>";
}
if (trim($arr["xray"]) != "" && trim($arr["xray"]) != "NA") {
    $drugstk .= "<TR  style=\"line-height: 14px;\">\n\t\t\t\t<TD><font face='Angsana New' size= 1 >X-Ray : " . $arr["xray"] . "&nbsp;&nbsp;&nbsp;&nbsp;Í×è¹æ" . $arr["other"] . "</TD>\n\t\t\t</TR>";
}
$drugstk .= "<TR style=\"line-height: 14px;\">\n\t\t\t\t<TD><font face='Angsana New' size= 1 >ÇѹàÇÅÒÍ͡㺹Ѵ : " . date("d/m/Y H:i:s") . "</TD>\n\t\t\t</TR>";
$phone_intra = '1100';
if ($user_code === 'ADMDEN') {
    $phone_intra = '1230';
}
$drugstk .= "<TR style=\"line-height: 14px;\">\n\t\t\t\t<TD><font face='Angsana New' size= 1 > ÁÕ¢éÍʧÊÑÂ㹡ÒùѴµÔ´µèͨشºÃÔ¡ÒùѴ â·Ã 054-839305 µèÍ {$phone_intra}</TD>\n\t\t\t</TR>\n\t\t\t</TABLE>\n\t\t\t";
Пример #8
0
 function view_an()
 {
     if (isset($_GET["search"]) && $_GET["search"] != "") {
         $where = " Where ((a.an = '" . $_GET["search"] . "') OR (a.hn = '" . $_GET["search"] . "') OR (a.hn = '" . $_GET["search"] . "') OR (b.name LIKE '%" . $_GET["search"] . "%' ) OR (b.surname LIKE '%" . $_GET["search"] . "%' ) ) AND a.hn = b.hn";
     } else {
         $where = " Where a.hn = b.hn";
     }
     $sql = "Select a.an, a.hn, b.yot , b.name  , b.surname From ipcard as a, opcard as b " . $where . " ";
     $result = Mysql_Query($sql);
     echo "\n\n\t\t<FORM METHOD=GET ACTION=\"", $_SERVER['PHP_SELF'], "\">\n\t\t\t<INPUT TYPE=\"text\" NAME=\"search\" value=\"" . $_GET["search"] . "\">&nbsp;&nbsp;<INPUT TYPE=\"submit\" value=\"¤é¹ËÒ\">\n\t\t\t<INPUT TYPE=\"hidden\" NAME=\"action\" value=\"an\">\n\t\t</FORM>\n\n\t\t<TABLE cellpadding=\"0\" cellspacing=\"0\" width=\"99%\" border=\"1\" bordercolor=\"#3300FF\">\n\t\t<TR>\n\t\t\t<TD>\n\t\t<TABLE  align=\"center\" width=\"100%\" border=\"0\">\n\t\t<TR align=\"center\" class=\"title\" bgcolor=\"#3300FF\">\n\t\t\t<TD width=\"100\"><B>AN</B></TD>\n\t\t\t<TD width=\"100\"><B>HN</B></TD>\n\t\t\t<TD><B>ª×èÍ - Ê¡ØÅ</B></TD>\n\t\t</TR>\n\t\t";
     while ($arr = Mysql_fetch_assoc($result)) {
         if ($i == 0) {
             $color = "#FFFF99";
             $i = 1;
         } else {
             $color = "#FFFFEE";
             $i = 0;
         }
         echo "<TR  class=\"detail\" bgcolor=\"{$color}\">\n\t\t\t<TD align=\"center\"><A HREF=\"#\" Onclick=\"window.parent.left.document.form_borrowAN.AN.value='" . $arr["an"] . "'; window.parent.left.document.form_borrowAN.AN_Name.value='", $arr["yot"], " ", $arr["name"], " ", $arr["surname"], "'; window.parent.left.document.form_borrowAN.HN.value='", $arr["hn"], "';\">", $arr["an"], "</A></TD>\n\t\t\t<TD align=\"center\">", $arr["hn"], "</TD>\n\t\t\t<TD align=\"center\">", $arr["yot"], " ", $arr["name"], " ", $arr["surname"], "</TD>\n\t\t</TR>";
     }
     echo "</TABLE>\n\t\t\t</TD>\n\t\t</TR>\n\t\t</TABLE>\n\t\t";
 }
Пример #9
0
	<TD bgcolor="6495ED">ª×èÍ-Ê¡ØÅ</TD>
	<TD bgcolor="6495ED">ÊÔ·¸Ôì</TD>
	<TD bgcolor="6495ED"><font size='1'>¨Ó¹Ç¹à§Ô¹</TD>
	<TD>Êèǹà¡Ô¹</TD>
	<TD bgcolor="6495ED">á¼¹¡</TD>
	<TD bgcolor="6495ED">à¨éÒ˹éÒ·Õè</TD>
	<TD bgcolor="6495ED"><font size='1'>ÍÍ¡OPCARD</TD>
    <TD bgcolor="6495ED"><font size='2'>¹Ñ´ÁÒà¾×èÍ</font></TD>
</TR>
<?php 
$sql = "Select tvn, hn, ptname, ptright, price,an,date,depart,idname,sumnprice From depart  where date like '{$yr}-{$m}-{$d}%' AND    (cashok = '' OR cashok is Null ) AND an = '' AND `status` = 'Y' AND price > 0 ORDER BY ptright,date ";
$result = Mysql_Query($sql);
while ($arr = Mysql_fetch_assoc($result)) {
    $dapp = "select * from appoint where hn='" . $arr["hn"] . "' and appdate = '" . $d . " " . $mon[$m + 0] . " " . $yr . "' ";
    $result2 = Mysql_Query($dapp);
    $arr2 = Mysql_fetch_assoc($result2);
    $datearr = explode(" ", $arr["date"]);
    $datearr2 = explode(":", $datearr[1]);
    $times = $datearr2[0] . "." . $datearr2[1];
    $more = 24 - $times + $nows + (1 - 2) * 24;
    if ($arr["price"] <= '0') {
        $color = "#CC3366";
    } else {
        $color = "66CDAA";
    }
    if ($more >= 2) {
        if ($arr["depart"] == "HEMO") {
            $color = "#FFFF66";
        } else {
            $color = "#FFCACA";
        }
Пример #10
0
 function setdateopd($val, $val2 = '')
 {
     $this->dateopd = $val;
     if ($val2 != "") {
         $date = explode("-", $val2);
         $sql = "Select clinic From opday where thdatehn = '" . $date[2] . "-" . $date[1] . "-" . $date[0] . $this->hn . "' limit 1";
         $result = Mysql_Query($sql);
         $arr = Mysql_fetch_assoc($result);
         $this->setclinic($arr["clinic"]);
     }
 }
Пример #11
0
Файл: clanek.php Проект: GE3/GE3
                $tmplGalerie->prirad("obrazek.kategorie", $radek["nazev"]);
                $tmplGalerie->prirad("obrazek.popis", $radek["popis"]);
            }
            /* -- Vložení do obsahu -- */
            $obsahPred = $obsah;
            $obsah = preg_replace('|<img[^>]* alt="galery ' . $idGalerie . '"[^>]*/>|Usi', $tmplGalerie->getHtml(), $obsah);
        }
        return $obsah;
    }
    /**
     * Zobrazení článku
     */
    $idClanku = preg_replace("|^([0-9]*)-.*\$|", "\$1", $_GET["clanek"]);
    $tmplClanek = new GlassTemplate("templates/{$CONF['vzhled']}/clanek.html");
    $dotaz = Mysql_query("SELECT * FROM {$CONF['sqlPrefix']}clanky WHERE id='{$idClanku}'");
    $radek = Mysql_fetch_assoc($dotaz);
    $tmplClanek->newBlok("clanek");
    $tmplClanek->prirad("clanek.nazev", $radek["nazev"]);
    $tmplClanek->prirad("clanek.datum", @date("j.n.Y G:i", $radek["datum"]));
    $tmplClanek->prirad("clanek.uvod", $radek["uvod"]);
    $tmplClanek->prirad("clanek.obsah", $radek["obsah"]);
    $tmpl->prirad("obsah", vlozGalerii($tmplClanek->getHtml()));
    /////////////
    // Navigace
    /////////////
    $tmpl->prirad("navigace", '<a href="' . $CONF["absDir"] . 'index.php">Úvodní strana</a> » ' . $radek["nazev"]);
    //////////////
    // TitleInfo
    //////////////
    $tmpl->prirad("titleInfo", $radek["nazev"]);
}