File: /var/www/dk/wp-content/themes/food/header-food.php
<?php
$error_msg = '';
if (isset($_POST['action']) && $_POST['action'] == 'login') {
$rv = login_by_type($_POST['user_login_name'], $_POST['user_pass']);
if ($rv->rc > 0) {
echo "<script>alert('" . $rv->msg . "')</script>";
}
}
if (isset($_POST['action']) && $_POST['action'] == 'loginout') {
user_login_out();
}
$user_info = get_login_user();
?>
<script>
const user_info = JSON.parse('<?php echo json_encode($user_info) ?>')
</script>
<!DOCTYPE html>
<!--<html lang="en">-->
<html lang="cmn-Hant-HK" style="height: 100%">
<!--<html lang="zh-CN">-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- <meta name="x5-fullscreen" content="true"> -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta content="telephone=no" name="format-detection"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
<!-- <meta name="full-screen" content="yes"> -->
<title>Medical Media Channel</title>
<meta name="description" content="">
<!-- <link rel="shortcut icon" href="--><?php //bloginfo('template_directory'); ?><!--/food-app/img/logo.png" type="image/x-icon">-->
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/food-app/img/MedicalMediaChannel/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/food-app/css/antd.min.css">
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/style.css?v=1">
<script src="<?php bloginfo('template_directory'); ?>/food-app/js/qs.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/food-app/js/vue.min.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/food-app/js/httpVueLoader.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/food-app/js/moment.min.js"></script>
<script src="<?php bloginfo('template_directory'); ?>/food-app/js/antd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<style>
body{
background-color: #1DBAFF;
min-height: 100%;
/*display: flex;*/
flex-direction: column;
height: 100%;
}
</style>
<body >
<script>
function setAutoSize() {
var htmlDom = document.getElementsByTagName('html')[0]
var temp_w = document.body.clientWidth
if (document.body.clientWidth >= 1280) {
htmlDom.style.fontSize = '80px'
} else if (document.body.clientWidth >= 768) {
htmlDom.style.fontSize = '50px'
} else {
nowSize = (temp_w / 750) * 100
htmlDom.style.fontSize = nowSize + 'px'
}
}
window.onresize = setAutoSize
setAutoSize()
</script>