Beispiel #1
0
}
if (!isset($_SERVER)) {
    $_SERVER =& $HTTP_SERVER_VARS;
}
if (extension_loaded('filter') && input_name_to_filter(ini_get('filter.default')) !== FILTER_UNSAFE_RAW) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = input_get(INPUT_POST, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_GET as $key => $value) {
        $_GET[$key] = input_get(INPUT_GET, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_COOKIE as $key => $value) {
        $_COOKIE[$key] = input_get(INPUT_COOKIE, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_SESSION as $key => $value) {
        $_SESSION[$key] = input_get(INPUT_SESSION, $key, FILTER_UNSAFE_RAW);
    }
}
/** 
 * Merge GET vars into the apcms array 
 */
$apcms['GET'] =& $_GET['apcms'];
/** 
 * Merge POST vars into the apcms array 
 */
$apcms['POST'] =& $_POST['apcms'];
/** 
 * Merge COOKIE vars into the apcms array 
 */
$apcms['COOKIE'] =& $_COOKIE['apcms'];
/** 
Beispiel #2
0
<?php
include 'bootstrap.php';
include 'fpdf_thai/shspdf.php';
$an = input_get('cAn');
$cbedname = input_get('cbedname');


$db = Mysql::load();
$sql = "SELECT `hn`,`an`,`ptname`,`age`,`ptright`,`bedcode`,`doctor`,`bed`,`diagnos` 
FROM `bed` 
WHERE `an` = :an ";
$data = array(
    ':an' => $an
);
$db->select($sql, $data);
$item = $db->get_item();

$pdf = new SHSPdf('L', 'mm', array(82, 35));

$pdf->SetThaiFont(); // аЂзµњЌєµм
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(2, 2); // left, top, right
$pdf->AddPage();
$pdf->SetFont('THSarabun','',16); // а√’¬°г™йІ“єњЌєµмЈ’иаµ√’¬Ѕд«й

// $pdf->Rect(0, 0, 84, 37);
$pdf->Cell(0, 5, $cbedname.'  '.$item['bed'], 0, 1);
$pdf->Cell(0, 5, 'AN: '.$item['an'].' HN: '.$item['hn'], 0, 1);
$pdf->Cell(0, 5, $item['ptname'].' Ќ“¬Ў '.$item['age'], 0, 1);
$pdf->Cell(0, 5, 'в√§: '.$item['diagnos'], 0, 1);
$pdf->Cell(0, 5, ' ‘ЈЄ‘: '.$item['ptright'], 0, 1);
Beispiel #3
0
<?php
include 'bootstrap.php';

$page = input_post('page');
if( $page === false ){
	$cHn = input_get('cHn');
	$db = Mysql::load();

	$sql = "SELECT `no_card`,`name`,`surname` FROM `opcard` WHERE `hn` = :cHn ";
	$data = array(':cHn' => $cHn);
	$db->select($sql, $data);
	$row = $db->get_item();
	
	?>
	<script>
	function chkfrm(){
		if(document.getElementById('no_card').value==""){
			alert("¡ÃسÒãÊèàŢ˹éÒÊØ´·éÒ´éǤèÐ");
			return false;
		}else{
			return true;
		}
	}
	</script>
	<form action="opdprintpdf.php?cHn=<?=$cHn;?>" method="post" name="form2" onSubmit="return chkfrm();">
		<?=$cHn ?>&nbsp;&nbsp;<?=$row['name']?>&nbsp;&nbsp;  <?=$row['surname']?>
		<br>¡ÃسÒãÊèàŢ˹éÒÊØ´·éÒ <input type="text" name="no_card" value="<?=$row['no_card']?>" id="page" size="10">
		<input type="submit" value="   µ¡Å§   " name="send">
		<input type="hidden" name="page" value="print">
		<input type="hidden" name="hn" value="<?=$cHn;?>">
	</form>
Beispiel #4
0
<?php

session_start();
require "../connect.php";
require "../includes/functions.php";
// Verify user before load content
if (!authen()) {
    die('¡ÃØ³Ò Loing à¾×èÍà¢éÒÊÙèÃкºÍÕ¡¤ÃÑé§');
}
// $type = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_STRING);
// $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_STRING);
// $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_STRING);
$type = $_GET['type'];
$year = $_GET['year'];
$month = $_GET['month'];
$datemonth = input_get('datemonth');
if (empty($type) or empty($datemonth)) {
    echo 'System require type, year and month :)';
    exit;
}
// Filter for white list
$allow_type = array('fbg', 'hba1c', 'ldl', 'bp');
if (!in_array($type, $allow_type)) {
    echo 'Invalid type :(';
    exit;
}
$th_year = intval($year) + 543;
$months = array('01' => 'Á.¤.', '02' => '¡.¾.', '03' => 'ÁÕ.¤', '04' => 'àÁ.É.', '05' => '¾.¤.', '06' => 'ÁÔ.Â.', '07' => '¡.¤.', '08' => 'Ê.¤.', '09' => '¡.Â.', '10' => 'µ.¤.', '11' => '¾.Â.', '12' => '¸.¤.');
// list($date1, $month) = explode('-', $dm);
// $date1 = date('Y');
// ¹ÑºµÒÁ»Õ§º»ÃÐÁÒ³
Beispiel #5
0
<?php

session_start();
$PHP_SELF = "index.php";
define('_MAXSITE', '1');
// โหลดคอนฟิกและไฟล์พื้นฐาน
include 'mainfile.php';
$name = input_get('name', 'index');
$file = input_get('file', 'index');
GETMODULE($name, $file);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    <head>
        <title><?php 
echo WEB_TITLE;
?>
</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="keywords" content="เว็บสำเร็จรูป,อัษฎา,มอไซค์ดอทคอม, maxsite">
        <meta name="description" content="เว็บไซต์สำเร็จรูป maxsite">
        <link href="style.css" rel="stylesheet" type="text/css">

        <script type="text/javascript" src="highslide/highslide.js"></script>
        <script type="text/javascript" src="highslide/highslide-html.js"></script>
        <script type="text/javascript">
        hs.graphicsDir = 'highslide/graphics/';
        hs.outlineType = 'rounded-white';
        hs.outlineWhileAnimating = true;
        hs.objectLoadTime = 'after';
        </script>
Beispiel #6
0
}
if (!isset($_COOKIE)) {
    $_COOKIE =& $HTTP_COOKIE_VARS;
}
if (!isset($_SERVER)) {
    $_SERVER =& $HTTP_SERVER_VARS;
}
if (extension_loaded('filter') && function_exists('input_name_to_filter') && input_name_to_filter(ini_get('filter.default')) !== FILTER_UNSAFE_RAW) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = input_get(INPUT_POST, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_GET as $key => $value) {
        $_GET[$key] = input_get(INPUT_GET, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_COOKIE as $key => $value) {
        $_COOKIE[$key] = input_get(INPUT_COOKIE, $key, FILTER_UNSAFE_RAW);
    }
    // NOT YET IMPLEMENTED IN PHP:
    /*
    foreach ($_SESSION as $key => $value) {
        $_SESSION[$key] = input_get(INPUT_SESSION, $key, FILTER_UNSAFE_RAW);
    }
    */
}
if (extension_loaded('filter') && function_exists('filter_id') && function_exists('filter_input') && filter_id(ini_get('filter.default')) !== FILTER_UNSAFE_RAW) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = filter_input(INPUT_POST, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_GET as $key => $value) {
        $_GET[$key] = filter_input(INPUT_GET, $key, FILTER_UNSAFE_RAW);
    }
