|
|
@@ -1,542 +1,552 @@
|
|
|
-<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
|
|
|
-<%request.setCharacterEncoding("utf-8");%>
|
|
|
-<%@ page language="java" import="java.sql.*,java.util.Arrays" %>
|
|
|
-<%@ page language="java" import="java.util.*" %>
|
|
|
-<%@ page language="java" import="util.*" %>
|
|
|
-<%@ page language="java" import="system.*" %>
|
|
|
-<%@ page language="java" import="biz.*" %>
|
|
|
-<%@ page language="java" import="dbconnection.*" %>
|
|
|
-<%@ page language="java" import="net.sf.json.JSONObject" %>
|
|
|
-<%@ page language="java" import="java.io.*, org.apache.commons.fileupload.*,java.util.regex.*,java.text.SimpleDateFormat"%>
|
|
|
-<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
|
|
|
-<%
|
|
|
- String path = request.getContextPath();
|
|
|
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
|
|
- String defaultDate = DateUtil.getYMDHMS();
|
|
|
- String JJRmemberpk = ExtendString.getDBStr( request.getParameter("bmemberpk") );//经纪人memberpk
|
|
|
- String JJRbrokepk = ExtendString.getDBStr( request.getParameter("brokepk") ); //经纪人pk
|
|
|
- String MTmemberpk = ExtendString.getDBStr( request.getParameter("memberpk") ); //模特memberpk
|
|
|
- String flag = ExtendString.getDBStr( request.getParameter("flag") ); //0查看,1新增,2修改
|
|
|
- String operator = ExtendString.getDBStr( request.getParameter("operator") );
|
|
|
- String tmpName="";
|
|
|
- String tmpID, sql;
|
|
|
- javax.sql.rowset.CachedRowSet rs;
|
|
|
-
|
|
|
- if ( (operator==null) || operator.equals("") ) operator = "";
|
|
|
- if ( JJRmemberpk.equals("") ) JJRmemberpk = "0";
|
|
|
- if ( JJRbrokepk.equals("") ) JJRbrokepk = "0";
|
|
|
- if ( MTmemberpk.equals("") ) MTmemberpk = "0";
|
|
|
- if (flag.equals("")) flag = "0";
|
|
|
-
|
|
|
- out.clear();
|
|
|
- String D_ModelInfopk="0", D_MemberPK="0", D_Tel="", D_Name="", D_Stage="", D_LName="", D_Phone="", D_addr="",
|
|
|
- D_AreaID="0", D_BrokePK="0", D_BMemberPK="0", D_nominate="0";
|
|
|
- String D_ratio_R="100", D_ratio_V="50", D_ratio_S="70", D_Is_V="0", D_CardPK="0";
|
|
|
- String D_ratio_RR="0", D_ratio_VR="0", D_ratio_SR="0",
|
|
|
- D_ratio_RRM="0", D_ratio_VRM="10", D_ratio_SRM="10";
|
|
|
- String D_Age="", D_hei="0", D_wei="0", D_wai="0", D_bust="0", D_hip="0", D_VPrice="0";
|
|
|
- String D_SuperName="";
|
|
|
-
|
|
|
- if (operator.equalsIgnoreCase("doPost") )//执行插入,更新
|
|
|
- {
|
|
|
- try {
|
|
|
- DiskFileUpload fu = new DiskFileUpload();
|
|
|
- //fu.initialize(pageContext);
|
|
|
- fu.setHeaderEncoding("UTF-8"); // 此句为主要代码
|
|
|
- // 设置允许用户上传文档大小,单位:字节,这里设为100M
|
|
|
- fu.setSizeMax(100 * 1024 * 1024);
|
|
|
- // 设置最多只允许在内存中存储的数据,单位:字节
|
|
|
- fu.setSizeThreshold(4096);
|
|
|
- // 开始读取上传信息
|
|
|
- List fileItems = fu.parseRequest(request);
|
|
|
- // 依次处理每个上传的文件
|
|
|
- Iterator iter = fileItems.iterator();
|
|
|
- while (iter.hasNext()) {
|
|
|
- FileItem item = (FileItem) iter.next();
|
|
|
- String fieldName = item.getFieldName();
|
|
|
- if(fieldName==null || fieldName.equals("")) continue; // 忽略其他不是文件域的所有表单信息
|
|
|
-
|
|
|
- if (item.isFormField()) //普通数据
|
|
|
- {
|
|
|
- String formContent = ExtendString.getDBStr( item.getString("utf-8") ); //取值
|
|
|
- if (fieldName.equalsIgnoreCase("ModelInfopk")) D_ModelInfopk = KindEditor.getDBStr( formContent );
|
|
|
- else if (fieldName.equalsIgnoreCase("MemberPK")) D_MemberPK = formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Tel")) D_Tel = formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Name")) D_Name =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Stage")) D_Stage =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("LName")) D_LName =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Phone")) D_Phone =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("addr")) D_addr =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Area")) D_AreaID=formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("BrokePK")) D_BrokePK =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("BMemberPK")) D_BMemberPK =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_R")) D_ratio_R =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_V")) D_ratio_V =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_S")) D_ratio_S =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("Is_V")) D_Is_V =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("CardPK")) D_CardPK =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("nominate")) D_nominate=formContent;
|
|
|
-
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_RR")) D_ratio_RR =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_VR")) D_ratio_VR =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_SR")) D_ratio_SR =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_RRM")) D_ratio_RRM =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_VRM")) D_ratio_VRM =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("ratio_SRM")) D_ratio_SRM =formContent;
|
|
|
-
|
|
|
- else if (fieldName.equalsIgnoreCase("Age")) D_Age =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("hei")) D_hei =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("wei")) D_wei =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("wai")) D_wai =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("bust")) D_bust =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("hip")) D_hip =formContent;
|
|
|
- else if (fieldName.equalsIgnoreCase("VPrice")) D_VPrice =formContent;
|
|
|
-
|
|
|
- }
|
|
|
- else //文件数据
|
|
|
- {
|
|
|
- /*
|
|
|
- UpLoad.PostFileResult R= UpLoad.PostFile(request, item, "broker");
|
|
|
- if ( R.Result<0 )
|
|
|
- {
|
|
|
- out.print( R.PostLastError );
|
|
|
- return;
|
|
|
- }
|
|
|
- if (fieldName.equalsIgnoreCase("Pic")) Pic = R.PostFileURL;
|
|
|
- else if (fieldName.equalsIgnoreCase("PCScreen")) PCScreen = R.PostFileURL;
|
|
|
- */
|
|
|
- }
|
|
|
- }
|
|
|
- }catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- out.print(e.getMessage());
|
|
|
- return;
|
|
|
- }
|
|
|
- //数据合法性检查
|
|
|
- if (D_BrokePK.equals("") || D_BMemberPK.equals("0"))
|
|
|
- {
|
|
|
- out.print("数据传递错误,所属经纪人为空。");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (D_Stage.equals("")) D_Stage = D_Name;
|
|
|
-
|
|
|
- String[] sqls = new String[2];
|
|
|
-
|
|
|
- if (D_ModelInfopk.equals("0"))
|
|
|
- {
|
|
|
- D_ModelInfopk = dbtool.getNewPK(db, "ModelInfo");
|
|
|
- String QRCode = thmodel.getNewMemQrCode( db );
|
|
|
-
|
|
|
- if (QRCode.equals(""))
|
|
|
- {
|
|
|
- out.print( "获取推荐码失败:"+db.LastError );
|
|
|
- return;
|
|
|
- }
|
|
|
- else if (D_ModelInfopk.equals(""))
|
|
|
- {
|
|
|
- out.print( dbtool.LastError );
|
|
|
- return;
|
|
|
- }
|
|
|
- D_MemberPK= dbtool.getNewPK(db, "MemberInfo");
|
|
|
- if (D_MemberPK.equals(""))
|
|
|
- {
|
|
|
- out.print( dbtool.LastError );
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- sqls[0] = String.format("Insert Into ModelInfo(PK, MemberPK, Name, Stage, LName, addr, "+
|
|
|
- " BrokePK, BMemberPK, ratio_R, ratio_V, ratio_S, "+
|
|
|
- " Is_V, CardPK, nominate, "+
|
|
|
- " ratio_RR, ratio_VR, ratio_SR, ratio_RRM, ratio_VRM, ratio_SRM, "+
|
|
|
- " hei, wei, wai, bust, hip, VPrice ) "+
|
|
|
- "Values (%s, %s, '%s', '%s', '%s', '%s', "+
|
|
|
- " %s, %s, '%s', %s, %s, "+
|
|
|
- " %s, %s, %s, "+
|
|
|
- " %s, %s, %s, %s, %s, %s, "+
|
|
|
- " %s, %s, %s, %s, %s, %s ) ",
|
|
|
- D_ModelInfopk, D_MemberPK, D_Name, D_Stage, D_LName, D_addr,
|
|
|
- D_BrokePK, D_BMemberPK, D_ratio_R, D_ratio_V, D_ratio_S,
|
|
|
- D_Is_V, D_CardPK, D_nominate,
|
|
|
- D_ratio_RR, D_ratio_VR, D_ratio_SR, D_ratio_RRM, D_ratio_VRM, D_ratio_SRM,
|
|
|
- D_hei, D_wei, D_wai, D_bust, D_hip, D_VPrice );
|
|
|
-
|
|
|
- sqls[1] = String.format("Insert Into MemberInfo (PK, Tel, Pass, MembType, "+
|
|
|
- " Phone, Pet, Area, QRCode, Age, MDate ) "+
|
|
|
- "Values(%s, '%s', '123456', %s, "+
|
|
|
- " '%s', '%s', %s, '%s', '%s', sysdate() ) ",
|
|
|
- D_MemberPK, D_Tel, thmodel.MEMTYPE_Model,
|
|
|
- D_Phone, D_Stage, D_AreaID, QRCode, D_Age );
|
|
|
- }
|
|
|
- else //更新
|
|
|
- {
|
|
|
- sqls[0] = String.format("Update ModelInfo "+
|
|
|
- "Set Name='%s', Stage='%s', LName='%s', addr='%s', "+
|
|
|
- " ratio_R=%s, ratio_V=%s, ratio_S=%s, "+
|
|
|
- " Is_V=%s, CardPK = %s, nominate=%s, "+
|
|
|
- " ratio_RR=%s, ratio_VR=%s, ratio_SR=%s, ratio_RRM=%s, ratio_VRM=%s, ratio_SRM=%s, "+
|
|
|
- " hei=%s, wei=%s, wai=%s, bust=%s, hip=%s, VPrice=%s "+
|
|
|
- "Where PK = %s ",
|
|
|
- D_Name, D_Stage, D_LName, D_addr,
|
|
|
- D_ratio_R, D_ratio_V, D_ratio_S,
|
|
|
- D_Is_V, D_CardPK, D_nominate,
|
|
|
- D_ratio_RR, D_ratio_VR, D_ratio_SR, D_ratio_RRM, D_ratio_VRM, D_ratio_SRM,
|
|
|
- D_hei, D_wei, D_wai, D_bust, D_hip, D_VPrice,
|
|
|
- D_ModelInfopk );
|
|
|
- sqls[1] = String.format("Update MemberInfo "+
|
|
|
- "Set Tel='%s', Pet='%s', Phone='%s', Area=%s, Age='%s' "+
|
|
|
- "Where PK = %s ",
|
|
|
- D_Tel, D_Stage, D_Phone, D_AreaID, D_Age,
|
|
|
- D_MemberPK );
|
|
|
- }
|
|
|
-
|
|
|
- //检查帐号是否重复
|
|
|
- sql = String.format("Select Count(*) C From MemberInfo where Tel='%s' and PK<>%s ", D_Tel, D_MemberPK);
|
|
|
- rs = db.executeQuery(sql);
|
|
|
- if (rs==null)
|
|
|
- {
|
|
|
- out.print("检查帐号是否重复失败:"+db.LastError);
|
|
|
- return;
|
|
|
- }
|
|
|
- rs.next();
|
|
|
- if (rs.getInt("C")>0)
|
|
|
- {
|
|
|
- rs.close();
|
|
|
- out.println("当前帐号与其它帐号重复,不可保存。");
|
|
|
- return;
|
|
|
- }
|
|
|
- rs.close();
|
|
|
-
|
|
|
- //
|
|
|
- if (db.executeUpdate( sqls ))
|
|
|
- out.print("success");
|
|
|
- else
|
|
|
- out.print("数据保存失败。"+db.LastError );
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- //正常新增或浏览
|
|
|
- if (!MTmemberpk.equals("0"))
|
|
|
- {
|
|
|
- sql ="select a.pk as ModelInfopk, a.MemberPK, b.Tel, a.Name, a.Stage, a.LName, b.Phone, a.addr, "+
|
|
|
- " b.Area, a.BrokePK, a.BMemberPK, "+
|
|
|
- " CAST(FORMAT(a.ratio_R,0) as char) as ratio_R, "+
|
|
|
- " CAST(FORMAT(a.ratio_V,0) as char) as ratio_V, "+
|
|
|
- " CAST(FORMAT(a.ratio_S,0) as char) as ratio_S, "+
|
|
|
- " a.ratio_RR, a.ratio_VR, a.ratio_SR, a.ratio_RRM, a.ratio_VRM, a.ratio_SRM, "+
|
|
|
- " a.Is_V, a.CardPK, c.CardName, "+
|
|
|
- " DATE_FORMAT(b.MDate,'%Y-%m-%d %H:%i:%s') as MDate, "+
|
|
|
- " a.nominate, b.age, a.hei, a.wei, a.wai, a.bust, a.hip, a.VPrice "+
|
|
|
- "from ModelInfo a inner Join MemberInfo b on a.MemberPK = b.PK "+
|
|
|
- " Left Join ModelCard c on a.CardPK = C.PK "+
|
|
|
- "where a.MemberPK= "+MTmemberpk+" ";
|
|
|
- rs = db.executeQuery( sql );
|
|
|
- if (rs==null)
|
|
|
- {
|
|
|
- out.print("后台获取数据失败: "+db.LastError);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (rs.next())
|
|
|
- {
|
|
|
- D_ModelInfopk = ExtendString.getDBStr( rs.getString("ModelInfopk") );
|
|
|
- D_MemberPK = ExtendString.getDBStr( rs.getString("MemberPK") );
|
|
|
- D_Tel = ExtendString.getDBStr( rs.getString("Tel") );
|
|
|
- D_Name = ExtendString.getDBStr( rs.getString("Name") );
|
|
|
- D_Stage= ExtendString.getDBStr( rs.getString("Stage") );
|
|
|
- D_LName= ExtendString.getDBStr( rs.getString("LName") );
|
|
|
- D_Phone= ExtendString.getDBStr( rs.getString("Phone") );
|
|
|
- D_addr = ExtendString.getDBStr( rs.getString("addr") );
|
|
|
- D_AreaID= ExtendString.getDBStr( rs.getString("Area") );
|
|
|
- D_BrokePK = ExtendString.getDBStr( rs.getString("BrokePK") );
|
|
|
- D_BMemberPK = ExtendString.getDBStr( rs.getString("BMemberPK") );
|
|
|
- D_ratio_R = String.valueOf( rs.getFloat("ratio_R") );
|
|
|
- D_ratio_V = String.valueOf( rs.getFloat("ratio_V") );
|
|
|
- D_ratio_S = String.valueOf( rs.getFloat("ratio_S") );
|
|
|
- D_Is_V = String.valueOf( rs.getInt("Is_V") );
|
|
|
- D_CardPK = String.valueOf( rs.getInt("CardPK") );
|
|
|
- D_nominate= String.valueOf( rs.getInt("nominate") );
|
|
|
-
|
|
|
- D_ratio_RR = String.valueOf( rs.getFloat("ratio_RR") );
|
|
|
- D_ratio_VR = String.valueOf( rs.getFloat("ratio_VR") );
|
|
|
- D_ratio_SR = String.valueOf( rs.getFloat("ratio_SR") );
|
|
|
- D_ratio_RRM = String.valueOf( rs.getFloat("ratio_RRM") );
|
|
|
- D_ratio_VRM = String.valueOf( rs.getFloat("ratio_VRM") );
|
|
|
- D_ratio_SRM = String.valueOf( rs.getFloat("ratio_SRM") );
|
|
|
-
|
|
|
- D_Age = ExtendString.getDBStr( rs.getString("Age") );
|
|
|
- D_hei = String.valueOf( rs.getFloat("hei") );
|
|
|
- D_wei = String.valueOf( rs.getFloat("wei") );
|
|
|
- D_wai = String.valueOf( rs.getFloat("wai") );
|
|
|
- D_bust = String.valueOf( rs.getFloat("bust") );
|
|
|
- D_hip = String.valueOf( rs.getFloat("hip") );
|
|
|
- D_VPrice = String.valueOf( rs.getFloat("VPrice") );
|
|
|
- }
|
|
|
- rs.close();
|
|
|
- }
|
|
|
-
|
|
|
- //查询经纪人所属机构
|
|
|
- D_MemberPK = MTmemberpk;
|
|
|
- if (!JJRbrokepk.equals("0"))
|
|
|
- {
|
|
|
- sql = "Select PK, MemberPK, Name from BrokerInfor where PK = "+JJRbrokepk;
|
|
|
- rs = db.executeQuery(sql);
|
|
|
- if (rs!=null && rs.next())
|
|
|
- {
|
|
|
- D_BrokePK = JJRbrokepk;
|
|
|
- D_BMemberPK = rs.getString("MemberPK");
|
|
|
- D_SuperName = rs.getString("Name");
|
|
|
- }
|
|
|
- if (rs!=null) rs.close();
|
|
|
- }
|
|
|
-%>
|
|
|
-<html>
|
|
|
-
|
|
|
-<head>
|
|
|
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
-<base href="<%=basePath %>"/>
|
|
|
-<title>模特</title>
|
|
|
-<link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
|
-<link rel="stylesheet" type="text/css" href="css/WdatePicker.css" />
|
|
|
-<link rel="stylesheet" type="text/css" href="css/skin_/table.css" />
|
|
|
-<link rel="stylesheet" type="text/css" href="css/jquery.grid.css" />
|
|
|
-<link rel="stylesheet" type="text/css" href="css/skin_/form.css" />
|
|
|
-<link href="umeditor/themes/default/_css/umeditor.css" type="text/css" rel="stylesheet">
|
|
|
-<script type="text/javascript" src="js/jquery.js"></script>
|
|
|
-<script type="text/javascript" src="js/global.js"></script>
|
|
|
-<script type="text/javascript" src="js/jquery.select.js"></script>
|
|
|
-<script type="text/javascript" src="js/core.js"></script>
|
|
|
-<script type="text/javascript" src="js/WdatePicker.js"></script>
|
|
|
-<script type="text/javascript" src="js/jquery-form.js"></script>
|
|
|
- <style type="text/css">
|
|
|
- .select { width:173px; line-height:25px;}
|
|
|
- img { height:auto; width:auto; width:100%; } //所有图片自适应手机屏幕大小
|
|
|
- </style>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<script language="javascript">
|
|
|
-var result = 0;
|
|
|
- function check()
|
|
|
- {
|
|
|
- if(document.form1.Tel.value == "")
|
|
|
- {
|
|
|
- alert("请输入帐号!");
|
|
|
- document.form1.Tel.focus();
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- if(document.form1.Name.value == "")
|
|
|
- {
|
|
|
- alert("请输入模特姓名!");
|
|
|
- document.form1.Name.focus();
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- $('#form1').ajaxSubmit(
|
|
|
- {
|
|
|
- url: "<%=basePath%>member/model_.jsp?operator=doPost&bmemberpk=<%=JJRmemberpk%>&brokepk=<%=JJRbrokepk%>&memberpk=<%=MTmemberpk%>",
|
|
|
- contentType: "application/x-www-form-urlencoded; charset=utf-8",
|
|
|
- success:function(data)
|
|
|
- {
|
|
|
- if( data.indexOf("success")>=0)
|
|
|
- {
|
|
|
- result = 1;
|
|
|
- parentDialog.close();
|
|
|
- }
|
|
|
- else alert(data);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
-</script>
|
|
|
-
|
|
|
-<form name="form1" id="form1" method="post" enctype="multipart/form-data">
|
|
|
-<div id="container">
|
|
|
- <div id="main">
|
|
|
- <h2 class="subfild">
|
|
|
- <span style="width:200px">
|
|
|
- <span>模特信息</span>
|
|
|
- </span>
|
|
|
- </h2>
|
|
|
-
|
|
|
- <input type="hidden" name="ModelInfopk" value="<%=D_ModelInfopk%>">
|
|
|
- <input type="hidden" name="MemberPK" value="<%=D_MemberPK%>">
|
|
|
- <input type="hidden" name="BrokePK" value="<%=JJRbrokepk%>">
|
|
|
- <input type="hidden" name="BMemberPK" value="<%=JJRmemberpk%>">
|
|
|
-
|
|
|
- <div class="subfild-content base-info" style="width:100%;">
|
|
|
- <table id="" style="width:100%">
|
|
|
- <%
|
|
|
- if (!D_SuperName.equals(""))
|
|
|
- {
|
|
|
- %>
|
|
|
- <tr>
|
|
|
- <td style="80px">经纪人</td>
|
|
|
- <td colspan="3"><%=D_SuperName%></td>
|
|
|
- </tr>
|
|
|
- <%
|
|
|
- }
|
|
|
- %>
|
|
|
- <tr>
|
|
|
- <td>帐号</td>
|
|
|
- <td colspan="3"><input type="text" name="Tel" value="<%=D_Tel%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >姓名</td>
|
|
|
- <td colspan="3"><input type="text" name="Name" value="<%=D_Name%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >电话</td>
|
|
|
- <td colspan="3"><input type="text" name="Phone" value="<%=D_Phone%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >艺名</td>
|
|
|
- <td colspan="3"><input type="text" name="Stage" value="<%=D_Stage%>" /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >年龄</td>
|
|
|
- <td colspan="3"><input type="text" name="age" value="<%=D_Age%>" /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >身高</td>
|
|
|
- <td colspan="3"><input type="text" name="hei" value="<%=D_hei%>" /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >体重</td>
|
|
|
- <td colspan="3"><input type="text" name="wei" value="<%=D_wei%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >腰围</td>
|
|
|
- <td colspan="3"><input type="text" name="wai" value="<%=D_wai%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >胸围</td>
|
|
|
- <td colspan="3"><input type="text" name="bust" value="<%=D_bust%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >臀围</td>
|
|
|
- <td colspan="3"><input type="text" name="hip" value="<%=D_hip%>" /></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td >视频聊天单价</td>
|
|
|
- <td colspan="3"><input type="text" name="VPrice" value="<%=D_VPrice%>" /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >个性签名</td>
|
|
|
- <td colspan="3"><input type="text" name="LName" value="<%=D_LName%>" /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >是否接受视频聊天</td>
|
|
|
- <td colspan="3">
|
|
|
- <select name="Is_V" id="Is_V" class="select">
|
|
|
- <option value="1" <% if (D_Is_V.equals("1")) out.print("selected");%> > 是 </option>
|
|
|
- <option value="0" <% if (D_Is_V.equals("0")) out.print("selected");%> > 否 </option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >地区</td>
|
|
|
- <td colspan="3">
|
|
|
- <select name="Area" id="Area" class="select">
|
|
|
- <%
|
|
|
- sql = "Select PK, Name from datatypeinfo where typeName ='地区' order by OrdID ";
|
|
|
- rs = db.executeQuery( sql );
|
|
|
- while ((rs!=null) && rs.next())
|
|
|
- {
|
|
|
- tmpID = rs.getString("PK");
|
|
|
- tmpName = rs.getString("Name");
|
|
|
- if (D_AreaID.equals( tmpID ))
|
|
|
- {
|
|
|
- %>
|
|
|
- <option value="<%=tmpID%>" selected> <%=tmpName%> </option>
|
|
|
- <%
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- %>
|
|
|
- <option value="<%=tmpID%>"> <%=tmpName%> </option>
|
|
|
- <%
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- if (rs!=null) rs.close();
|
|
|
- %>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >是否推荐</td>
|
|
|
- <td colspan="3">
|
|
|
- <select name="nominate" id="nominate" class="select">
|
|
|
- <option value="1" <% if (D_nominate.equals("1")) out.print("selected");%> > 是 </option>
|
|
|
- <option value="0" <% if (D_nominate.equals("0")) out.print("selected");%> > 否 </option>
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td colspan="4" > </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>身 份</td>
|
|
|
- <td>红包分成(%)</td>
|
|
|
- <td>视频分成(%)</td>
|
|
|
- <td>服务分成(%)</td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >模特自己</td>
|
|
|
- <td ><input type="text" name="ratio_R" value="<%=D_ratio_R%>" style='width:80px;'/></td>
|
|
|
- <td ><input type="text" name="ratio_V" value="<%=D_ratio_V%>" style='width:80px;'/></td>
|
|
|
- <td ><input type="text" name="ratio_S" value="<%=D_ratio_S%>" style='width:80px;'/></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >其她模特推荐人</td>
|
|
|
- <td ><input type="text" name="ratio_RR" value="<%=D_ratio_RR%>" style='width:80px;' /></td>
|
|
|
- <td ><input type="text" name="ratio_VR" value="<%=D_ratio_VR%>" style='width:80px;' /></td>
|
|
|
- <td ><input type="text" name="ratio_SR" value="<%=D_ratio_SR%>" style='width:80px;' /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td >会员推荐人</td>
|
|
|
- <td ><input type="text" name="ratio_RRM" value="<%=D_ratio_RRM%>" style='width:80px;' /></td>
|
|
|
- <td ><input type="text" name="ratio_VRM" value="<%=D_ratio_VRM%>" style='width:80px;' /></td>
|
|
|
- <td ><input type="text" name="ratio_SRM" value="<%=D_ratio_SRM%>" style='width:80px;' /></td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td colspan="4" > </td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- <tr>
|
|
|
- <td colspan="4" class="buttons" style="text-align: center;">
|
|
|
- <%
|
|
|
- if (flag.equals("1") || flag.equals("2") )
|
|
|
- {
|
|
|
- %>
|
|
|
- <input type="button" onClick="javascript:check();" id="btn_save" class="btn3_mouseout" onmouseover="this.className='btn3_mouseover'" onmouseout="this.className='btn3_mouseout'" onmousedown="this.className='btn3_mousedown'" onmouseup="this.className='btn3_mouseup'" value="保 存"/>
|
|
|
- <%
|
|
|
- }
|
|
|
- %>
|
|
|
- <input type="button" onClick="parentDialog.close();" id="btn_back" class="btn3_mouseout" onmouseover="this.className='btn3_mouseover'" onmouseout="this.className='btn3_mouseout'" onmousedown="this.className='btn3_mousedown'" onmouseup="this.className='btn3_mouseup'" value="返 回"/></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
-</div>
|
|
|
-</form>
|
|
|
-</body>
|
|
|
-</html>
|
|
|
+<%@ page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
|
|
|
+<%request.setCharacterEncoding("utf-8");%>
|
|
|
+<%@ page language="java" import="java.sql.*,java.util.Arrays" %>
|
|
|
+<%@ page language="java" import="java.util.*" %>
|
|
|
+<%@ page language="java" import="util.*" %>
|
|
|
+<%@ page language="java" import="system.*" %>
|
|
|
+<%@ page language="java" import="biz.*" %>
|
|
|
+<%@ page language="java" import="dbconnection.*" %>
|
|
|
+<%@ page language="java" import="net.sf.json.JSONObject" %>
|
|
|
+<%@ page language="java"
|
|
|
+ import="java.io.*, org.apache.commons.fileupload.*,java.util.regex.*,java.text.SimpleDateFormat" %>
|
|
|
+<%@ page import="org.apache.commons.lang.StringUtils" %>
|
|
|
+<%@ page import="javax.sql.rowset.CachedRowSet" %>
|
|
|
+<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page"/>
|
|
|
+<%
|
|
|
+ String path = request.getContextPath();
|
|
|
+ String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
|
|
+ String defaultDate = DateUtil.getYMDHMS();
|
|
|
+ String JJRmemberpk = ExtendString.getDBStr(request.getParameter("bmemberpk"));//经纪人memberpk
|
|
|
+ String JJRbrokepk = ExtendString.getDBStr(request.getParameter("brokepk")); //经纪人pk
|
|
|
+ String MTmemberpk = ExtendString.getDBStr(request.getParameter("memberpk")); //模特memberpk
|
|
|
+ String flag = ExtendString.getDBStr(request.getParameter("flag")); //0查看,1新增,2修改
|
|
|
+ String operator = ExtendString.getDBStr(request.getParameter("operator"));
|
|
|
+ String tmpName = "";
|
|
|
+ String tmpID, sql;
|
|
|
+ javax.sql.rowset.CachedRowSet rs;
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(JJRmemberpk) || StringUtils.isNotEmpty(JJRbrokepk)) {
|
|
|
+ String s = "select BrokePK, BMemberPK from modelinfo where MemberPK = " + MTmemberpk;
|
|
|
+ CachedRowSet rss = db.executeQuery(s);
|
|
|
+ try {
|
|
|
+ if (rss.next()) {
|
|
|
+ JJRbrokepk = rss.getString("BrokePK");
|
|
|
+ JJRmemberpk = rss.getString("BMemberPK");
|
|
|
+ }
|
|
|
+ } catch (SQLException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if ((operator == null) || operator.equals("")) operator = "";
|
|
|
+ if (JJRmemberpk.equals("")) JJRmemberpk = "0";
|
|
|
+ if (JJRbrokepk.equals("")) JJRbrokepk = "0";
|
|
|
+ if (MTmemberpk.equals("")) MTmemberpk = "0";
|
|
|
+ if (flag.equals("")) flag = "0";
|
|
|
+
|
|
|
+ out.clear();
|
|
|
+ String D_ModelInfopk = "0", D_MemberPK = "0", D_Tel = "", D_Name = "", D_Stage = "", D_LName = "", D_Phone = "", D_addr = "",
|
|
|
+ D_AreaID = "0", D_BrokePK = "0", D_BMemberPK = "0", D_nominate = "0";
|
|
|
+ String D_ratio_R = "100", D_ratio_V = "50", D_ratio_S = "70", D_Is_V = "0", D_CardPK = "0";
|
|
|
+ String D_ratio_RR = "0", D_ratio_VR = "0", D_ratio_SR = "0",
|
|
|
+ D_ratio_RRM = "0", D_ratio_VRM = "10", D_ratio_SRM = "10";
|
|
|
+ String D_Age = "", D_hei = "0", D_wei = "0", D_wai = "0", D_bust = "0", D_hip = "0", D_VPrice = "0";
|
|
|
+ String D_SuperName = "";
|
|
|
+
|
|
|
+ if (operator.equalsIgnoreCase("doPost"))//执行插入,更新
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ DiskFileUpload fu = new DiskFileUpload();
|
|
|
+ //fu.initialize(pageContext);
|
|
|
+ fu.setHeaderEncoding("UTF-8"); // 此句为主要代码
|
|
|
+ // 设置允许用户上传文档大小,单位:字节,这里设为100M
|
|
|
+ fu.setSizeMax(100 * 1024 * 1024);
|
|
|
+ // 设置最多只允许在内存中存储的数据,单位:字节
|
|
|
+ fu.setSizeThreshold(4096);
|
|
|
+ // 开始读取上传信息
|
|
|
+ List fileItems = fu.parseRequest(request);
|
|
|
+ // 依次处理每个上传的文件
|
|
|
+ Iterator iter = fileItems.iterator();
|
|
|
+ while (iter.hasNext()) {
|
|
|
+ FileItem item = (FileItem) iter.next();
|
|
|
+ String fieldName = item.getFieldName();
|
|
|
+ if (fieldName == null || fieldName.equals("")) continue; // 忽略其他不是文件域的所有表单信息
|
|
|
+
|
|
|
+ if (item.isFormField()) //普通数据
|
|
|
+ {
|
|
|
+ String formContent = ExtendString.getDBStr(item.getString("utf-8")); //取值
|
|
|
+ if (fieldName.equalsIgnoreCase("ModelInfopk")) D_ModelInfopk = KindEditor.getDBStr(formContent);
|
|
|
+ else if (fieldName.equalsIgnoreCase("MemberPK")) D_MemberPK = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Tel")) D_Tel = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Name")) D_Name = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Stage")) D_Stage = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("LName")) D_LName = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Phone")) D_Phone = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("addr")) D_addr = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Area")) D_AreaID = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("BrokePK")) D_BrokePK = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("BMemberPK")) D_BMemberPK = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_R")) D_ratio_R = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_V")) D_ratio_V = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_S")) D_ratio_S = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("Is_V")) D_Is_V = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("CardPK")) D_CardPK = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("nominate")) D_nominate = formContent;
|
|
|
+
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_RR")) D_ratio_RR = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_VR")) D_ratio_VR = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_SR")) D_ratio_SR = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_RRM")) D_ratio_RRM = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_VRM")) D_ratio_VRM = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("ratio_SRM")) D_ratio_SRM = formContent;
|
|
|
+
|
|
|
+ else if (fieldName.equalsIgnoreCase("Age")) D_Age = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("hei")) D_hei = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("wei")) D_wei = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("wai")) D_wai = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("bust")) D_bust = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("hip")) D_hip = formContent;
|
|
|
+ else if (fieldName.equalsIgnoreCase("VPrice")) D_VPrice = formContent;
|
|
|
+
|
|
|
+ } else //文件数据
|
|
|
+ {
|
|
|
+ /*
|
|
|
+ UpLoad.PostFileResult R= UpLoad.PostFile(request, item, "broker");
|
|
|
+ if ( R.Result<0 )
|
|
|
+ {
|
|
|
+ out.print( R.PostLastError );
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (fieldName.equalsIgnoreCase("Pic")) Pic = R.PostFileURL;
|
|
|
+ else if (fieldName.equalsIgnoreCase("PCScreen")) PCScreen = R.PostFileURL;
|
|
|
+ */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ out.print(e.getMessage());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //数据合法性检查
|
|
|
+ if (D_BrokePK.equals("") || D_BMemberPK.equals("0")) {
|
|
|
+ out.print("数据传递错误,所属经纪人为空。");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (D_Stage.equals("")) D_Stage = D_Name;
|
|
|
+
|
|
|
+ String[] sqls = new String[2];
|
|
|
+
|
|
|
+ if (D_ModelInfopk.equals("0")) {
|
|
|
+ D_ModelInfopk = dbtool.getNewPK(db, "ModelInfo");
|
|
|
+ String QRCode = thmodel.getNewMemQrCode(db);
|
|
|
+
|
|
|
+ if (QRCode.equals("")) {
|
|
|
+ out.print("获取推荐码失败:" + db.LastError);
|
|
|
+ return;
|
|
|
+ } else if (D_ModelInfopk.equals("")) {
|
|
|
+ out.print(dbtool.LastError);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ D_MemberPK = dbtool.getNewPK(db, "MemberInfo");
|
|
|
+ if (D_MemberPK.equals("")) {
|
|
|
+ out.print(dbtool.LastError);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ sqls[0] = String.format("Insert Into ModelInfo(PK, MemberPK, Name, Stage, LName, addr, " +
|
|
|
+ " BrokePK, BMemberPK, ratio_R, ratio_V, ratio_S, " +
|
|
|
+ " Is_V, CardPK, nominate, " +
|
|
|
+ " ratio_RR, ratio_VR, ratio_SR, ratio_RRM, ratio_VRM, ratio_SRM, " +
|
|
|
+ " hei, wei, wai, bust, hip, VPrice ) " +
|
|
|
+ "Values (%s, %s, '%s', '%s', '%s', '%s', " +
|
|
|
+ " %s, %s, '%s', %s, %s, " +
|
|
|
+ " %s, %s, %s, " +
|
|
|
+ " %s, %s, %s, %s, %s, %s, " +
|
|
|
+ " %s, %s, %s, %s, %s, %s ) ",
|
|
|
+ D_ModelInfopk, D_MemberPK, D_Name, D_Stage, D_LName, D_addr,
|
|
|
+ D_BrokePK, D_BMemberPK, D_ratio_R, D_ratio_V, D_ratio_S,
|
|
|
+ D_Is_V, D_CardPK, D_nominate,
|
|
|
+ D_ratio_RR, D_ratio_VR, D_ratio_SR, D_ratio_RRM, D_ratio_VRM, D_ratio_SRM,
|
|
|
+ D_hei, D_wei, D_wai, D_bust, D_hip, D_VPrice);
|
|
|
+
|
|
|
+ sqls[1] = String.format("Insert Into MemberInfo (PK, Tel, Pass, MembType, " +
|
|
|
+ " Phone, Pet, Area, QRCode, Age, MDate ) " +
|
|
|
+ "Values(%s, '%s', '123456', %s, " +
|
|
|
+ " '%s', '%s', %s, '%s', '%s', sysdate() ) ",
|
|
|
+ D_MemberPK, D_Tel, thmodel.MEMTYPE_Model,
|
|
|
+ D_Phone, D_Stage, D_AreaID, QRCode, D_Age);
|
|
|
+ } else //更新
|
|
|
+ {
|
|
|
+ sqls[0] = String.format("Update ModelInfo " +
|
|
|
+ "Set Name='%s', Stage='%s', LName='%s', addr='%s', " +
|
|
|
+ " ratio_R=%s, ratio_V=%s, ratio_S=%s, " +
|
|
|
+ " Is_V=%s, CardPK = %s, nominate=%s, " +
|
|
|
+ " ratio_RR=%s, ratio_VR=%s, ratio_SR=%s, ratio_RRM=%s, ratio_VRM=%s, ratio_SRM=%s, " +
|
|
|
+ " hei=%s, wei=%s, wai=%s, bust=%s, hip=%s, VPrice=%s " +
|
|
|
+ "Where PK = %s ",
|
|
|
+ D_Name, D_Stage, D_LName, D_addr,
|
|
|
+ D_ratio_R, D_ratio_V, D_ratio_S,
|
|
|
+ D_Is_V, D_CardPK, D_nominate,
|
|
|
+ D_ratio_RR, D_ratio_VR, D_ratio_SR, D_ratio_RRM, D_ratio_VRM, D_ratio_SRM,
|
|
|
+ D_hei, D_wei, D_wai, D_bust, D_hip, D_VPrice,
|
|
|
+ D_ModelInfopk);
|
|
|
+ sqls[1] = String.format("Update MemberInfo " +
|
|
|
+ "Set Tel='%s', Pet='%s', Phone='%s', Area=%s, Age='%s' " +
|
|
|
+ "Where PK = %s ",
|
|
|
+ D_Tel, D_Stage, D_Phone, D_AreaID, D_Age,
|
|
|
+ D_MemberPK);
|
|
|
+ }
|
|
|
+
|
|
|
+ //检查帐号是否重复
|
|
|
+ sql = String.format("Select Count(*) C From MemberInfo where Tel='%s' and PK<>%s ", D_Tel, D_MemberPK);
|
|
|
+ rs = db.executeQuery(sql);
|
|
|
+ if (rs == null) {
|
|
|
+ out.print("检查帐号是否重复失败:" + db.LastError);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ rs.next();
|
|
|
+ if (rs.getInt("C") > 0) {
|
|
|
+ rs.close();
|
|
|
+ out.println("当前帐号与其它帐号重复,不可保存。");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ rs.close();
|
|
|
+
|
|
|
+ //
|
|
|
+ if (db.executeUpdate(sqls))
|
|
|
+ out.print("success");
|
|
|
+ else
|
|
|
+ out.print("数据保存失败。" + db.LastError);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //正常新增或浏览
|
|
|
+ if (!MTmemberpk.equals("0")) {
|
|
|
+ sql = "select a.pk as ModelInfopk, a.MemberPK, b.Tel, a.Name, a.Stage, a.LName, b.Phone, a.addr, " +
|
|
|
+ " b.Area, a.BrokePK, a.BMemberPK, " +
|
|
|
+ " CAST(FORMAT(a.ratio_R,0) as char) as ratio_R, " +
|
|
|
+ " CAST(FORMAT(a.ratio_V,0) as char) as ratio_V, " +
|
|
|
+ " CAST(FORMAT(a.ratio_S,0) as char) as ratio_S, " +
|
|
|
+ " a.ratio_RR, a.ratio_VR, a.ratio_SR, a.ratio_RRM, a.ratio_VRM, a.ratio_SRM, " +
|
|
|
+ " a.Is_V, a.CardPK, c.CardName, " +
|
|
|
+ " DATE_FORMAT(b.MDate,'%Y-%m-%d %H:%i:%s') as MDate, " +
|
|
|
+ " a.nominate, b.age, a.hei, a.wei, a.wai, a.bust, a.hip, a.VPrice " +
|
|
|
+ "from ModelInfo a inner Join MemberInfo b on a.MemberPK = b.PK " +
|
|
|
+ " Left Join ModelCard c on a.CardPK = C.PK " +
|
|
|
+ "where a.MemberPK= " + MTmemberpk + " ";
|
|
|
+ rs = db.executeQuery(sql);
|
|
|
+ if (rs == null) {
|
|
|
+ out.print("后台获取数据失败: " + db.LastError);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (rs.next()) {
|
|
|
+ D_ModelInfopk = ExtendString.getDBStr(rs.getString("ModelInfopk"));
|
|
|
+ D_MemberPK = ExtendString.getDBStr(rs.getString("MemberPK"));
|
|
|
+ D_Tel = ExtendString.getDBStr(rs.getString("Tel"));
|
|
|
+ D_Name = ExtendString.getDBStr(rs.getString("Name"));
|
|
|
+ D_Stage = ExtendString.getDBStr(rs.getString("Stage"));
|
|
|
+ D_LName = ExtendString.getDBStr(rs.getString("LName"));
|
|
|
+ D_Phone = ExtendString.getDBStr(rs.getString("Phone"));
|
|
|
+ D_addr = ExtendString.getDBStr(rs.getString("addr"));
|
|
|
+ D_AreaID = ExtendString.getDBStr(rs.getString("Area"));
|
|
|
+ D_BrokePK = ExtendString.getDBStr(rs.getString("BrokePK"));
|
|
|
+ D_BMemberPK = ExtendString.getDBStr(rs.getString("BMemberPK"));
|
|
|
+ D_ratio_R = String.valueOf(rs.getFloat("ratio_R"));
|
|
|
+ D_ratio_V = String.valueOf(rs.getFloat("ratio_V"));
|
|
|
+ D_ratio_S = String.valueOf(rs.getFloat("ratio_S"));
|
|
|
+ D_Is_V = String.valueOf(rs.getInt("Is_V"));
|
|
|
+ D_CardPK = String.valueOf(rs.getInt("CardPK"));
|
|
|
+ D_nominate = String.valueOf(rs.getInt("nominate"));
|
|
|
+
|
|
|
+ D_ratio_RR = String.valueOf(rs.getFloat("ratio_RR"));
|
|
|
+ D_ratio_VR = String.valueOf(rs.getFloat("ratio_VR"));
|
|
|
+ D_ratio_SR = String.valueOf(rs.getFloat("ratio_SR"));
|
|
|
+ D_ratio_RRM = String.valueOf(rs.getFloat("ratio_RRM"));
|
|
|
+ D_ratio_VRM = String.valueOf(rs.getFloat("ratio_VRM"));
|
|
|
+ D_ratio_SRM = String.valueOf(rs.getFloat("ratio_SRM"));
|
|
|
+
|
|
|
+ D_Age = ExtendString.getDBStr(rs.getString("Age"));
|
|
|
+ D_hei = String.valueOf(rs.getFloat("hei"));
|
|
|
+ D_wei = String.valueOf(rs.getFloat("wei"));
|
|
|
+ D_wai = String.valueOf(rs.getFloat("wai"));
|
|
|
+ D_bust = String.valueOf(rs.getFloat("bust"));
|
|
|
+ D_hip = String.valueOf(rs.getFloat("hip"));
|
|
|
+ D_VPrice = String.valueOf(rs.getFloat("VPrice"));
|
|
|
+ }
|
|
|
+ rs.close();
|
|
|
+ }
|
|
|
+
|
|
|
+ //查询经纪人所属机构
|
|
|
+ D_MemberPK = MTmemberpk;
|
|
|
+ if (!JJRbrokepk.equals("0")) {
|
|
|
+ sql = "Select PK, MemberPK, Name from BrokerInfor where PK = " + JJRbrokepk;
|
|
|
+ rs = db.executeQuery(sql);
|
|
|
+ if (rs != null && rs.next()) {
|
|
|
+ D_BrokePK = JJRbrokepk;
|
|
|
+ D_BMemberPK = rs.getString("MemberPK");
|
|
|
+ D_SuperName = rs.getString("Name");
|
|
|
+ }
|
|
|
+ if (rs != null) rs.close();
|
|
|
+ }
|
|
|
+%>
|
|
|
+<html>
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+ <base href="<%=basePath %>"/>
|
|
|
+ <title>模特</title>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/WdatePicker.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/skin_/table.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/jquery.grid.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="css/skin_/form.css"/>
|
|
|
+ <link href="umeditor/themes/default/_css/umeditor.css" type="text/css" rel="stylesheet">
|
|
|
+ <script type="text/javascript" src="js/jquery.js"></script>
|
|
|
+ <script type="text/javascript" src="js/global.js"></script>
|
|
|
+ <script type="text/javascript" src="js/jquery.select.js"></script>
|
|
|
+ <script type="text/javascript" src="js/core.js"></script>
|
|
|
+ <script type="text/javascript" src="js/WdatePicker.js"></script>
|
|
|
+ <script type="text/javascript" src="js/jquery-form.js"></script>
|
|
|
+ <style type="text/css">
|
|
|
+ .select {
|
|
|
+ width: 173px;
|
|
|
+ line-height: 25px;
|
|
|
+ }
|
|
|
+
|
|
|
+ img {
|
|
|
+ height: auto;
|
|
|
+ width: auto;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<script language="javascript">
|
|
|
+ var result = 0;
|
|
|
+
|
|
|
+ function check() {
|
|
|
+ if (document.form1.Tel.value == "") {
|
|
|
+ alert("请输入帐号!");
|
|
|
+ document.form1.Tel.focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (document.form1.Name.value == "") {
|
|
|
+ alert("请输入模特姓名!");
|
|
|
+ document.form1.Name.focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ $('#form1').ajaxSubmit(
|
|
|
+ {
|
|
|
+ url: "<%=basePath%>member/model_.jsp?operator=doPost&bmemberpk=<%=JJRmemberpk%>&brokepk=<%=JJRbrokepk%>&memberpk=<%=MTmemberpk%>",
|
|
|
+ contentType: "application/x-www-form-urlencoded; charset=utf-8",
|
|
|
+ success: function (data) {
|
|
|
+ if (data.indexOf("success") >= 0) {
|
|
|
+ result = 1;
|
|
|
+ parentDialog.close();
|
|
|
+ }
|
|
|
+ else alert(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<form name="form1" id="form1" method="post" enctype="multipart/form-data">
|
|
|
+ <div id="container">
|
|
|
+ <div id="main">
|
|
|
+ <h2 class="subfild">
|
|
|
+ <span style="width:200px">
|
|
|
+ <span>模特信息</span>
|
|
|
+ </span>
|
|
|
+ </h2>
|
|
|
+
|
|
|
+ <input type="hidden" name="ModelInfopk" value="<%=D_ModelInfopk%>">
|
|
|
+ <input type="hidden" name="MemberPK" value="<%=D_MemberPK%>">
|
|
|
+ <input type="hidden" name="BrokePK" value="<%=JJRbrokepk%>">
|
|
|
+ <input type="hidden" name="BMemberPK" value="<%=JJRmemberpk%>">
|
|
|
+
|
|
|
+ <div class="subfild-content base-info" style="width:100%;">
|
|
|
+ <table id="" style="width:100%">
|
|
|
+ <%
|
|
|
+ if (!D_SuperName.equals("")) {
|
|
|
+ %>
|
|
|
+ <tr>
|
|
|
+ <td style="80px">经纪人</td>
|
|
|
+ <td colspan="3"><%=D_SuperName%>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <%
|
|
|
+ }
|
|
|
+ %>
|
|
|
+ <tr>
|
|
|
+ <td>帐号</td>
|
|
|
+ <td colspan="3"><input type="text" name="Tel" value="<%=D_Tel%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>姓名</td>
|
|
|
+ <td colspan="3"><input type="text" name="Name" value="<%=D_Name%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>电话</td>
|
|
|
+ <td colspan="3"><input type="text" name="Phone" value="<%=D_Phone%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>艺名</td>
|
|
|
+ <td colspan="3"><input type="text" name="Stage" value="<%=D_Stage%>"/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>年龄</td>
|
|
|
+ <td colspan="3"><input type="text" name="age" value="<%=D_Age%>"/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>身高</td>
|
|
|
+ <td colspan="3"><input type="text" name="hei" value="<%=D_hei%>"/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>体重</td>
|
|
|
+ <td colspan="3"><input type="text" name="wei" value="<%=D_wei%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>腰围</td>
|
|
|
+ <td colspan="3"><input type="text" name="wai" value="<%=D_wai%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>胸围</td>
|
|
|
+ <td colspan="3"><input type="text" name="bust" value="<%=D_bust%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>臀围</td>
|
|
|
+ <td colspan="3"><input type="text" name="hip" value="<%=D_hip%>"/></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>视频聊天单价</td>
|
|
|
+ <td colspan="3"><input type="text" name="VPrice" value="<%=D_VPrice%>"/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>个性签名</td>
|
|
|
+ <td colspan="3"><input type="text" name="LName" value="<%=D_LName%>"/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>是否接受视频聊天</td>
|
|
|
+ <td colspan="3">
|
|
|
+ <select name="Is_V" id="Is_V" class="select">
|
|
|
+ <option value="1" <% if (D_Is_V.equals("1")) out.print("selected");%> > 是</option>
|
|
|
+ <option value="0" <% if (D_Is_V.equals("0")) out.print("selected");%> > 否</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>地区</td>
|
|
|
+ <td colspan="3">
|
|
|
+ <select name="Area" id="Area" class="select">
|
|
|
+ <%
|
|
|
+ sql = "Select PK, Name from datatypeinfo where typeName ='地区' order by OrdID ";
|
|
|
+ rs = db.executeQuery(sql);
|
|
|
+ while ((rs != null) && rs.next()) {
|
|
|
+ tmpID = rs.getString("PK");
|
|
|
+ tmpName = rs.getString("Name");
|
|
|
+ if (D_AreaID.equals(tmpID)) {
|
|
|
+ %>
|
|
|
+ <option value="<%=tmpID%>" selected><%=tmpName%>
|
|
|
+ </option>
|
|
|
+ <%
|
|
|
+ } else {
|
|
|
+ %>
|
|
|
+ <option value="<%=tmpID%>"><%=tmpName%>
|
|
|
+ </option>
|
|
|
+ <%
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (rs != null) rs.close();
|
|
|
+ %>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>是否推荐</td>
|
|
|
+ <td colspan="3">
|
|
|
+ <select name="nominate" id="nominate" class="select">
|
|
|
+ <option value="1" <% if (D_nominate.equals("1")) out.print("selected");%> > 是</option>
|
|
|
+ <option value="0" <% if (D_nominate.equals("0")) out.print("selected");%> > 否</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td colspan="4"> </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>身 份</td>
|
|
|
+ <td>红包分成(%)</td>
|
|
|
+ <td>视频分成(%)</td>
|
|
|
+ <td>服务分成(%)</td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>模特自己</td>
|
|
|
+ <td><input type="text" name="ratio_R" value="<%=D_ratio_R%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_V" value="<%=D_ratio_V%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_S" value="<%=D_ratio_S%>" style='width:80px;'/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>其她模特推荐人</td>
|
|
|
+ <td><input type="text" name="ratio_RR" value="<%=D_ratio_RR%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_VR" value="<%=D_ratio_VR%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_SR" value="<%=D_ratio_SR%>" style='width:80px;'/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td>会员推荐人</td>
|
|
|
+ <td><input type="text" name="ratio_RRM" value="<%=D_ratio_RRM%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_VRM" value="<%=D_ratio_VRM%>" style='width:80px;'/></td>
|
|
|
+ <td><input type="text" name="ratio_SRM" value="<%=D_ratio_SRM%>" style='width:80px;'/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td colspan="4"> </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td colspan="4" class="buttons" style="text-align: center;">
|
|
|
+ <%
|
|
|
+ if (flag.equals("1") || flag.equals("2")) {
|
|
|
+ %>
|
|
|
+ <input type="button" onClick="javascript:check();" id="btn_save" class="btn3_mouseout"
|
|
|
+ onmouseover="this.className='btn3_mouseover'"
|
|
|
+ onmouseout="this.className='btn3_mouseout'"
|
|
|
+ onmousedown="this.className='btn3_mousedown'"
|
|
|
+ onmouseup="this.className='btn3_mouseup'" value="保 存"/>
|
|
|
+ <%
|
|
|
+ }
|
|
|
+ %>
|
|
|
+ <input type="button" onClick="parentDialog.close();" id="btn_back" class="btn3_mouseout"
|
|
|
+ onmouseover="this.className='btn3_mouseover'"
|
|
|
+ onmouseout="this.className='btn3_mouseout'"
|
|
|
+ onmousedown="this.className='btn3_mousedown'"
|
|
|
+ onmouseup="this.className='btn3_mouseup'" value="返 回"/></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</form>
|
|
|
+</body>
|
|
|
+</html>
|