กรุณาปิด AdBlock!

Cancel your adBlock please.

ขยายหน้าเว็บRegister Login
 โฆษณา
หน้า: [1]  ลงล่าง
  พิมพ์  
topic

ทางนี้เหม่ง  (อ่าน 4030 ครั้ง)

ไอที
« เมื่อ: 18, 01 2007, 03:32:12 PM »
โค๊ด:
<Head>
<Script language="Javascript">
<!--
     function Conf(object)  {
        if (confirm("Do You Want to Delete Product?")==true)  {
      return true;
                 }
      return false;
 }
//-->
</script>


</Head>
<link href="../../CSS/CSS.CSS" rel="stylesheet" type="text/css">
<body bgcolor="#FFFFFF">

<table width="590" border="0" cellpadding="0" cellspacing="0" align="center" >
  <tr>
    <td colspan="12"> <!--#INCLUDE file="../HeadPageAdmin.asp"--> </td>
  </tr>
  <tr  bgcolor="#000066">
   <td colspan="12"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--#INCLUDE FILE="../menu.asp"--> </td>
  </tr>
  </table>
  <br>
  <div id="Layer3" style="position:absolute; left:259px; top:77px; width:202px; height:77px; z-index:3">
<table width="669" border="1" cellspacing="0" cellpadding="0" class="TextB" >
<!--#INCLUDE file="../../OpenBase/OpenBaseAdmin.asp"-->
<%
    Pagelen=15
PageNo=request.QueryString("PageNo")
    if  PageNo="" then PageNo=1
     Set RS=Server.CreateObject("ADODB.RECORDSET")
     SQL="Select *From ProductKind Where Amount<=5 Order By ProductNo,Kind"
RS.Open SQL,CONN,1,3
if not rs.eof then
    Nrecord=RS.recordcount
         RS.pagesize = PageLen
         TotalPage = RS.PageCount
         RS.absolutepage = PageNo
 Recid=1
     RecNo=0
%>
  <tr>
    <td colspan="9" bgcolor="#FFFF33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;หน้า :&nbsp;
 <% for PageNumber = 1 to totalpage %>
 <% if PageNumber=cint(pageno) then %>
 <font color="#FF0000"><b><u><%=PageNumber%></u></b></font>
 <% else %> <a href="JustLose.asp?pageNo=<%=PageNumber%>">
            <% =PageNumber %>
            </a>
             <!-- ถ้าไม่ใช่หน้าปัจจุบันให้แสดงตัวเลขปกติ-->
            <% end if %> <% next %> &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>
</td>
  </tr>
    <td width="38" bgcolor="#CCCCFF"><b>
      <div align="center">ลำดับ</div>
      </b></td>
    <td width="60" bgcolor="#CCCCFF"><b>
      <div align="center">รหัสสินค้า</div>
      </b></td>
    <td width="100" bgcolor="#CCCCFF"><b>
      <div align="center">ชื่อสินค้า</div>
      </b></td>
   <td width="60" bgcolor="#CCCCFF"><b>
      <div align="center">ผู้จำหน่าย</div>
      </b></td>
    <td width="70" bgcolor="#CCCCFF"><b>
          <div align="center">ผู้ผลิต</div>
      </b></td>
    <td width="60" bgcolor="#CCCCFF"><b>
      <div align="center">ต้นทุนต่อชิ้น</div>
      </b></td>
    <td width="60" bgcolor="#CCCCFF"><b>
      <div align="center">ราคาขาย</div>
      </b></td>
    <td width="55" bgcolor="#CCCCFF"><b>
      <div align="center">จำนวน(ชิ้น)</div>
      </b></td>
    <td width="80" bgcolor="#CCCCFF"><b>
      <div align="center">จัดการ</div>
      </b></td>
  </tr>
  <%
    Do While Not RS.EOF and Recid<=Pagelen
  RecNo=RecNo+1
  C=RecNo Mod 2
   IF  C=1 Then
   CBg="#CCCCCC"
Else
    CBg="#FFFFFF"
End IF
  %>
  <tr bgcolor="<%=CBg%>">
    <td><Div Align="Center"><%=RecNo%></Div></td>
    <td><Div Align="Center"><%=RS("ProductNo")%></Div></td>
<%
   Set Productname=Server.CreateObject("ADODB.RECORDSET")
ProductSql="Select *From Product Where Ltrim(Rtrim(ProductNo))='"&RS("ProductNo") &"'"
Productname.Open ProductSql,Conn,1,3
IF Not  Productname.EOF Then
%>
    <td>&nbsp;<%=Productname("ProductName")%></td>
<td Align="Center">&nbsp;<%=Productname("Logo")%> </td>
     <td><Div Align="Center"><%=Productname("Logo")%> </Div></td>
    <td><Div Align="Right"><%=Formatnumber(Productname("Capital"),0)%>&nbsp;฿</Div></td>
    <td><Div Align="Right"><%=Formatnumber(Productname("BySale"),0)%>&nbsp;฿</Div></td>
 <%End IF%>
 <%Productname.Close%>
    <td><Div Align="Center"><%=Formatnumber(RS("Amount"),0)%>&nbsp;</Div></td>
    <td><Div Align="Center">
<%IF RS("Amount")<=0 Then%>
<A Href="DelProduct.asp?mode=del&Productno=<%=RS("ProductNo")%>&Kind=<%=RS("Kind")%> " Onclick="return Conf(this)" class="TextRed" onMouseOver="this.style.background = '#FFFFCC';" onMouseOut="this.style.backgroundColor = '<%=CBg%>';" ><Img Src="../../Images/Delete1.Gif" border=0></A>
<%Else%>
      <Img Src="../../Images/Delete.Gif">
<%End IF%>
&nbsp;&nbsp;&nbsp;<A Href="ProductEditpage.asp?Productno=<%=RS("ProductNo")%>" onMouseOver="this.style.background = '#FFFFCC';" onMouseOut="this.style.backgroundColor = '<%=CBg%>';" ><Img Src="../../Images/Edit.Gif" border=0></A></Div></td>
  </tr>
  <%
        RS.Movenext
Recid=Recid+1
Loop
 %>
  <tr>
    <td colspan="9" bgcolor="#FFFF33">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;หน้า :&nbsp;
 <% for PageNumber = 1 to totalpage %>
 <% if PageNumber=cint(pageno) then %>
 <font color="#FF0000"><b><u><%=PageNumber%></u></b></font>
 <% else %> <a href="JustLose.asp?pageNo=<%=PageNumber%>">
            <% =PageNumber %>
            </a>
           <!-- ถ้าไม่ใช่หน้าปัจจุบันให้แสดงตัวเลขปกติ-->
            <%end if%> <% next%> &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>
</td>
<%
   Else
              Response.Write "<br><br><br><br><br><Div Align='Center'><Font Class='ColorDay'>ไม่พบสินค้าเหลือน้อย</Font></Div>"
   End IF
RS.Close
  %>
  </tr>
</table>
 </div>

 
LoVePaNCake
เด็กไอทีคลับหน้าใหม่
*
พลังความคิด 2
กระทู้: 65
บันทึกการเข้า

center>
ไอที
« ตอบ #1 เมื่อ: 18, 01 2007, 09:03:51 PM »
ก็เห็นนิหว่า

link
เด็กไอทีคลับ
เด็กไอทีตัวพ่อ
เด็กไอทีคลับชั้นเซียน
*
พลังความคิด 89
กระทู้: 3,536
บันทึกการเข้า
หน้า: [1]  ขึ้นบน
  พิมพ์  
 
กระโดดไป: