?> '; var url_45 = '<?php echo prov_server(45); ?> '; var url_46 = '<?php echo prov_server(46); ?> '; var provname = '<?php echo provname(); ?> '; var nowyear = '<?php echo year(); ?> '; var off_id = '<?php echo $this->session->userdata('hospcode'); ?> '; var user_level = '<?php echo $this->session->userdata('user_level'); ?> '; var csrf_token = '<?php echo $this->security->get_csrf_hash(); ?> ';
exit; } if (isset($_GET["today"])) { today(); exit; } if (isset($_GET["week"])) { week(); exit; } if (isset($_GET["month"])) { month(); exit; } if (isset($_GET["year"])) { year(); exit; } if (isset($_POST["LoadAvgClean"])) { LoadAvgClean(); exit; } if (isset($_GET["apache-front-end-status"])) { apache_status(); exit; } if (isset($_GET["squid-front-end-status"])) { squid_frontend_status(); exit; } if (isset($_GET["cpustats"])) {
<li><a href="<?php echo site_url(); ?> ">หน้าหลัก </a></li> <li><a href="<?php echo site_url() . "/thaimed/"; ?> ">แพทย์แผนไทย </a></li> <li class="active"> ข้อมูลการใช้ยาสมันไพร</li> </ul> <div class="navbar navbar-default"> <form action="#" class="navbar-form"> <select name="year" id='year' class='form-control' style="width: 180px;"> <?php $year = year(); for ($i = $year - 5; $i <= $year; $i++) { if ($i == $year) { echo "<option value=" . $i . " selected=selected> " . ($i + 543) . " </option>"; } else { echo "<option value=" . $i . "> " . ($i + 543) . " </option>"; } } ?> </select> <select id='cup_code' class='form-control' style="width: 250px;"> <?php foreach ($cup as $r) { echo '<option value="' . $r->off_id . '">' . $r->off_name . '</option>'; } ?>
function shamsi($dat = '', $far = False) { $d = array(); for ($row = 1; $row <= 12; $row++) { $d[$row] = 0; } $dy = array(); for ($row = 1; $row <= 7; $row++) { $dy[$row] = ''; } $yy = year($dat); $d[1] = 31; if ($yy % 4 == 0) { $d[2] = 29; } else { $d[2] = 28; } $dy[1] = 'يکشنبه'; $dy[2] = 'دوشنبه'; $dy[3] = 'سه شنبه'; $dy[4] = 'چهار شنبه'; $dy[5] = 'پنج شنبه'; $dy[6] = 'جمعه'; $dy[7] = 'شنبه'; $d[3] = 31; $d[4] = 30; $d[5] = 31; $d[6] = 30; $d[7] = 31; $d[8] = 31; $d[9] = 30; $d[10] = 31; $d[11] = 30; $d[12] = 31; $mm = 0; for ($i = 1; $i <= month($dat) - 1; $i++) { $mm = $mm + $d[$i]; } $yy = $yy - 1; $dd = day($dat); $ldays = $yy * 365 + floor(($yy - 1) / 4) + $mm + $dd; //print "<br>ldays:".$ldays; $idays = $ldays - 226899; $ff = ltrim(month($dat)); $gg = ltrim(day($dat)); if (strlen($ff) < 2) { $ff = '0' . $ff; } if (strlen($gg) < 2) { $gg = '0' . $gg; } $hh = $ff . $gg; if ($hh < '0320' or $hh == '0320' and year($dat) / 4 != floor(year($dat) / 4)) { $yy = year($dat) - 622; } else { $yy = year($dat) - 621; } $mm = $idays - floor(($yy - 1) / 4) - ($yy - 1) * 365; $yy1 = year($dat) - 1; if ($yy1 / 4 == floor($yy1 / 4) and $hh <= '0320') { $mm = $mm + 1; } if (year($dat) / 2 == floor(year($dat) / 2) and year($dat) / 4 != floor(year($dat) / 4) and $hh <= '0320') { $mm = $mm - 1; } if ($mm <= 186) { $dd = $mm % 31; if ($dd == 0) { $dd = 31; $mm = floor($mm / 31); } else { $mm = floor($mm / 31) + 1; } } else { $mm = $mm - 186; $dd = $mm % 30; if ($dd == 0) { $dd = 30; $mm = floor($mm / 30) + 6; } else { $mm = floor($mm / 30) + 7; } } if ($far) { $qstr = strr($yy, 4) . '/'; if ($mm < 10) { $qstr = $qstr . '0' . strr($mm, 1) . '/'; } else { $qstr = $qstr . strr($mm, 2) . '/'; } if ($dd < 10) { $qstr = $qstr . '0' . strr($dd, 1); } else { $qstr = $qstr . strr($dd, 2); } // $qstr=strr($yy,4).'/'.strr($mm,2).'/'.strr($dd,2); } else { $yy = $yy % 100; $qstr = strr($yy, 2) . '/'; if ($mm < 10) { $qstr = $qstr . '0' . strr($mm, 1) . '/'; } else { $qstr = $qstr . strr($mm, 2) . '/'; } if ($dd < 10) { $qstr = $qstr . '0' . strr($dd, 1); } else { $qstr = $qstr . strr($dd, 2); } } return $qstr; }
function year_back($current_year) { return intval(year($current_year, 0, 4)) - 1 . '-' . year($current_year, 5, 2); //year($current_year,8, strlen($current_year)-7); }
$band = 1; echo "<script>alert('Código Nuevo no valido: {$codigoNuevo}')</script>"; } if (marca($marca) == 1) { $band = 1; echo "<script>alert('Marca no valida: {$marca}')</script>"; } if (placas($placas) == 1) { $band = 1; echo "<script>alert('Placas no valida: {$placas}')</script>"; } if (vin($noSerie) == 1) { $band = 1; echo "<script>alert('Número de serie no valido: {$noSerie}')</script>"; } if (year($ano) == 1) { $band = 1; echo "<script>alert('Año no valido: {$ano}')</script>"; } if (tipoV($tipo_v) == 1) { $band = 1; $tipo_v = utf8_encode($tipo_v); echo "<script>alert('Tipo de vehículo no valido: {$tipo_v}')</script>"; } } else { $band = 1; echo "<script>alert(' Llenar toda la información antes de continuar')</script>"; } if ($color != "") { if (color($color) == 1) { $color = utf8_encode($color);
echo $result[0]['name']; ?> "> <br><br> 生年月日: <select name="year"> <option value="">----</option> <?php for ($i = 1950; $i <= 2010; $i++) { ?> <option value="<?php echo $i; ?> " <?php if ($i == year($result[0]['birthday'])) { echo "selected"; } ?> ><?php echo $i; ?> </option> <?php } ?> </select>年 <select name="month"> <option value="">--</option> <?php for ($i = 1; $i <= 12; $i++) {
if ($count > 0) { $selected = $count * 0.8; $i = 0; $optgroup = "2009"; echo '<optgroup label=' . $optgroup . '>'; while ($row = mysql_fetch_array($date_query)) { $period = $row['time_cpi_group']; if ($optgroup !== year($period, 0, 4)) { $optgroup = year($period, 0, 4); echo '<optgroup label=' . $optgroup . '>'; } else { $last = month($period, 5, 2); if ($i == $selected) { echo '<option value=' . $period . ' selected="selected"> ' . $last . ' ' . year($period, 2, 2) . ' </option>'; } else { echo '<option value=' . $period . '> ' . $last . ' ' . year($period, 2, 2) . ' </option>'; } if ($last === 'Dec') { echo '</optgroup>'; } } $i++; } if ($last !== '12') { echo '</optgroup>'; } } ?> </select> </fieldset> </form>
function get_end($local_func) { switch ($local_func) { case 1: // Today // Today case 2: // Yesterday+ // Yesterday+ case 3: // This week // This week case 5: // Last week+ // Last week+ case 6: // This month // This month case 8: // This year return mysql_format_date(mktime(23, 59, 59, month(), day(), year())); // m, d, y -- date ('D, M j', // return mysql_format_date(now()); // m, d, y -- date ('D, M j', break; case 4: // Last week return mysql_format_date(monday() - 1); // m, d, y -- last monday break; case 7: // Last month return mysql_format_date(mktime(0, 0, 0, month(), 1, year())); // m, d, y -- date ('D, M j', break; case 9: // Last year return mysql_format_date(mktime(23, 59, 59, 12, 31, year() - 1)); // m, d, y -- date ('D, M j', break; default: echo __LINE__ . " error error error error error \n"; } }
public function get_person_foreign_by_age_hospcode($as, $ae, $hospcode) { $now_year = year(); //echo $now_year; $birth_start = $now_year - 1 - $ae; $birth_end = $now_year - $as; $s = "'" . $birth_start . "0701'"; $e = "'" . $birth_end . "0630'"; $sql = " SELECT c.villname as name,a.* FROM (SELECT CONCAT(b.CHANGWAT,b.AMPUR,b.TAMBON,b.VILLAGE) as id,"; $sql .= " SUM(IF(a.TYPEAREA='1' AND a.SEX='1',1,0)) as type1_m,"; $sql .= " SUM(IF(a.TYPEAREA='1' AND a.SEX='2',1,0)) as type1_f,"; $sql .= " SUM(IF(a.TYPEAREA='2' AND a.SEX='1',1,0)) as type2_m,"; $sql .= " SUM(IF(a.TYPEAREA='2' AND a.SEX='2',1,0)) as type2_f,"; $sql .= " SUM(IF(a.TYPEAREA='3' AND a.SEX='1',1,0)) as type3_m,"; $sql .= " SUM(IF(a.TYPEAREA='3' AND a.SEX='2',1,0)) as type3_f,"; $sql .= " SUM(IF(a.TYPEAREA='4' AND a.SEX='1',1,0)) as type4_m,"; $sql .= " SUM(IF(a.TYPEAREA='4' AND a.SEX='2',1,0)) as type4_f,"; $sql .= " SUM(IF(a.SEX='1',1,0)) as total_m,SUM(IF(a.SEX='2',1,0)) as total_f,COUNT(*) as total"; $sql .= " FROM person_target a JOIN home b ON a.HOSPCODE=b.HOSPCODE AND a.HID=b.HID "; $sql .= " WHERE a.HOSPCODE='" . $hospcode . "' AND DATE_FORMAT(a.birth,'%Y%m%d') BETWEEN {$s} AND {$e} AND a.NATION NOT in ('99','099') GROUP BY b.VILLAGE) a"; $sql .= " JOIN co_village c ON a.id=c.villid"; $rs = $this->db->query($sql)->result(); return $rs; }
</button> </div> </form> </div> <table class="table table-bordered" id='tbl_ncd_list'> <thead> <tr> <th rowspan="2">#</th> <th rowspan="2">รหัส</th> <th rowspan="2">ชื่อหน่วย</th> <th colspan="3" id='year1'><?php echo year() + 543 - 1; ?> </th> <th colspan="9" id='year2'><?php echo year() + 543; ?> </th> <th rowspan="2">รวม</th> </tr> <tr> <th>ต.ค</th> <th>พ.ย</th> <th>ธ.ค</th> <th>ม.ค</th> <th>ก.พ</th> <th>มี.ค</th> <th>เม.ษ</th> <th>พ.ค</th> <th>มิ.ย</th> <th>ก.ค</th>
function format_Time($timeStr, $nType) { $y = ''; $m = ''; $d = ''; $h = ''; $mi = ''; $s = ''; $format_Time = ''; if (isDate($timeStr) == false) { return @$format_Time; } $y = cStr(year($timeStr)); $m = cStr(month($timeStr)); if (len($m) == 1) { $m = '0' . $m; } $d = cStr(day($timeStr)); //在vb.net里要这样用 D = CStr(CDate(timeStr).Day) if (len($d) == 1) { $d = '0' . $d; } $h = cStr(hour($timeStr)); if (len($h) == 1) { $h = '0' . $h; } $mi = cStr(minute($timeStr)); if (len($mi) == 1) { $mi = '0' . $mi; } $s = cStr(second($timeStr)); if (len($s) == 1) { $s = '0' . $s; } switch ($nType) { case 1: //yyyy-mm-dd hh:mm:ss $format_Time = $y . '-' . $m . '-' . $d . ' ' . $h . ':' . $mi . ':' . $s; break; case 2: //yyyy-mm-dd $format_Time = $y . '-' . $m . '-' . $d; break; case 3: //hh:mm:ss $format_Time = $h . ':' . $mi . ':' . $s; break; case 4: //yyyy年mm月dd日 $format_Time = $y . '年' . $m . '月' . $d . '日'; break; case 5: //yyyymmdd $format_Time = $y . $m . $d; break; case 6: //yyyymmddhhmmss $format_Time = $y . $m . $d . $h . $mi . $s; break; case 7: //mm-dd $format_Time = $m . '-' . $d; break; case 8: //yyyy年mm月dd日 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ':' . $s; break; case 9: //yyyy年mm月dd日H时mi分S秒 早上 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒,' . getDayStatus($h, 1); break; case 10: //yyyy年mm月dd日H时 $format_Time = $y . '年' . $m . '月' . $d . '日' . $h . '时'; break; case 11: //yyyy年mm月dd日H时mi分S秒 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒'; break; case 12: //yyyy年mm月dd日H时mi分 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分'; break; case 13: //yyyy年mm月dd日H时mi分 早上 $format_Time = $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ' ' . getDayStatus($h, 0); break; case 14: //yyyy年mm月dd日 $format_Time = $y . '/' . $m . '/' . $d; break; case 15: //yyyy年mm月 第1周 $format_Time = $y . '年' . $m . '月 第' . GetCountPage($d, 7) . '周'; } return @$format_Time; }
function member_add($add) { global $db; global $smarty; //GLOBAL $mem; //var_dump($add); $sql = "select nick_name from vote_member where nick_name = '{$add['nickname']}'"; //$one = $db->getOne($sql); if ($one) { $year = year(); $mouth = mouth(); $date = date1(); $text = '昵称重复'; $sex = $add['sex']; $region = $add['region']; $password = $add['passwd']; $region_city = $add['region_city']; $birthdatey = $add['birthdatey']; $birthdatem = $add['birthdatem']; $birthdated = $add['birthdated']; $cellphone = $add['cellphone']; $phone = $add['phone']; $marriage = $add['marriage']; $education = $add['education']; $email = $add['email']; $time = date_handling(); $sql = "select * from vote_view"; $view = $db->getOne($sql); if (is_numeric($view['number']) && is_numeric($view['group'])) { $sql = "select t1.*,t2.* from vote as t1 left join vote_content as t2 on t1.vid = t2.vid where t1.is_show = 1 and t2.content != '0' and t1.is_show =1 and t1.vote_starttime<={$time} and t1.vote_endtime>={$time} and t1.`group` = '{$view['group']}' order by t1.vid desc limit 0,{$view['number']}"; } else { $sql = "select t1.*,t2.* from vote as t1 left join vote_content as t2 on t1.vid = t2.vid where t1.is_show = 1 and t2.content != '0' and t1.is_show =1 and t1.vote_starttime<={$time} and t1.vote_endtime>={$time} order by t1.vid desc limit 0,4"; } $vote = $db->getAll($sql); $vote = data_handling($vote); if ($_REQUEST['user_id']) { $uid = $_REQUEST['user_id']; $sql = "select nick_name from vote_member where uid = '{$uid}'"; $user_name = $db->getOne($sql); $nickname = $user_name['nick_name']; } else { $uid = '0'; } $vote = content($vote); foreach ($vote as $key => $value) { $vote_up[$key + 1] = $vote[$key]; } exit; } else { if ($add['birthdatem'] == '0') { $birthdatem = '00'; } else { if ($add['birthdatem'] < '10') { $birthdatem = '0' . $add['birthdatem']; } else { $birthdatem = $add['birthdatem']; } } if ($add['birthdated'] == '0') { $birthdated = '00'; } else { if ($add['birthdated'] < '10') { $birthdated = '0' . $add['birthdated']; } else { $birthdated = $add['birthdated']; } } if ($add['birthdatey'] == '0') { $birthdatey = '1900'; } else { $birthdatey = $add['birthdatey']; } $birthdate = $birthdatey . $birthdatem . $birthdated; $passwd = md5($add[passwd]); $sql = "insert into vote_member (nick_name,password,sex,region,region_city,birthdate,cellphone,phone,marriage,education,email) values ('{$add['nickname']}','{$passwd}','{$add['sex']}','{$add['region']}',{$add['region_city']},'{$birthdate}','{$add['cellphone']}','{$add['phone']}','{$add['marriage']}','{$add['education']}','{$add['email']}')"; $db->query($sql); $sql = "select uid from vote_member where nick_name = '{$add['nickname']}'"; $uid = $db->getOne($sql); $user_id = $uid['uid']; MooSetCookie('user_id', $user_id, time() + 3600 * 24); MooMessageAdmin('注册成功,欢迎参与投票', 'index.php?n=service&h=qixi&user_id=' . $user_id, 1); } }
" method="post"> naam: <input type="text" value="<?php echo $birthday["person"]; ?> " name="name"><br> datum: <select name="day"> <?php echo day($birthday['day']); ?> </select> <select name="month"> <?php echo month($birthday['month']); ?> </select> <select name="year"> <?php echo year($birthday['year']); ?> </select> <button value"edit" name="submit">bewerk</button> </form> </body> </html>
include_once '../CPI/phpscripts/conn.php'; //include_once '../CPI/includes/scripts/aos_session.php'; ?> <?php $start = $_GET['starting']; $end = $_GET['ending']; // echo ''.$start.' :ending: '.$end; // $startE = "2015-09-01"; // $endE = "2015-09-30"; $cpi_classification = array(); $cpi_group = array(); $cpi_subgroup = array(); $cpi_classes = array(); $cpi_pie_value = array(); $cpi_time_start = month($start, 5, 2) . '-' . year($start, 0, 4); $cpi_time_end = month($end, 5, 2) . '-' . year($end, 0, 4); $count_group = 0; $count_subgroup = 0; $count_classes = 0; // $sql_weight = "select weight_value from cpi_weight where start_time<='" . $start_time . "' and end_time>='" . $start_time . "' and CODE='" . $code . "'"; // $sql_weight = mysql_query($sql_weight) or die(mysql_error()); // $count_weight = mysql_num_rows($sql_weight); // if ($count_weight > 0) // { // while ($row2 = mysql_fetch_array($sql_weight)) { // return $row2['weight_value']; // } // } // return 0; $sql_group = "Select cpi_group.id_group,name,weight_value,color_group from cpi_group,cpi_weight where cpi_group.id_group=cpi_weight.CODE" . " and start_time<='" . $start . "' and end_time>='" . $start . "' "; //echo ''.$sql_group.'<br>';