public function Index() { $data = input_post('data'); $this->model->DataR->ramdom = $this->model->Ramdom; $this->model->Processes->ramdom = $this->model->Ramdom; $this->model->DataR->dataJson = $data; $this->model->DataR->Run(); $this->model->Processes->Security = $this->model->DataR->Security; $this->model->Processes->dataP = $this->model->DataR->dataRead; $this->model->Processes->Run(); $this->model->DataS->DataSD = $this->model->Processes->dataP; $this->model->DataS->DataR = $this->model->DataR->dataRead; $this->model->DataS->Security = $this->model->DataR->Security; $this->model->DataS->dataMSG = $this->model->Processes->dataMSG; $this->model->DataS->MSGT = $this->model->Processes->msgTF; $this->model->DataS->Send(); }
public function editAction() { $error = array(); $cid = input_get('cid'); echo $cid; $data = $this->model->action_db->cate_edit($cid); var_dump($data); $data1 = array('Cate_title' => input_post('Cate_title'), 'Cate_slug' => input_post('Cate_slug'), 'Cate_description' => input_post('Cate_description'), 'Cate_keywords' => input_post('Cate_keywords'), 'Cate_Robots' => input_post('Cate_Robot')); if (validate_empty($data1['Cate_title'])) { $error['Cate_title'] = 'vui long khong de trong tuong nay'; } else { if ($this->model->action_db->cate_exit_update_title($data1['Cate_title'], $cid)) { $error['Cate_title'] = 'title nay da ton tai'; } } if (validate_empty($data1['Cate_slug'])) { $error['Cate_slug'] = 'khong de trong truong nay'; } else { if ($this->model->action_db->cate_exit_update_slug($data1['Cate_slug'], $cid)) { $error['Cate_slug'] = 'slug da ton tai'; } } if (empty($error)) { $flag = $this->model->action_db->update_category($cid, $data1); if ($flag) { echo '<script language="javascript">'; echo 'alert("ban da update thanh cong");'; echo 'window.location="admin.php?c=category"'; echo '</script>'; } } $this->view->load('sidebar'); $datasend = array($data, $error); //var_dump($datasend); $this->view->load('edit', $datasend); }
<?php $action = input('action'); if( $action === 'showtable' ){ $groups = array( 1 => 'ENV ROUND', 2 => 'IC ROUND', 3 => 'RM ROUND', 4 => '12 ¡Ô¨¡ÃÃÁ·º·Ç¹', 5 => '˹èÇÂÃÒ§ҹàͧ', 6 => 'Í×è¹æ', 7 => 'àÇõÃǨ¡ÒþÂÒºÒÅ', 8 => '¹Ò·ËÒÃàÇûÃШÓÇѹ' ); $date = input_post('date_format'); $conf = array( 'host' => 'localhost', 'port' => 3306, 'dbname' => 'dbconform', 'user' => 'root', 'pass' => '1234', ); $db = Mysql::load($conf); $sql = "SELECT (SUBSTRING(`nonconf_date`, 1, 4) - 543) AS `year`, DATE_FORMAT( `nonconf_date`, '%m' ) AS `month`, CONCAT((SUBSTRING(`nonconf_date`, 1, 4) - 543), '-', DATE_FORMAT( `nonconf_date`, '%m' )) AS `ad_date`, COUNT(`nonconf_id`) AS `rows`, `come_from_id`
$msg = 'Ї—єЈ÷°¢йЌЅў≈дЅи ”а√з®°√Ў≥“а°зЇв§йіє’й '.$save['id'].' аЊ„иЌб®йІгЋйЉўйіўб≈√–ЇЇЈ”°“√б°йд¢µиЌдї'; } redirect('news_list.php', $msg); exit; } else if( $action === 'delete' ){ $id = input_get('id'); $sql = "UPDATE `smdb`.`news` SET `status` = '0' WHERE `news`.`id` =:id LIMIT 1 ;"; // DB::exec($sql, array(':id' => $id)); $db->update($sql, array(':id' => $id)); redirect('news_list.php', 'і”ає‘є°“√а√’¬Ї√йЌ¬б≈й«'); exit; } else if( $action === 'remove_path' ){ $path = input_post('path'); if(is_file($path)){ unlink($path); } echo '{"successful":true}'; exit; } include 'templates/classic/header.php'; ?> <div class="site-header-fixture no-print"> <div class="site-header"> <div class="col width-fit mobile-width-fit"> <div class="cell"> <a href="#" class="logo"></a> </div>
<div style="color: red;"><?php echo get_session('x-msg'); ?> </div><?php set_session('x-msg', false); } } elseif ($step === 3) { $userId = get_session('sRowid'); $pass = input_post('confirm_pass'); $bedCode = input_post('bedcode'); $sql = "SELECT `row_id` FROM `inputm` WHERE `row_id` = :user_id AND `pword` = :password ;"; $item = DB::select($sql, array(':user_id' => $userId, ':password' => $pass), true); if ($item !== NULL) { $thai_date = date('Y') + 543 . date('-m-d H:i:s'); $editor = get_session('sOfficer'); $hn = input_post('hn'); /** * @todo * [x] ��Ǩ�ͺ��� lock �ҡ��ͧ����Թ�� * [x] backup `bed` * [x] INSERT `ward_log` * [x] UPDATE `bed` * [x] UPDATE `ipcard` */ // �硡����ͤ�ҡ��ǹ���Թ $sql = "SELECT `lock_dc` FROM `ipcard` WHERE `bedcode` = :bed_code AND `hn` = :hn"; $item = DB::select($sql, array(':bed_code' => $bedCode, ':hn' => $hn), true); if (empty($item['lock_dc'])) { redirect('cancel_admit.php?step=2&bedcode=' . $bedCode, '��سҵԴ�����ǹ���Թ��������ͷӡ�ûŴ��ͤ�����Թ���¡��ԡ Admit'); } // Backup `bed`
<?php require '../loader.php'; /** * create user script */ $userId = input_post('user_id'); $name = input_post('name'); $avatar = input_post('avatar'); if ($userId && $name && $avatar) { // initiate users class $users = new Users(); // check for user existanse $isExists = $users->isUserExists($userId); if ($isExists) { echo output_json(FALSE, ERR_DUPLICATE_DATA); } else { // create a new user object $user = $users->createUser($userId, $name, $avatar); if ($user) { echo output_json(TRUE, ERR_EMPTY, $user); } else { echo output_json(FALSE, ERR_SERVER_ERROR); } } } else { echo output_json(FALSE, ERR_MISSING_DATA); } /* End of file create_user.php */ /* Location ./scripts/create_user.php */
<?php include 'bootstrap.php'; $title = '╗с╧г╧╪ыИ╩Хгб╥я╧╣║ццаАб║╣райт╥╦тЛ'; include 'templates/classic/header.php'; // Default year checkup $checkup = get_year_checkup(true); $show = input_post('show_result'); $yearSelect = input_post('year_select', $checkup); ?> <div class="cell no-print"> <div class="col"> <ul class="nav"> <li><a href="../nindex.htm">к╧Иркея║Б╩цА║ца SHS</a></li> </ul> </div> </div> <div class="cell"> <div class="col"> <h3>╗с╧г╧╪ыИ╩Хгб╥я╧╣║ццаАб║╣райт╥╦тЛ ╩у <?=$yearSelect;?></h3> </div> </div> <div class="cell"> <div class="col"> <form action="report_dental_ptright.php" method="post" class="no-print"> <div class="cell"> <div class="col"> <label for="yearSelect"> Юевм║╩у╖╨╩цпарЁ <input type="text" id="yearSelect" name="year_select" value="<?=$yearSelect;?>"> </label>
<?php include 'bootstrap.php'; $default_bc = get_date_bc('Y-m'); $action = input('action'); $date_select = input_post('date_select', $default_bc); include 'templates/classic/header.php'; ?> <div class="col no-print"> <div class="cell"> <a href="../nindex.htm"><< ˹éÒËÅÑ¡â»Ãá¡ÃÁâç¾ÂÒºÒÅ</a> </div> </div> <div class="col no-print"> <div class="cell"> <div class="col"> <div class="cell"> <h3>¤é¹ËÒÃÒÂÃѺáºè§µÒÁÃÒ¡ÒÃáÅЪèǧàÇÅҢͧ½Ñ§à¢çÁ</h3> </div> </div> <form action="report_income_nid.php" method="post"> <div class="col"> <div class="cell"> <label for="date_select">àÅ×Í¡»Õ-à´×͹</label> <input type="text" id="date_select" name="date_select" value="<?=$date_select;?>"> <div style="font-size: 16px; color: red;">* µÑÇÍÂèÒ§¡Òäé¹ËÒ 2558-11</div> </div> </div>
<label for="user_hn">HN: </label> <input type="text" id="user_hn" name="user_hn" value="<?=$hn;?>"> <div style="font-size: 16px; color: red;">* ������ HN ���ʹ���ª��ͷ�����</div> </div> </div> <div class="col"> <div class="cell"> <button type="submit">�ʴ���</button> <input type="hidden" name="view" value="user"> <input type="hidden" name="show" value="list"> </div> </div> </form> <?php $show = input_post('show'); if( $show === 'list' ){ $db = Mysql::load(); $data = array(); $where = ''; if( !empty($hn) ){ $where = ' WHERE a.`hn` = :user_hn '; $data = array(':user_hn' => $hn); } $sql = "SELECT a.*, b.`genname`,c.`yot`,c.`name`,c.`surname` FROM `phar_allergic` AS a LEFT JOIN `druglst` AS b ON b.`drugcode` LIKE CONCAT(a.`drug_code`, '%') LEFT JOIN `opcard` AS c ON c.`hn` = a.`hn` $where
<?php require '../loader.php'; /** * send message */ $thread_id = input_post('thread_id'); $message_body = input_post('message'); $sender_id = input_post('sender_id'); if ($thread_id && $message_body && $sender_id) { $users = new Users(); $threads = new Threads(); $messages = new Messages(); $push = new PushService(); $message_id = $messages->createMessage($thread_id, $sender_id, $message_body); $threads->addMessageToThread($thread_id, $message_id); $message = $messages->getMessage($message_id); $message['user'] = $users->getUser($message['sender_id']); unset($message['sender_id']); $push->pushMessage($message_id); echo output_json(TRUE, ERR_EMPTY, $message); } else { echo output_json(FALSE, ERR_MISSING_DATA); } /* End of file send_message.php */ /* Location ./scripts/send_message.php */
</div> <div> <div> <button type="submit">мя╬Ю╢╥╒Имаые</button> <input type="hidden" name="action" value="update_form"> <input type="hidden" name="token" value="<?=generate_token('uc30baht');?>"> </div> </div> </form> </div> </div> <?php include '../templates/classic/footer.php'; }else if( $action === 'update_form' ){ $token = input_post('token'); $token_test = check_token($token, 'uc30baht'); if( $token_test === false ){ echo 'Invalid token'; exit; } $file = $_FILES['uc30']; if( preg_match('/.+\.txt$/', $file['name']) === 0 ){ echo 'м╧ь╜р╣Ю╘╬рпД©еЛ .txt ╗цЙрррр нтЙгФ'; exit; } // мя╬Бке╢Д©еЛ $upload = move_uploaded_file($file['tmp_name'], $file['name']);
$sql = "INSERT INTO web_webboard_category VALUES (2, 'สอบถามปัญหาการใช้งาน maxsite', 2);"; // $result = mysql_query($sql); $dbh->exec($sql); $sql = "CREATE TABLE web_webboard_comment (\r\n id int(11) NOT NULL auto_increment,\r\n topic_id int(7) NOT NULL default '0',\r\n detail text NOT NULL,\r\n picture varchar(50) NOT NULL default '',\r\n post_name varchar(50) NOT NULL default '',\r\n is_member int(7) NOT NULL default '0',\r\n ip_address varchar(50) NOT NULL default '',\r\n post_date varchar(50) NOT NULL default '',\r\n PRIMARY KEY (id)\r\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"; // $result = mysql_query($sql); $dbh->exec($sql); // $FileBNK = "../includes/config.in.php.bnk"; // $FileBNKOpen = @fopen($FileBNK, "r"); // $FileBNKContent = @fread($FileBNKOpen, @filesize($FileBNK)); // @fclose($FileBNKOpen); $FileBNKContent = file_get_contents('../includes/config.in.example.php'); $web_url = input_post('web_url'); $web_email = input_post('web_email'); $use_capcha = input_post('use_capcha'); $capcha_type = input_post('capcha_type'); $capcha_num = input_post('capcha_num'); $FileBNKContent = str_replace("%DB_HOST%", $host, $FileBNKContent); $FileBNKContent = str_replace("%DB_NAME%", $db_name, $FileBNKContent); $FileBNKContent = str_replace("%DB_USERNAME%", $db_user, $FileBNKContent); $FileBNKContent = str_replace("%DB_PASSWORD%", $db_pwd, $FileBNKContent); $FileBNKContent = str_replace("%WEB_URL%", $web_url, $FileBNKContent); $FileBNKContent = str_replace("%WEB_EMAIL%", $web_email, $FileBNKContent); $FileBNKContent = str_replace("\"%USE_CAPCHA%\"", $use_capcha, $FileBNKContent); $FileBNKContent = str_replace("%CAPCHA_TYPE%", $capcha_type, $FileBNKContent); $FileBNKContent = str_replace("%CAPCHA_NUM%", $capcha_num, $FileBNKContent); // $config_open = @fopen("../includes/config.in.php", "w"); // @fwrite($config_open, "".$FileBNKContent.""); // @fclose($config_open); file_put_contents('../includes/config.in.php', $FileBNKContent); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
$(function(){ $(document).on('submit', '#adminForm', function(){ var month = $('#month').val(); if( month === '' ){ alert('б├╪│╥р┼╫═бр┤╫═╣'); return false; } }); }); </script> <?php include 'templates/classic/footer.php'; $action = input_post('action'); if ($action === 'show') { $month = input_post('month'); $year = input_post('year'); $db = Mysql::load(); $yrmo = "{$year}-{$month}"; ?> <div> <h3>╝┘щ╗ш╟┬╖╒ши╙╦╣ш╥┬у╣в═зр┤╫═╣ <?php echo $def_fullm_th[$month]; ?> ╗╒<?php echo $year; ?> ╩╘╖╕╘╗├╨б╤╣╩╤зд┴</h3> </div> <table> <tr> <th>#</th>
<div> <button type="submit">╓И╧крЦ╨╧я╢╘у╢бр</button> <input type="hidden" name="action" value="show"> </div> </form> <?php } elseif ( $action === 'show' ) { $month = array( '01' => 'а║цр╓а', '02' => '║ьаюр╬я╧╦Л', '03' => 'ау╧р╓а', '04' => 'Юаирб╧', '05' => '╬диюр╓а', '06' => 'ат╤ь╧рб╧', '07' => '║ц║╞р╓а', '08' => 'йт╖кр╓а', '09' => '║я╧брб╧', '10' => '╣ьер╓а', '11' => '╬дх╗т║рб╧', '12' => '╦я╧гр╓а' ); $date = input_post('date'); $hn = input_post('hn'); $drugcode = strtoupper(input_post('drugcode')); $sql = "SELECT a.`hn`,a.`start_date`, b.`date`, b.`ptname`, b.`doctor`, c.`drugcode`, c.`tradname` FROM `pharinj_history` AS a LEFT JOIN `dphardep` AS b ON b.`row_id` = a.`dphardep_id` LEFT JOIN `ddrugrx` AS c ON c.`idno` = a.`dphardep_id` WHERE a.`start_date` LIKE '$date%' AND a.`hn` = '$hn' AND c.`drugcode` = '$drugcode'"; $items = DB::select($sql); if( empty($items) ){ echo "ДаХ╬╨║рцЮ║Г╨╒Имаые╘у╢брбИм╧кея╖"; exit; }
if($_POST['m_start']==""){ $day="╩у"; $dateshow = $_POST['y_start']; }else if($_POST['d_start']==""){ $day="Ю╢вм╧"; $dateshow = $printmonth." ".$_POST['y_start']; }else{ $day="гя╧╥уХ"; $dateshow = $_POST['d_start'].' '.$printmonth." ".$_POST['y_start']; } // ╤ИрЮевм║║рцАй╢╖╪е╣ра╩у╖╨╩цпарЁ if( $checkup !== false ){ $thai_year = ad_to_bc(input_post('y_start')); $where = " ( `thidate` >= '".(($thai_year - 1).'-10-01')."' AND `thidate` <= '".($thai_year.'-09-30')."' ) "; $dateshow = "╖╨╩цпарЁ".$thai_year; }else{ $where = "`thidate` LIKE '$date1%' "; } $sql1 = "CREATE TEMPORARY TABLE `opday1` SELECT `row_id`,`thidate`,`hn`,`an`,`ptname`,`ptright`,`diag`, TRIM(`icd10`) AS `icd10` FROM `opday` WHERE $where AND ( `doctor` LIKE '%╬тхре%' OR `doctor` LIKE '%Юем╩ця╙╜Л%' )"; $query1 = mysql_query($sql1) or die( mysql_error() );
<?php include 'bootstrap.php'; $login_code = get_session('smenucode'); if (authen() === false) { die('Invalid User'); } if ($login_code !== 'ADM') { die('͹Øҵ੾ÒÐâ»Ãá¡ÃÁàÁÍÃìà·èÒ¹Ñé¹·Õèà¢éÒ¶Ö§ä´é'); } $date_in_week = array(0 => 'ÍÒ·ÔµÂì', '¨Ñ¹·Ãì', 'Íѧ¤ÒÃ', '¾Ø¸', '¾ÄËÑÊ', 'ÈØ¡Ãì', 'àÊÒÃì'); $action = input('action'); $db = Mysql::load(); if ($action === 'save') { $id = input_post('id'); $date = $_POST['date']; $db->select("SELECT name FROM doctor WHERE `row_id` = :id ", array(':id' => $id)); $doctor = $db->get_item(); $sql = "INSERT INTO `dr_limit_appoint` (`id`, `dr_id`, `dr_name`, `date`, `user_row`, `date_add`, `date_edit`, `create_by`, `edit_by`)\n\tVALUES(:id, :dr_id, :dr_name, :date_inweek, :user_row, :date_add, :date_edit, :create_by, :edit_by)"; $date_add = date('Y-m-d H:i:s'); foreach ($date as $key => $count) { if ($count != '-') { $data = array(':id' => null, ':dr_id' => $id, ':dr_name' => $doctor['name'], ':date_inweek' => $key, ':user_row' => (int) $count, ':date_add' => $date_add, ':date_edit' => null, ':create_by' => $_SESSION['sIdname'], ':edit_by' => null); $insert = $db->insert($sql, $data); } } header('Location: dt_appoint_diagnose.php'); exit; } $title = 'Ãкº¨Ó¡Ñ´¹Ñ´¼Ùé»èÇÂ'; include 'templates/default/header.php';
<p>мя╬Ю╢╥Ю╘╬рп А©Иа card </p> </div> <form action="onlycard.php" method="post"> <div> ╩у <input type="text" name="dateSelect"> <span style="color: red">* ╣ягмбХр╖ 2559-01</span> </div> <div> <button type="submit">йХ╖мм║</button> <input type="hidden" name="action" value="export"> </div> </form> <?php } else if( $action === 'export' ){ $dateSelect = input_post('dateSelect'); $testMatch = preg_match('/\d+\-\d+$/', $dateSelect); if( $testMatch === 0 ){ ?> <p>м╧ь╜р╣ЦкИЦ╙Ицы╩А╨╨ ╩у-Ю╢вм╧ Ю╙Х╧ 2559-04 Ю╥Хр╧яИ╧</p> <a href="onlycard.php">бИм╧║ея╨</a> <?php exit; } list($thiyr, $rptmo) = explode('-', $dateSelect); $dirPath = "export/$thiyr/$rptmo"; if( !is_dir("export/$thiyr") ){ mkdir("export/$thiyr", 0777);
$db = Mysql::load(); $db->select("SELECT `idcard`, CONCAT(`yot`,' ',`name`,' ',`surname`) AS `ptname` FROM `opcard` WHERE `hn` = '47-1'"); $user = $db->get_item(); // @todo // Save data to database // refer_nhso_sso $run_number = input_post('run_number'); $select_day = input_post('select_day'); $select_month = input_post('select_month'); $select_year = input_post('select_year') + 543; $to = input_post('to'); $type = input_post('type'); $thai_date = to_thai_number($select_day).' '.$def_fullm_th[$select_month].' '.to_thai_number($select_year); $pdf = new SHSPdf('P', 'mm', 'A4'); $pdf->SetThaiFont(); // �絿�� $pdf->SetAutoPageBreak(false, 0); $pdf->SetMargins(30, 19, 20, 25); // left, top, right $pdf->AddPage(); $pdf->SetFont('THSarabun','',16); // ���¡��ҹ������������� $pdf->SetXY(30, 19); $pdf->Image('images/ks_025_2.png', 94, 19, 30, 30, 'PNG'); $pdf->SetXY(30, 39); $pdf->Cell(47, 5, '��� �� ����.��.�/'.to_thai_number($run_number), 1, 1);
<td> <button type="submit">╓И╧кр</button> </td> </tr> </tbody> </table> </form> </div> <script type="text/javascript"> window.onload = function(){ document.getElementById("an").focus(); }; </script> <?php if ($part !== false) { $an = input_post('an'); DB::load(); $sql = "SELECT * FROM `opday` WHERE `an` = :an"; $user = DB::select($sql, array('an' => $an), true); if (empty($user)) { ?> <div><p>ДаХ╬╨╒Имаые╪ыИ╩ХгбЦ╧</p></div> <?php } else { ?> <table> <tbody> <tr style="background-color: #aaaaaa;"> <td>HN</td> <td>AN</td> <td>╙вХм-й║ье</td>
} } </script> <form action="opdprintpdf.php?cHn=<?=$cHn;?>" method="post" name="form2" onSubmit="return chkfrm();"> <?=$cHn ?> <?=$row['name']?> <?=$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> <?php }elseif( $page === 'print' ){ $cHn = input_post('hn'); $no_card = input_post('no_card'); if( $cHn === false ){ echo 'äÁ辺¢éÍÁÙÅ hn ¡ÃسÒàÅ×Í¡¢éÍÁÙÅãËÁèÍÕ¡¤ÃÑé§'; exit; } include 'fpdf_thai/fpdf_thai.php'; class PDF_JavaScript extends FPDF_Thai { var $javascript; var $n_js; function IncludeJS($script) { $this->javascript=$script; }
</div> </form> </div> </div> <?php if( $action === 'showlist' ){ // @doto // ź Session ������������������ $date = input_post('dateSearch'); $sql = "SELECT c.*,b.`orderdate`,a.`autonumber`,a.`labcode`,a.`result`,CONCAT(e.`yot`,' ',e.`name`,' ',e.`surname`) AS `name`, f.`id` FROM ( SELECT `row_id` AS `drugid`,`date`,`drugcode`, `hn`, CONCAT((SUBSTRING(`date`, 1, 4) - 543), SUBSTRING(`date`, 5, 6)) AS `date2` FROM `drugrx` WHERE `drugcode` IN('1COUM-C3','1COUM-C5','1COUM-C1','1COUM-C2') AND `date` LIKE :date AND `amount` > 0 GROUP BY `date2`, `hn` ) AS c LEFT JOIN `resulthead` AS b ON b.`hn` = c.`hn` LEFT JOIN `resultdetail` AS a ON a.`autonumber` = b.`autonumber` LEFT JOIN `opcard` AS e
</div> </div> </form> </div> </div> <?php if( $action === false ){ }elseif( $action === 'show_list' ){ $db = Mysql::load(); $date_select = input_post('date_select'); // dump($date_select); $sql = "SELECT a.`thidate`,a.`hn`,a.`ptname`,a.`diag`,b.`idcard` FROM `opday` AS a LEFT JOIN `opcard` AS b ON b.`hn` = a.`hn` WHERE a.`thidate` LIKE :date_select AND a.`toborow` LIKE 'EX30%' "; $data = array(':date_select' => "$date_select%"); $db->select($sql, $data); $items = $db->get_items(); // dump($items); if( count($items) > 0 ){
<span>* ÃٻẺ »Õ-à´×͹ àªè¹ 2559-01</span> </div> <div> <button type="submit">áÊ´§ÃÒ¡ÒÃ</button> <input type="hidden" name="action" value="display"> </div> </form> </div> </div> <?php $action = input('action'); if ($action === 'display') { $db = Mysql::load(); $date = input_post('date'); $sql = " SELECT SUM(`paid`) AS `total`, SUBSTRING(`ptright`, 1, 3) AS `ptcode` FROM `opacc` WHERE `date` LIKE :date_opacc AND ( `vn` IS NOT NULL AND `vn` != '' ) AND ( `ptright` IS NOT NULL AND `ptright` != '' ) GROUP BY `ptcode`"; $data = array( ':date_opacc' => "$date%" ); $db->select($sql, $data); $items = $db->get_items(); $sql = "SELECT `code`, `name`
</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 echo $user['row_id']; ?> "><?php echo $user['name']; ?>
?> </div> </div> <div class="col"> <div class="cell"> <button type="submit">��ŧ</button> <input type="hidden" name="action" value="show"> </div> </div> </form> </div> </div> </div> <?php $action = input_post('action'); if( $action === 'show' ){ $year_checkup = input('years'); $date_start = ($year_checkup - 1).'-10-01'; $date_end = $year_checkup.'-09-30'; $db = Mysql::load(); ?> <style type="text/css"> @media print{ table{ width: 100%!important; } .page-break{
<td> <label for="txtKeyword">Юевм║╩у: </label> <?php echo getYearList('years', true, $year_dropdown, $year_range); ?> <input type="submit" value="╓И╧кр"> <input type="hidden" name="by" value="date"> </td> </tr> </table> </form> </fieldset> <?php $by = input_post('by'); if ($by === 'date') { $year_select = input_post('years'); $prev_year = $year_select - 1; $date_start = $prev_year . '-10-01'; $date_end = $year_select . '-09-30'; $sql = "SELECT `dm_no`,`hn`,`ptname`,`ptright`,`doctor`,`officer`,`thidate`,`dateN`,`edited_user`\n FROM `diabetes_clinic_history` \n WHERE `dm_no` != 0 \n AND ( `dateN` >= '{$date_start}' AND `dateN` <= '{$date_end}' )\n GROUP BY `dateN`, `hn`"; $query = mysql_query($sql) or die(mysql_error()); ?> <h2>црб╙вХм╪ыИ╩ХгбDM╣ра╩у╖╨╩цпарЁ ╩у<?php echo $year_select + 543; ?> </h2> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" bordercolor="#000000" class="font"> <thead> <tr> <th align="right">#</th> <th><div align="center">DM No.</div></th>
<div> <h3>ʶԵ�����Ѻ �Ǵ-�ѧ���</h3> </div> <form action="statrpu.php" method="post"> <div> ���͡��: <input type="text" name="yearSelect" value="<?=$year_select;?>"> </div> <div> <button type="submit">�ʴ���</button> <input type="hidden" name="action" value="show"> </div> </form> <?php }elseif ($action === 'show') { $year_select = input_post('yearSelect'); $sql = "SELECT SUM(a.`price`) AS `aPrice`, SUM(c.`paid`) AS `cPaid` FROM `patdata` AS a LEFT JOIN `depart` AS b ON a.`idno` = b.`row_id` RIGHT JOIN `opacc` AS c ON c.`txdate` = b.`date` WHERE a.`date` LIKE '2559-05%' AND b.`cashok` IS NOT NULL AND ( a.`code` LIKE '580%' AND a.`code` LIKE '581%' AND a.`code` LIKE '583%' ) GROUP BY MONTH(c.`date`) ";