game.php,game.php

该段代码主要用于获取并展示用户的基本信息,如昵称、性别、职业等,并显示用户的货币余额。它还包含了页面标题设置及一些未开发的功能,如个人财富模块。此外,存在一个用于切换页面颜色和功能的函数,但某些功能如个人财富和注销登录目前尚未实现。
摘要由CSDN通过智能技术生成

require("config.php");

if (!$_SESSION['user']) {

header('Location: index.php');

exit();

}

require("fun/data/sql_ope.php");

$obj = $_SESSION['user'];

$res = '昵称:' . $tq_user->user_info($obj, '昵称') . '
';

$res = $res .'性别:' . $tq_user->user_info($obj, '性别') . '
';

$res = $res .'职业:' . $tq_user->user_info($obj, '职业') . '
';

$res = $res .'等级:' . $tq_user->user_info($obj, '等级') . '
';

$res = $res . '生命:' . $tq_user->user_info($obj, '生命') . '
';

$res = $res . '法力:' . $tq_user->user_info($obj, '法力') . '
';

$res = $res . '位置:' . $tq_user->user_info($obj, '位置') . '
';

$money = '货币1:' . $tq_user->user_info($obj, '货币1') . '
';

$money = $money.'货币2:' . $tq_user->user_info($obj, '货币2') . '
';

$money = $money.'货币3:' . $tq_user->user_info($obj, '货币3') . '
';

?>

<?php echo $cfg_arr['title']; ?>
  • <?php echo $tq_user->user_info($_SESSION['user'], '昵称'); ?>

    注销登录

layui.use(['layer', 'form', 'element'], function() {

var layer = layui.layer,

form = layui.form,

element = layui.element;

});

function tq_tab(type) {

/* 先切换颜色 */

for (i = 1; i < 5; i++) {

if (i == type) {

color = "#009688;"

} else {

color = "#000000;"

}

$("#tq_tab_" + i).attr("style", "color:" + color);

}

/* 暂时无其他功能 */

if (type > 2) {

layer.msg('暂未开发');

$("#tq_tab_1").attr("style", "color:#009688;");

$("#tq_tab_" + type).attr("style", "color:#000000;");

return;

}

else{

switch(type){

case 2:

var gamebody = $("div.layui-body>div");

gamebody[0].innerHTML = "【个人财富】<?php echo $money; ?>";

//console.log(gamebody[0].innerHTML);

default:

console.log("选择了功能"+type);

}

}

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值