⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main2.asp

📁 这是一个自己研发的薪酬管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
    end if
end function

function ShowAllData_wh_projects()
'显示查询结果
dim Str_PK_project_id           '主鍵
dim Str_project_name            '项目名称
dim Str_project_begin           '签定合同日期
dim Str_project_cost2           '后期成本费用
dim Str_project_operation2                '后期业务费用
dim Str_project_codes2          '后期非南京公司开发程序费
dim Str_project_host2           '后期主机费用
dim Str_project_dns2            '后期域名费用
dim Str_project_search2         '后期搜索引擎费用
dim Str_project_mail2           '后期邮箱费用
dim Str_project_other2          '后期其它费用
dim Str_project_memo            '备注
dim Rec_Data                             '结果集
dim Int_PageCount                        '总页数
dim Int_Count                            '记数

    mInt_CountPerPage     =  GetCountPerPage()

    '计算页数
    set Rec_Data         = mCls_wh_projects.SearchData(mStr_SortBy + " "+  mStr_AscMark, mStr_project_name, mStr_project_begin, mStr_project_end, mStr_project_finish, mStr_project_score, mStr_project_sum, mStr_project_firstpay, mStr_project_lastpay, mStr_project_notpay, mStr_project_cost, mStr_project_operation, mStr_project_codes, mStr_project_host, mStr_project_dns, mStr_project_search, mStr_project_mail, mStr_project_other, mStr_project_cost2, mStr_project_operation2, mStr_project_codes2, mStr_project_host2, mStr_project_dns2, mStr_project_search2, mStr_project_mail2, mStr_project_other2, mStr_project_memo)
    mInt_RecordCount      = Rec_Data.RecordCount
    if not Rec_Data.eof then
        Rec_Data.PageSize = mInt_CountPerPage
        Int_PageCount        = Rec_Data.PageCount
        if mInt_Page > Int_PageCount then mInt_Page=1
        Rec_Data.AbsolutePage  = mInt_Page
    end if
    Int_Count            = 0
    Do while not Rec_Data.eof and Int_Count<mInt_CountPerPage
        '读取资料
        Int_Count        =  Int_Count+1

        Str_PK_project_id       = Server.HTMLEncode(trim(Rec_Data.fields("project_id") & ""))
        Str_project_name        = Server.HTMLEncode(trim(Rec_Data.fields("project_name") & ""))
        Str_project_begin       = Server.HTMLEncode(trim(Rec_Data.fields("project_begin") & ""))
        Str_project_cost2       = Server.HTMLEncode(trim(Rec_Data.fields("project_cost2") & ""))
        Str_project_operation2            = Server.HTMLEncode(trim(Rec_Data.fields("project_operation2") & ""))
        Str_project_codes2      = Server.HTMLEncode(trim(Rec_Data.fields("project_codes2") & ""))
        Str_project_host2       = Server.HTMLEncode(trim(Rec_Data.fields("project_host2") & ""))
        Str_project_dns2        = Server.HTMLEncode(trim(Rec_Data.fields("project_dns2") & ""))
        Str_project_search2     = Server.HTMLEncode(trim(Rec_Data.fields("project_search2") & ""))
        Str_project_mail2       = Server.HTMLEncode(trim(Rec_Data.fields("project_mail2") & ""))
        Str_project_other2      = Server.HTMLEncode(trim(Rec_Data.fields("project_other2") & ""))
        Str_project_memo        = Server.HTMLEncode(trim(Rec_Data.fields("project_memo") & ""))

        Str_project_memo        = replace(Str_project_memo,vbCrlf,"<BR> &nbsp; ")

        '显示资料
