点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业应用>> 新翔网络OA系统V1.0>> 源文件浏览
[商业版 200RMB] WebForm,下载次数:1 次 | 关键字: PHP MYSQL OA 办公 网络办公

源码截图

源码目录树

;
当前路径:manage/myqingjia.php
<?php
include("../db.php");
include("../checklogin.php");
if(!islogin()){
	header('location:../index.php');
}
switch ($_GET['action']) {
	case 'list':
		$pindex = max(1, intval($_GET['page']));
    $psize = $_GET['limit'];
	$smanageid=$_GET['smanageid'];
	$sjiabieid=$_GET['sjiabieid'];
	$skoujian=$_GET['skoujian'];
	$sxb=$_GET['sxb'];
	$sbaoxiao=$_GET['sbaoxiao'];
	$sxiujia=$_GET['sxiujia'];
	$sniandu=$_GET['sniandu'];
	$sql="SELECT *  FROM ".$db->tablename('vqingjia') ." WHERE id>0";
	if($smanageid!=''){
	$sql=$sql." and manageid = '$manageid'";
	}
	if($sjiabieid!=''){
	$sql=$sql." and (jiabieid like '%$sjiabieid%' or startdate like '%$sjiabieid%')";
	}
	if($sxb!=''){
	$sql=$sql." and xb = '$xb'";
	}
	if($skoujian!=''){
	$sql=$sql." and koujian = '$koujian'";
	}
	if($sbaoxiao!=''){
	$sql=$sql." and baoxiao = '$baoxiao'";
	}
	if($sxiujia!=''){
	$sql=$sql." and xiujia like '%$sxiujia%'";
	}
	if($sniandu!=''){
	$sql=$sql." and niandu like '%$sniandu%'";
	}
	$sql=$sql."  ORDER BY id asc LIMIT ".($pindex - 1) * $psize.','.$psize;
    $list =$db->fetchall($sql);
    $total =count($list);
    $arr = [
        'msg' => '请求成功',
        'code' => 0,
        'data' => $list,
        'count' => $total
    ];
    exit(json_encode($arr));
		break;
	case 'addsave':
	    $manageid=$_POST['manageid'];
	    $jiabieid=$_POST['jiabieid'];
	    $startdate=$_POST['startdate'];
	    $enddate=$_POST['enddate'];
	    $tianshu=$_POST['tianshu'];
	    $koujian=$_POST['koujian'];
	    $tejia=$_POST['tejia'];
	    $xiujia=$_POST['xiujia'];
	    $yuanyin=$_POST['yuanyin'];
	    $baoxiao=$_POST['baoxiao'];
	    $mudidi=$_POST['mudidi'];
	    $niandu=$_POST['niandu'];
	    $beizhu=$_POST['beizhu'];
		$data=compact('manageid','jiabieid','startdate','enddate','tianshu','koujian','tejia','xiujia','yuanyin','baoxiao','mudidi','niandu','beizhu');
		$db->insert('qingjia',$data);//查询获取数组
		$arr=['isOk'=>1,'message'=>'添加成功'];
        exit(json_encode($arr));
		break;	
	case 'editsave':
	    $Id=$_POST['Id'];
		$manageid=$_POST['manageid'];
	    $jiabieid=$_POST['jiabieid'];
	    $startdate=$_POST['startdate'];
	    $enddate=$_POST['enddate'];
	    $tianshu=$_POST['tianshu'];
	    $koujian=$_POST['koujian'];
	    $tejia=$_POST['tejia'];
	    $xiujia=$_POST['xiujia'];
	    $oldxiujia=$_POST['oldxiujia'];
	    $yuanyin=$_POST['yuanyin'];
	    $baoxiao=$_POST['baoxiao'];
	    $mudidi=$_POST['mudidi'];
	    $niandu=$_POST['niandu'];
	    $beizhu=$_POST['beizhu'];
		$data=compact('manageid','jiabieid','startdate','enddate','tianshu','koujian','tejia','xiujia','yuanyin','baoxiao','mudidi','niandu','beizhu');
		$db->update('qingjia',$data,['Id'=>$Id]);//查询获取数组
		$arr=  ['isOk'=>1,'message'=>'修改成功'];
        exit(json_encode($arr));
		break;	
	case 'delall':
		$id = $_POST['ids'];
		$ids=explode(',',$id);//拆分为数组
        if($id==''){
        $arr=['isOk'=>0,'message'=>'删除记录不能为空'];
        exit(json_encode($arr));
        }
       // $data = compact('id');//构造数组等同array("id"=>2)
        $db->delete('qingjia',['Id'=>$ids]);
        $arr=  ['isOk'=>1,'message'=>'删除成功'];
        exit(json_encode($arr));
		break;
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link href="../static/layui/css/layui.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="layui-form" style="padding: 10px 0 0 10px" lay-filter="pwh">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label c...
完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号