Beispiel #7
0
						<td><a href="cancel_admit.php?step=2&bedcode=<?php 
            echo $item['bedcode'];
            ?>
">¡��ԡ</a></td>
					</tr>
					<?php 
        }
    }
    ?>
		</tbody>
	</table>
	<?
	
} elseif ( $step === 2 ) {
	
	$bedCode = input_get('bedcode');
	
	$sql = "SELECT * FROM `bed` WHERE `bedcode` = '$bedCode' LIMIT 1;";
	$item = DB::select($sql, null, true);
	
	$wardCode = substr($item['bedcode'], 0, 2);
	?>
	<div>
		<a href="cancel_admit.php">��Ѻ�˹����¡��</a>
	</div>
	<form action="cancel_admit.php?step=3" method="post">
		<div>
			<h3>�����ż����·��зӡ��¡��ԡ Admit</h3>
			<p><b>����:</b> <?php 
    echo $item['ptname'];
    ?>
 public function deleteAction()
 {
     $id = input_get('id');
     if ($id) {
         if ($this->model->action_db->cate_delete($id)) {
             echo '<script language="javascript">';
             echo 'alert("ban da xoa thanh cong");';
             echo 'window.location="admin.php?c=category"';
             echo '</script>';
             //  header('location:index.php?action=cate_list');
         } else {
             echo '<script language="javascript">';
             echo 'alert("da xay ra loi");';
             echo 'window.location="admin.php?c=category"';
             echo '</script>';
         }
     }
 }
Beispiel #9
0
					</tr>
				</tbody>
			</table>
			<div><a href="anchkstkeye.php?action=print&an=<?php 
            echo $user['an'];
            ?>
&hn=<?php 
            echo $user['hn'];
            ?>
" target="_blank">╬та╬Лй╣т║Ю║мцЛ</a></div>
			<?php 
        }
    }
} elseif ($action === 'print') {
    $an = input_get('an');
    $hn = input_get('hn');
    DB::load();
    $sql = "SELECT `hn`, `an`, `ptname`, `age`, `ptright` \n\tFROM `opday` \n\tWHERE `an` = :an \n\tAND `hn` = :hn ";
    $user = DB::select($sql, array('an' => $an, 'hn' => $hn), true);
    ?>
	<div id="sticker-contain">
		<p><?php 
    echo $user['ptname'];
    ?>
</p>
		<p>AN: <?php 
    echo $user['an'];
    ?>
, HN: <?php 
    echo $user['hn'];
    ?>
Beispiel #10
0
$def_month_th = array('01' => '�.�.', '02' => '�.�.', '03' => '��.�', '04' => '��.�.', '05' => '�.�.', '06' => '��.�.', '07' => '�.�.', '08' => '�.�.', '09' => '�.�.', '10' => '�.�.', '11' => '�.�.', '12' => '�.�.');
$eye_lists = array(
	'No DR' => 'NoDR',
	'Mild NPDR ' => 'Mild',
	'Moderate NPDR' => 'Moderate',
	'Severe NPDR' => 'Severe',
	'PDR' => 'PDR'
);

$title = '��ª��ͼ����� OPD�� �����͹';
include 'templates/classic/header.php';

DB::load();

$date = input_get('date');
$dr = input_get('dr');

list($y, $m) = explode('-', $date);

?>
<div class="cell">
	<div class="col">
		<div class="cell">
			<div class="col">
				<h3>��ª��ͼ����� <?=(array_search($dr, $eye_lists));?> <?=$def_month_th[$m];?> <?=($y + 543);?></h3>
			</div>
		</div>
		<div class="cell">
			<div class="col">
				<?php
				$sql = "SELECT * 
Beispiel #11
0
<style type="text/css">
<!--
.calendar {
    width:220;
    background-color: #FFFFFF;
}
-->
</style>
	<TABLE cellSpacing=0 cellPadding=0 width=720 border=0>
      <TBODY>
        <TR>
          <TD width="10" vAlign=top><IMG src="images/fader.gif" border=0></TD>
          <TD width="710" vAlign=top><IMG src="images/topfader.gif" border=0><BR>
		  <!-- News -->
		  &nbsp;&nbsp;<IMG SRC="images/menu/textmenu_calendar.gif" BORDER="0"><BR><BR>
						<CENTER>
						<?php 
$year = input_get('year', date("Y"));
$cal = new MyCalendar();
echo $cal->getYearView($year);
?>
						</CENTER>
				<BR><BR>
			<!-- End News -->
		  </TD>
        </TR>
      </TBODY>
    </TABLE>
Beispiel #12
0
?>
                            </select>
                            <input type="button" name="Button1" value=" Go " onclick="MM_jumpMenuGo('category','parent',0)" />&nbsp;&nbsp;
                        </form>
                    </div>
                    <br>
                    <table width="700" align="center" border="0">
                        <?php 
//แสดงข่าวสาร/ประชาสัมพันธ์
$SQLwhere = '';
$SQLwhere2 = '';
if ($category_id) {
    $SQLwhere = " `category`='" . $category_id . "' ";
    $SQLwhere2 = " WHERE a.`category`='" . $category_id . "' ";
}
$page = input_get('page', 1);
$limit = 20;
$count = 0;
$goto = ($page - 1) * $limit;
$sql = "SELECT a.*, b.`category_name`\r\n                        FROM `web_news` AS a\r\n                        LEFT JOIN `web_news_category` AS b ON b.`id` = a.`category`\r\n                        {$SQLwhere2}\r\n                        ORDER BY a.`id` DESC LIMIT {$goto}, {$limit}";
$items = $msdb->fetchAll($sql);
$SUMPAGE = count($items);
$rt = $SUMPAGE % $limit;
$totalpage = $rt != 0 ? floor($SUMPAGE / $limit) + 1 : floor($SUMPAGE / $limit);
foreach ($items as $key => $item) {
    if ($count == 0) {
        echo "<tr>";
    }
    ?>
                            <td width="50%" valign=top>
                                <table width="100%">
Beispiel #13
0
				?>
			</table>
		</div>
	</div>
	<script type="text/javascript">
		function delFile(){
			var c = confirm("�׹�ѹ����ź������?");
			if( c === false ){
				return false;
			}
		}
	</script>
<?php
} else if ( $action === 'del' ) {
	
	$file = input_get('file');
	$testMatch = preg_match('/.+\.zip$/', $file);
	
	$msg = '������١��ͧ';
	if( $testMatch > 0 ){
		unlink('export/'.$file);
		$msg = 'ź������º����';
	}
	
	redirect('export_new43.php', $msg);
	
} else if( $action === 'export' ){
	
	$dateSelect = input_post('dateSelect');
	
	$testMatch = preg_match('/\d+\-\d+$/', $dateSelect);
Beispiel #14
0
    echo "<FONT FACE=\"tahoma\" COLOR=\"#808080\">(" . number_format($pin['pageview']) . "/" . number_format($SumComm) . ")</FONT></td>\n";
    echo "<td bgcolor=\"#E7FCE0\" width=\"120\"><CENTER><B><FONT COLOR=\"#6600FF\">";
    //กรณีสมาชิก
    if ($pin['is_member']) {
        echo "<IMG SRC=\"images/human.gif\" BORDER=\"0\" ALIGN=\"absmiddle\"> <B><FONT COLOR=\"#FF0066\">";
    }
    echo "" . $pin['post_name'] . "</FONT></B></CENTER></td>\n";
    echo "<td bgcolor=\"#E7FCE0\" width=\"120\"><CENTER><FONT COLOR=\"#339900\">" . ThaiTimeConvert($pin['post_date'], "", "2") . "</FONT></CENTER></td>\n";
    echo "<tr><td colspan=\"3\" height=1 class=\"dotline\"></td></tr>\n";
}
//แสดงผลกระทู้
$limit = _PERPAGE_BOARD;
$SUMPAGE = $db->num_rows(TB_WEBBOARD, "id", "{$SQLwhere}");
$wb = $msdb->fetch("SELECT COUNT(`id`) AS `rows` FROM `web_webboard` WHERE {$SQLwhere}");
$SUMPAGE = $wb['rows'];
$page = input_get('page', 0);
if (empty($page)) {
    $page = 1;
}
$rt = $SUMPAGE % $limit;
$totalpage = $rt != 0 ? floor($SUMPAGE / $limit) + 1 : floor($SUMPAGE / $limit);
$goto = ($page - 1) * $limit;
$Color = 0;
$sql = "SELECT * FROM `web_webboard` {$SQLwhere2} ORDER BY `id` DESC LIMIT {$goto}, {$limit}";
$items = $msdb->fetchAll($sql);
foreach ($items as $key => $WebBoard) {
    if ($Color == 0) {
        $Color = 1;
        $ColorFill = "#F0F0F0";
    } else {
        $Color = 0;
<?php

require '../loader.php';
/**
 * get thread messages
 */
$thread_id = input_get('thread_id');
if ($thread_id) {
    $users = new Users();
    $threads = new Threads();
    $messages = new Messages();
    $thread_messages_ids = $threads->getThreadMessages($thread_id);
    $thread_users_ids = $threads->getThreadUsers($thread_id);
    $thread_users = array();
    for ($i = 0, $count = count($thread_users_ids); $i < $count; $i++) {
        $thread_users[] = $users->getUser($thread_users_ids[$i]);
    }
    $thread_messages = array();
    for ($i = 0, $count = count($thread_messages_ids); $i < $count; $i++) {
        $message = $messages->getMessage($thread_messages_ids[$i]);
        $message['user'] = $users->getUser($message['sender_id']);
        unset($message['sender_id']);
        $thread_messages[] = $message;
    }
    echo output_json(TRUE, ERR_EMPTY, array('users' => $thread_users, 'messages' => $thread_messages));
} else {
    echo output_json(FALSE, ERR_MISSING_DATA);
}
/* End of file get_thread_messages.php */
/* Location ./scripts/get_thread_messages.php */
Beispiel #16
0
<?php

# ÃÒ¡ÒÃÂÒ·Õèà¤ÂàºÔ¡ä»áÅéÇ
include 'bootstrap.php';
$id = (int) input_get('id');
$db = Mysql::load();
$sql = "SELECT `thidate`,`tradname`,`dispense`,`amountrx` \nFROM `drugimport` \nWHERE `idno` = '{$id}' ";
$db->select($sql);
$items = $db->get_items();
$full_items = array();
$rows = count($items);
$set_i = 0;
$thidate = '';
for ($i = 0; $i < $rows; $i++) {
    $item = $items[$i];
    ++$set_i;
    $full_items[$set_i] = array('tradename' => $item['tradname'], 'rxdrug' => $item['dispense'], 'num' => $item['amountrx']);
    $thidate = substr($item['thidate'], 0, 10);
}
// µÑé§Çѹ·Õèã¹ËÑÇ¡ÃдÒÉ
list($d, $m, $y) = explode('-', $thidate, 3);
$date_serve = $d . ' ' . $def_fullm_th[$m] . ' ' . $y;
include 'bill_lading_pdf.php';
Beispiel #17
0
	include 'menu.php';

    $clinics = array(
        'A' => 'A ���˵ء�ó������͡�ʷ��������Դ������Ҵ����͹',
        'B' => 'B �Դ������Ҵ����͹������ѧ���֧��Ǽ�����',
        'C' => 'C �Դ������Ҵ����͹�Ѻ������ ����Դ�ѹ���� ����ա���ѡ��',
        'D' => 'D �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѧ�ҡ���������͡���Դ�ѹ������ ����Դ�ѹ���µ�ͼ�����',
        'E' => 'E �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѡ�������ҡ��鹨ҡ�˵ء�ó��� �Դ�ѹ����/�ԡ����§���Ǥ��ǵ�ͼ�����',
        'F' => 'F �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѡ�� �Դ�ѹ����/�ԡ�� ��§���Ǥ��� �����µ�ͧ���� þ.�ҹ���',
        'G' => 'G �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѡ�� �Դ�����ԡ�ö���',
        'H' => 'H �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѡ�ҷӡ�á����Ե/��ͺ���ª��Ե',
        'I' => 'I �Դ������Ҵ����͹�Ѻ������ ��ͧ������ѡ�Ҷ֧����Ե'
    );

    $date = ad_to_bc(input_get('date'));
    $group = input_get('group');

    $conf = array(
        'host' => 'localhost',
        'port' => 3306,
        'dbname' => 'dbconform',
        'user' => 'root',
        'pass' => '1234'
    );

    $db = Mysql::load($conf);
    $sql = "SELECT a.*, b.`name` 
    FROM `ncr2556` AS a 
    LEFT JOIN `departments` AS b ON b.`code` = a.`until`
    WHERE a.`nonconf_date` LIKE '$date%' 
    AND a.`come_from_id` = '$group' 
Beispiel #18
0
	
	}
	include 'templates/classic/footer.php';
	
} else if ( $action === 'insert' ) {
	
	$db = Mysql::load();
	
	$hn = input_get('hn');
	$drugid = input_get('drugid');
	$drugdate = input_get('drugdate');
	$drugcode = input_get('drugcode');
	$orderdate = input_get('orderdate');
	$autonumber = input_get('autonumber');
	$labcode = input_get('labcode');
	$result = input_get('result');
	$date_add = get_date_ad();
	
	// @todo
	// !!!! ��觷��зӵ��� !!!!
	// ���Ըա�èͧ����������͹ ��ҡ�͡����������п�����������º�������� �������Ѿഷ��ҷ���ѧ
	$sql = "SELECT `id` 
	FROM `phar_user` 
	WHERE `drugid` = :drugid 
	AND `autonumber` = :autonumber ";
	$data = array(
		':drugid' => $drugid,
		':autonumber' => $autonumber
	);
	$db->select($sql, $data);
	$item = $db->get_item();
Beispiel #19
0
			if( c === false ){
				return false;
			}
		});
	});
	</script>
	<?php 
    include 'templates/classic/footer.php';
} elseif ($action === 'save') {
    $user_id = input_post('user');
    $sql = "INSERT INTO `smdb`.`drug_user_ward` (`user_id`,`author`) VALUES ( :user_id, :author );";
    $data = array(':user_id' => $user_id, ':author' => $user_session);
    $test_insert = $db->insert($sql, $data);
    redirect('drug_user_ward.php', '�ѹ�֡���������º����');
} elseif ($action === 'delete') {
    $id = input_get('id');
    $sql = "DELETE FROM `drug_user_ward` WHERE `id`=:id;";
    $db->delete($sql, array(':id' => $id));
    redirect('drug_user_ward.php', 'ź���������º����');
} elseif ($action === 'search_user') {
    $category = input_post('category');
    $sql = "SELECT `row_id`,`name`,`menucode` \n\tFROM `inputm` \n\tWHERE `status` = 'Y' \n\tAND `menucode` = '{$category}'\n\tORDER BY `row_id` ASC";
    $db->select($sql);
    $users = $db->get_items();
    ?>
	<select name="user" id="user">
		<option value="">-- ���͡���ͼ����ҹ --</option>
		<?php 
    foreach ($users as $key => $user) {
        ?>
			<option value="<?php 
<?php

require '../loader.php';
/**
 * get user threads
 */
$userId = input_get('user_id');
if ($userId) {
    $users = new Users();
    $threads = new Threads();
    $messages = new Messages();
    $user_threads = array();
    $user_threads_ids = $users->getUserThreads($userId);
    if ($user_threads_ids) {
        for ($i = 0, $count = count($user_threads_ids); $i < $count; $i++) {
            $user_threads[] = array('id' => $user_threads_ids[$i]);
            $thread_users = $threads->getThreadUsers($user_threads_ids[$i]);
            $user_threads[$i]['users'] = array();
            for ($j = 0, $jCount = count($thread_users); $j < $jCount; $j++) {
                $user_threads[$i]['users'][] = $users->getUser($thread_users[$j]);
            }
            $last_message = $messages->getMessage($threads->getLastMessageOfThread($user_threads_ids[$i]));
            $last_message['user'] = $users->getUser($last_message['sender_id']);
            unset($last_message['sender_id']);
            $user_threads[$i]['last_message'] = $last_message;
        }
    }
    echo output_json(TRUE, ERR_EMPTY, $user_threads);
} else {
    echo output_json(FALSE, ERR_MISSING_DATA);
}
Beispiel #21
0
<?php

ini_set('html_errors', false);
var_dump(input_get(INPUT_GET, "a", FILTER_SANITIZE_STRIPPED));
var_dump(input_get(INPUT_GET, "b", FILTER_SANITIZE_URL));
var_dump(input_get(INPUT_GET, "a", FILTER_SANITIZE_SPECIAL_CHARS, array(1, 2, 3, 4, 5)));
var_dump(input_get(INPUT_GET, "b", FILTER_VALIDATE_FLOAT, new stdClass()));
var_dump(input_get(INPUT_POST, "c", FILTER_SANITIZE_STRIPPED, array(5, 6, 7, 8)));
var_dump(input_get(INPUT_POST, "d", FILTER_VALIDATE_FLOAT));
var_dump(input_get(INPUT_POST, "c", FILTER_SANITIZE_SPECIAL_CHARS));
var_dump(input_get(INPUT_POST, "d", FILTER_VALIDATE_INT));
var_dump(input_get(new stdClass(), "d"));
var_dump(input_get(INPUT_POST, "c", "", ""));
var_dump(input_get("", "", "", "", ""));
var_dump(input_get(0, 0, 0, 0, 0));
echo "Done\n";
Beispiel #22
0
    $bM = substr($birth, 5, 2);
    $ageY = $nY - $bY;
    $ageM = $nM - $bM;
    if ($ageM < 0) {
        $ageY = $ageY - 1;
        $ageM = 12 + $ageM;
    }
    if ($ageM == 0) {
        $pAge = "{$ageY} »Õ";
    } else {
        $pAge = "{$ageY} »Õ {$ageM} à´×͹";
    }
    return $pAge;
}
$Can = input_get('Can');
$Chn = input_get('Chn');
$db = Mysql::load();
$sql = "SELECT a.an, a.hn, a.date, a.bedcode, b.yot, b.name, b.surname, b.idcard, b.ptright, b.dbirth, b.sex, b.address, b.tambol, b.ampur, b.changwat, b.phone, b.ptf, b.ptfadd, b.ptffone, b.camp \nFROM `ipcard` AS a\nLEFT JOIN `opcard` AS b ON a.`hn` = b.`hn` \nWHERE a.`an` = '{$Can}'";
$db->select($sql);
$item = $db->get_item();
list($adate, $tdate) = explode(' ', $item['date']);
$age = calcage($item['dbirth']);
$sex = $item['sex'] === 'ª' ? 'ªÒÂ' : 'Ë­Ô§';
$pdf = new SHSPdf('P', 'mm', 'A4');
$pdf->SetThaiFont();
// à«çµ¿Í¹µì
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(3, 3, 3);
// left, top, right
$pdf->AddPage();
$pdf->SetFont('THSarabun', '', 14);