%>
        <TR CLASS='TABLEDATA' ALIGN=CENTER>
                 <TD ALIGN=CENTER>
                    <INPUT ID=Chk_Select NAME=<% ="ChkID" & Str_PK_project_id %> TYPE=CHECKBOX VALUE='<% =Str_PK_project_id %>' onclick="showframe(<% ="s" & Str_PK_project_id %>,<% ="document.Frm_Data.ChkID" & Str_PK_project_id&".checked" %>);">
                </TD>
           
                <TD><font color=#ff4800 size=3><strong>
                    <% Response.write (mInt_Page-1)*mInt_CountPerPage+Int_Count %></strong></font>
                </TD>
                <TD>
                    <A HREF=javascript:openwin("<%="../wh_projects/Show2.asp?"&mStr_WINDURL&"&PK_project_id="&Str_PK_project_id%>")>
                    <font color=#ff4800 size=3><strong><%
                    Response.write Str_project_name
                    %></strong></font>
                    </A>
                </TD>
                <TD>
                    <A HREF=javascript:openwin("<%="../wh_projects/Show2.asp?"&mStr_WINDURL&"&PK_project_id="&Str_PK_project_id%>")>
                    <font color=#ff4800 size=3><strong><%
                    if isdate(Str_project_begin) then
                        Response.write (Val(FormatDate(Str_project_begin,"yyyy"))-gInt_BeginYear) & FormatDate(Str_project_begin,"年mm月dd日")
					else
						response.write("未定")
                    end if
                    %></strong></font>
                    </A>
                </TD>
            </TR>
			<tr id ="s<% =Str_PK_project_id %>" style="DISPLAY: none">
			<td colspan="4" width="100%"><iframe name='frame<%=(mInt_Page-1)*mInt_CountPerPage+Int_Count%>' width=100% height=250 frameborder=0 src='main.asp?PK_project_id=<% =Str_PK_project_id%>' scrolling="auto"></iframe></td>
			</tr>
<%        
        Rec_Data.movenext
    loop
    Rec_Data.close
end function

function GetOrderBy(pStr_SortBy)
    if (mStr_SortBy = pStr_SortBy) then
        if (mStr_AscMark = "") then
            Response.Write "<img src='../image/btup.gif' ALIGN='ABSMIDDLE' BORDER=0>"
        else
            Response.Write "<img src='../image/btdown.gif' ALIGN='ABSMIDDLE' BORDER=0>"
        end if
    end if
end function


function ShowPage1(pInt_TotalCount,pInt_PerPage,pInt_CurPage,pStr_TableStyle)
'功能:显示页数
'参数:总记录数,每页记录数,当前页,表格显示样式
'返回:无
dim Int_Count
dim Int_PageCount
dim Int_BeginPage
dim Int_EndPage
    '计算页数
    if (pInt_TotalCount=0 or pInt_PerPage=0) then
        Int_PageCount = 1
    else
        Int_PageCount = round(pInt_TotalCount / pInt_PerPage+0.4999999)
    end if
	if (Int_PageCount < pInt_CurPage) then pInt_CurPage = 1
	'计算开始页和结束页
	if (pInt_PerPage=0) then
	    Int_BeginPage = 1
	else
	    Int_BeginPage = int((pInt_CurPage-1) / 10)*10+1
	end if
	Int_EndPage = Int_BeginPage+9
	if (Int_EndPage>Int_PageCount) then Int_EndPage = Int_PageCount
%>
    <TABLE BORDER='0' STYLE="<% = pStr_TableStyle %>">
        <TR>
    		<TD ALIGN=LEFT WIDTH=*><font color=#ff4800>
    		<% if (pInt_CurPage > 1) then %>
        		<A HREF='javascript:getpage(<% = (pInt_CurPage-1) %>)' CLASS=PageLink>上一页</A>&nbsp;
        	<% else %>
        	    上一页&nbsp;
        	<% end if %>
    		<% if (Int_BeginPage > 10) then %>
        		<A HREF='javascript:getpage(<% = (Int_BeginPage-10) %>)' CLASS=PageLink>上十页</A>&nbsp;
        	<% else %>
        	    上十页&nbsp;
        	<% end if %>
        		&nbsp;&nbsp;
    		<% for Int_Count=Int_BeginPage to Int_EndPage %>
    		   <A HREF='javascript:getpage(<% = (Int_Count) %>)' CLASS=PageLink <% if (pInt_CurPage = Int_Count) then response.write " class=PageSelect " %>><% = Int_Count %></A>&nbsp;
        	<% next %>
        		&nbsp;&nbsp;
    		<% if (Int_EndPage < Int_PageCount) then %>
        		<A HREF='javascript:getpage(<% = (Int_BeginPage+10) %>)' CLASS=PageLink>下十页</A>&nbsp;
        	<% else %>
        	    下十页&nbsp;
        	<% end if %>
    		<% if (pInt_CurPage < Int_PageCount) then %>
        		<A HREF='javascript:getpage(<% = (pInt_CurPage+1) %>)' CLASS=PageLink>下一页</A>&nbsp;
        	<% else %>
        	    下一页&nbsp;
        	<% end if %>
         	</TD>
            <TD ALIGN=RIGHT><font color=#ff4800>
                直接跳转到第
                <SELECT STYLE='WIDTH:50' ONCHANGE='javascript:getpage(this.value)'>
                    <OPTION VALUE='1' SELECTED>1</OPTION>
                <% for Int_Count=2 to Int_PageCount %>
                    <OPTION VALUE='<% =(Int_Count) %>' <% If (pInt_CurPage = Int_Count) then Response.write " SELECTED" %>><%= (Int_Count)%></OPTION>
                <% next %>
                </SELECT>页
            </TD>
        </TR>
        <TR>
            <TD ALIGN=LEFT COLSPAN=2><font color=#ff4800>
                注:符合条件的记录数有 <% = pInt_TotalCount %> 条,
                每页显示<% = pInt_PerPage %> 条记录,
                共有<% = Int_PageCount %> 页,
                您现在正查看第<% = pInt_CurPage %> 页的记录!
            </TD>
       </TR>
    </TABLE>
