基于PHP的工资管理系统Word格式文档下载.doc

上传人:b****1 文档编号:13166446 上传时间:2022-10-07 格式:DOC 页数:19 大小:150KB
下载 相关 举报
基于PHP的工资管理系统Word格式文档下载.doc_第1页
第1页 / 共19页
基于PHP的工资管理系统Word格式文档下载.doc_第2页
第2页 / 共19页
基于PHP的工资管理系统Word格式文档下载.doc_第3页
第3页 / 共19页
基于PHP的工资管理系统Word格式文档下载.doc_第4页
第4页 / 共19页
基于PHP的工资管理系统Word格式文档下载.doc_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

基于PHP的工资管理系统Word格式文档下载.doc

《基于PHP的工资管理系统Word格式文档下载.doc》由会员分享,可在线阅读,更多相关《基于PHP的工资管理系统Word格式文档下载.doc(19页珍藏版)》请在冰豆网上搜索。

基于PHP的工资管理系统Word格式文档下载.doc

设定系统

员工姓名

员工工种

员工等级

工种基本工资

工种工资比率

查询系统

五、程序设计

1.运行环境easyeclipseforphp.Xampp

2.开发环境easyeclipseforphp.

本次使用PHP进行代码的编写与页面的创作,虽然界面美工方面颇有不足,但总也算完成一个完整的系统。

3.模块关系图

4.模块功能

其中进行系统整体变量设置与调用代码的模块为:

1.php2.phpconfig.phpglobal.php

下面介绍下主要的模块:

Home.php

此页面为主页面,包含登陆索引,此页面可查找并查看员工信息,包括工种,工资和年终奖。

而且此页面可以进入注册页面和设定页面。

Gzsd.php

此页面为工资设定页面,通过此页面可以设置各个工种的基本工资和比率。

Register.php

此页面为注册页面,通过此模块可以注册员工的信息,包括工种,比率等。

Update.php

此页面为计算年终总平均工资页面,由此页面可以进行员工的整体操作。

5.模块运行效果

开启服务器,登陆10.91.4.11/1/home.php,进入如下页面

点击新员工注册进入如下页面

写入相应信息,成功。

返回主页面:

点击工种工资设计:

设计基本工资和比率;

返回主页面

对已有工人进行查询并查看得到如下界面

输入基本工资及各月考勤,津贴得到年终平均工资。

六、程序代码

1.php

<

?

php

include_once("

global.php"

);

header('

Content-Type:

text/html;

charset=GB2312'

$gz=$_GET['

gz'

];

$sql="

select*fromgzgz"

;

$query=mysql_query($sql);

while($row=mysql_fetch_array($query))

{

if($gz==$row[gz])echo$row[jbgz]."

元"

}

>

2.php

$dj=$_GET['

dj'

if($gz==$row[gz]){

$a=pow($row['

bl'

],$_GET['

]-1);

$b=$row['

jbgz'

]*$a;

echo$b;

}

Config.php

$host="

localhost"

$p_username="

root"

$password="

135510"

$db="

gz"

$coding="

gbk"

Global.php

session_start();

include_once('

./config.php'

./mysql_class.php'

./page_class.php'

$db=newmysql($host,$p_username,$password,$db,$coding);

Gzsd.php

include_once("

$db->

select("

gzgz"

"

*"

"

if($_POST[sub]){

for($i=1;

$i=6;

$i++){

$db->

update("

jbgz='

$_POST[jbgz]'

bl='

$_POST[bl]'

id='

$i'

header("

location:

'

./home.php'

tableborder="

1"

formmethod="

post"

action=>

tr>

thwidth="

100"

工种<

/th>

基本工资<

比率<

/tr>

while($result=$db->

fetch_row()){

tralign="

center"

td>

=$result[1]?

/td>

inputtype="

text"

name="

jbgz"

value=<

=$result[2]?

bl"

=$result[3]?

thcolspan="

2"

submit"

sub"

value="

修改"

th>

button"

返回"

onclick="

location.href='

/table>

if($_GET['

del'

]){//删除数据

$id=$_GET['

$db->

delete("

gzb"

"

$id'

jt"

y_id='

kqb"

ygxx"

if($_GET[out]=='

loginout'

){

session_destroy();

header("

./login.php"

ahref="

./register.php"

新员工注册<

/a>

br>

ahref="

./gzsd.php"

工种工资设计<

formaction="

method="

姓名:

xm"

查询"

/form>

./home.php"

返回<

姓名<

等级<

200"

考勤、津贴/工资、年终奖<

$db1=mysql_query("

selectidfromgzb"

$num=mysql_num_rows($db1);

pageft($num,20);

if($firstcount<

0)

$firstcount=0;

if(!

isset($_POST['

sub'

])){

select_limit("

$firstcount,$displaypg);

else{

echo"

11111"

$name=$_POST['

xm'

xmlike'

%$_POST[xm]%'

while($result=$db->

echo$result[4]?

del=<

=$result[0]?

删除<

/<

update.php?

id=<

修改、查看<

7"

=$pagenav?

Mysql_class.php

classmysql{

private$host;

private$user;

private$password;

private$db;

private$coding;

private$sql;

private$que;

function__construct($host,$user,$password,$db,$coding){

$this->

host=$host;

user=$user;

password=$password;

db=$db;

coding=$coding;

connect();

}

functionconnect(){

$con=mysql_connect($this->

host,$this->

user,$this->

password);

if(!

mysql_select_db($this->

db,$con)){

$this->

show_error("

数据库不可用:

$this->

db);

}

mysql_query("

setna

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 英语

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1