<%
end function
%>

<SCRIPT LANGUAGE="javascript">

function showframe(iii,jjj){
		if (jjj == true){
		iii.style.display = "";}
		else{
		iii.style.display = "none";}
	}
<!--********************************************************************************-->
function getpage(pStr_Page){
//换页
    window.Frm_Update.Page.value=pStr_Page;
    window.Frm_Update.submit()
}
<!--********************************************************************************-->
function OrderBy(pStr_Type){
//排序
    window.Frm_Update.SortBy.value=pStr_Type;
    if (pStr_Type=="<% =mStr_SortBy%>"){
        window.Frm_Update.AscMark.value=(window.Frm_Update.AscMark.value==""?"desc":"")
    } else {
        window.Frm_Update.AscMark.value=""
    }
    window.Frm_Update.Page.value=1;
    window.Frm_Update.submit()
}
<!--********************************************************************************-->
<!--********************************************************************************-->
function CallUpdate(){
//修改资料
var Int_SelectCount
var Str_ChkID
var Int_Len
var Str_Date=new Date()
    Int_SelectCount=GetSelectCount()
    Str_ChkID=GetSelected()
    if (Int_SelectCount<=0){
        alert("对不起,请选择要修改的 [wh_projects]!")
        return
    }
    if (Int_SelectCount>1){
        alert("对不起,您只能选择一个要修改的 [wh_projects]!")
        return
    }
    Int_Len=Str_ChkID.length
    if (Str_ChkID!="") {Str_ChkID=Str_ChkID.substr(1,Int_Len-2)}
        
    window.location="Update.asp?<% =mStr_WINDURL%>&time="+Str_Date.getTime()+"&PK_project_id="+Str_ChkID
}
<!--********************************************************************************-->
function CallDelete(){
//删除资料
var Int_SelectCount
var Str_ChkID
var Str_Date=new Date()
    Int_SelectCount=GetSelectCount()
    Str_ChkID=GetSelected()
    if (Int_SelectCount<=0){
        alert("对不起,请选择要删除的 [wh_projects]!")
        return
    }
    if (window.confirm("删除选定的 [wh_projects]吗?")){
        window.location="Delete.asp?<% =mStr_WINDURL%>&time="+Str_Date.getTime()+"&PK_project_id="+Str_ChkID
    }
}
<!--********************************************************************************-->
function GetSelectCount(){
//读取选定的编码
var Int_Count
var Int_SelectCount
var Str_Chk
var Str_ChkID
var Int_I
var Str_Value
    Str_ChkID=""
    Int_Count=window.Frm_Data.length
    Int_SelectCount=0
    for(Int_I=0; Int_I<=Int_Count-1; Int_I++){
        if (document.Frm_Data.elements[Int_I].name=="ChkID"){
            Str_Value=document.Frm_Data.elements[Int_I].value
            if ((Str_Value!="") && (document.Frm_Data.elements[Int_I].checked)){
                Int_SelectCount=Int_SelectCount+1
            }
        }
    }
    return Int_SelectCount
}
<!--********************************************************************************-->
function GetSelected(){
//读取选定的编码
var Int_Count
var Int_SelectCount
var Str_Chk
var Str_ChkID
var Int_I
var Str_Value
    Str_ChkID=""
    Int_Count=window.Frm_Data.length
    Int_SelectCount=0
    for(Int_I=0; Int_I<=Int_Count-1; Int_I++){
        if (document.Frm_Data.elements[Int_I].name=="ChkID"){
            Str_Value=document.Frm_Data.elements[Int_I].value
            if ((Str_Value!="") && (document.Frm_Data.elements[Int_I].checked)){
                Int_SelectCount=Int_SelectCount+1;
                Str_ChkID=Str_ChkID +",'"+Str_Value+"'";
            }
        }
    }
    if (Str_ChkID!="") {Str_ChkID=Str_ChkID.substr(1)}
    return Str_ChkID
}
<!--********************************************************************************-->
</SCRIPT>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -