/beta/purchase/outServiceOrder.asp
ASP | 643 lines | 580 code | 43 blank | 20 comment | 73 complexity | 989e99643d5887d8be134f7aee018ce7 MD5 | raw file
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1256"%><% 2'Purchase (4) 3PageTitle=" ����� ����" 4SubmenuItem=3 5if not Auth(4 , 3) then NotAllowdToViewThisPage() 6 7'OutService Page Order 8'By Alix - Last changed: 81/01/13 9%> 10<!--#include file="top.asp" --> 11<!--#include File="../include_farsiDateHandling.asp"--> 12<style> 13 .outServTable1 {font-family: Tahoma;font-size: 8pt; border:1 solid navy;} 14 .outServTable1 th {height:25px;border-bottom:1 solid navy;Background-Color:ddddee} 15 .outServTable1 td {height:25px;} 16 .outServTR1 {Background-Color:#CCCCDD;} 17</style> 18<% 19'----------------------------------------------------------------------------------------------------- 20'---------------------------------------------------------------------- OutService Order Creation Form 21'----------------------------------------------------------------------------------------------------- 22if request.form("Submit")="����� ����� ����" then 23 if request.form("outReq").count < 1 then%> 24 <div align=center dir=rtl><br><br><br><br><br><br><b>���!!<br><h3>��� �������� ������ ���� ���</h3></b><br></div> 25 </body> 26 </html> 27 <% 28 else 29 %><br> 30 <!--#include File="../include_JS_InputMasks.asp"--> 31 <form method=post action="outServiceOrder.asp"> 32 <TABLE dir=rtl align=center width=600> 33 <TR bgcolor="eeeeee" > 34 <TD align=center colspan=7><B>����� ����� ���� </B></TD> 35 </TR> 36 <TR bgcolor="eeeeee" > 37 <TD>��� �������</TD> 38 <TD>����� �������</TD> 39 <TD>����� ����</TD> 40 <TD>���� �������</TD> 41 <TD>����� �����</TD> 42 <TD>����</TD> 43 <TD width=8%>����</TD> 44 </TR> 45 <% 46 tmpCounter=0 47 pp=100 48 totalPrice=0 49 allComments = "" 50 TypeID_IsService = "" 51 for i=1 to request.form("outReq").count 52 myRequestID = clng(request.form("outReq")(i)) 53 percent = cint(pp / (request.form("outReq").count - tmpCounter)) 54 pp = pp - percent 55 tmpCounter = tmpCounter + 1 56 if tmpCounter mod 2 = 1 then 57 tmpColor="#FFFFFF" 58 tmpColor2="#FFFFBB" 59 Else 60 tmpColor="#DDDDDD" 61 tmpColor2="#EEEEBB" 62 End if 63 set RSX=Conn.Execute ("SELECT * FROM purchaseRequests WHERE id = "& myRequestID ) 64 if TypeID_IsService="" then 65 TypeID_IsService = RSX("TypeID") & "_" & RSX("IsService") 66 end if 67 if TypeID_IsService <> RSX("TypeID") & "_" & RSX("IsService") then 68 conn.close 69 response.redirect "?errMsg=" & Server.URLEncode("���!<br> �� �� ����� ���� ��� ������� �� ���� ����� �����.") 70 end if 71 totalPrice = totalPrice + RSX("price") 72 totalQtty = totalQtty + RSX("qtty") 73 Comment = RSX("Comment") 74 if Comment<>"-" then 75 Comment = "�����: " & Comment 76 allComments = allComments & Comment & chr(13) & chr(13) 77 else 78 Comment = "����� �����" 79 end if 80 set RST=Conn.Execute ("SELECT RealName FROM Users WHERE (ID = "& RSX("CreatedBy") & ")" ) 81 82 %> 83 <TR bgcolor="<%=tmpColor%>" title="<%=Comment%>"> 84 <TD><%=RSX("typeName")%></TD> 85 <TD><span dir=ltr><%=shamsidate(RSX("ReqDate"))%></span></TD> 86 <TD><span dir=ltr><%=shamsidate(RSX("DueDate"))%></span></TD> 87 <TD><%=RSX("price")%> 88 <% 89 if RSX("price") <> 0 then 90 response.write "<br><small>" & RSX("priceComment") & "</small>" 91 end if 92 %> 93 </TD> 94 <TD> 95 <% if clng(RSX("IsService"))=0 or clng(RSX("Qtty"))<>0 then %> 96 (�����: <%=RSX("qtty")%>) 97 <% end if %> 98 <% if clng(RSX("orderID"))<>-1 then %> 99 <%=RSX("orderID")%> 100 <% end if %> 101 </TD> 102 <TD><%=RST("RealName")%></TD> 103 <TD width=8%><input type="hidden" name="reqID" value="<%=RSX("id")%>"> 104 <input type="text" size=2 name="percent" value="<%=percent%>">% 105 </TD> 106 </TR> 107 <% 108 RSX_typeID = clng(RSX("typeID")) 109 RSX_typeName = RSX("typeName") 110 DueDate = RSX("DueDate") 111 IsService = RSX("IsService") 112 RSX.moveNext 113 if DueDate="" then DueDate =shamsiToday() 114 115 next 116 %> 117 <TR bgcolor="eeeeee" > 118 <TD align=center colspan=7 height=10></TD> 119 </TR> 120 <TR > 121 <input type="hidden" Name='tmpDlgArg' value=''> 122 <input type="hidden" Name='tmpDlgTxt' value=''> 123 <SCRIPT LANGUAGE="JavaScript"> 124 <!-- 125 function selectVendor(){ 126 document.all.tmpDlgArg.value="#" 127 document.all.tmpDlgTxt.value="��� ����� �� �� �� ������ ����� ���� ���� ����:" 128 window.showModalDialog('../dialog_GenInput.asp',document.all.tmpDlgTxt,'dialogHeight:200px; dialogWidth:440px; dialogTop:; dialogLeft:; edge:None; center:Yes; help:No; resizable:No; status:No;'); 129 if (document.all.tmpDlgTxt.value !="") { 130 window.showModalDialog('../AP/dialog_SelectAccount.asp?act=select&search='+escape(document.all.tmpDlgTxt.value), document.all.tmpDlgArg, 'dialogWidth:780px; dialogHeight:500px; dialogTop:; dialogLeft:; edge:Raised; center:Yes; help:No; resizable:Yes; status:No;'); 131 if (document.all.tmpDlgArg.value!="#"){ 132 Arguments=document.all.tmpDlgArg.value.split("#") 133 theSpan=document.getElementById("AccountSpan"); 134 theSpan.getElementsByTagName("input")[0].value=Arguments[0]; 135 theSpan.getElementsByTagName("span")[0].innerText=Arguments[1]+"["+Arguments[0]+"]"; 136 } 137 } 138 } 139 140 //--> 141 </SCRIPT> 142 <TD colspan=1 align=left>�������</TD> 143 <TD colspan=6 align=right> 144 <INPUT TYPE="hidden" name="IsService" value=<%=IsService%>> 145 <span id="AccountSpan"><%' after any changes in this span "../AR/Customers.asp" must be revised%> 146 <INPUT TYPE="hidden" NAME="vendor" value=""><b><span>................................</span></b> 147 </span> 148 <INPUT class="GenButton" TYPE="button" value="������" onClick="selectVendor();"> 149 </TD> 150 </TR> 151 <TR > 152 <% 153 if (IsService) then 154 if RSX_typeID <> 0 then 155 %> 156 <TD colspan=1 align=left>��� ����</TD> 157 <TD colspan=6 align=right> 158 <SELECT NAME="type" class=inputBut size="1" > 159 <% 160 set RS4 = conn.Execute ("SELECT * FROM OutServices") 161 while not (RS4.eof) %> 162 <OPTION value="<%=RS4("ID")%>" <% 163 if RS4("ID")=RSX_typeID then 164 response.write " selected " 165 end if 166 %>><%=RS4("Name")%></option> 167 <% 168 RS4.MoveNext 169 wend 170 RS4.close 171 %> 172 </SELECT> 173 </TD> 174 <% else %> 175 <TD colspan=1 align=left>��� ���� �� ����</TD> 176 <TD colspan=6 align=right> 177 <INPUT TYPE="hidden" name=type value=0> 178 <INPUT TYPE="text" class=inputBut NAME="typeName" size=51 value="<%=RSX_typeName%>"> 179 </td> 180 <% end if %> 181 <% else %> 182 <TD colspan=1 align=left>��� ����</TD> 183 <TD colspan=6 align=right> 184 <SELECT NAME="type" class=inputBut size="1" > 185 <% 186 set RS4 = conn.Execute ("SELECT * FROM InventoryItems") 187 while not (RS4.eof) %> 188 <OPTION value="<%=RS4("ID")%>" <% 189 if RS4("ID")=RSX_typeID then 190 response.write " selected " 191 end if 192 %>><%=RS4("Name")%> (<%=RS4("Unit")%>)</option> 193 <% 194 RS4.MoveNext 195 wend 196 RS4.close 197 %> 198 </SELECT> 199 </TD> 200 <% end if %> 201 </TR> 202 <TR > 203 <TD colspan=1 align=left>�����</TD> 204 <TD colspan=6 align=right> 205 <INPUT TYPE="text" NAME="qtty" class=inputBut size=51 value="<%=totalQtty%>" onKeyPress="return maskNumber(this);"> 206 </TD> 207 </TR> 208 <TR > 209 <TD colspan=1 align=left>���� ���� ������</TD> 210 <TD colspan=6 align=right> 211 <INPUT TYPE="text" NAME="price" class=inputBut size=51 value="<%=totalPrice%>" onKeyPress="return maskNumber(this);"> 212 </TD> 213 </TR> 214 <TR > 215 <TD colspan=1 align=left>�� ��� ����� ���� ����� ���</TD> 216 <TD colspan=6 align=right> 217 <INPUT dir=ltr TYPE="text" NAME="date1" class=inputBut size=51 value="<%=shamsiToday()%>" onKeyPress="return maskDate(this);" onblur="acceptDate(this)"> 218 </TD> 219 </TR> 220 <TR > 221 <TD colspan=1 align=left>�� ��� ����� ���� ������ ���</TD> 222 <TD colspan=6 align=right> 223 <INPUT dir=ltr TYPE="text" NAME="date2" class=inputBut size=51 value="<%=shamsiDate(DueDate)%>" onKeyPress="return maskDate(this);" onblur="acceptDate(this)"> 224 </TD> 225 </TR> 226 <TR > 227 <TD colspan=1 align=left>�������</TD> 228 <TD colspan=6 align=right> 229 <TEXTAREA NAME="comment" class=inputBut ROWS="7" COLS="32" ><%=allComments%></TEXTAREA> 230 </TD> 231 </TR> 232 <TR > 233 <TD colspan=7 align=center> 234 <INPUT TYPE="submit" class=inputBut Name="Submit" Value="��� �����" style="width:100px;" tabIndex="14"> 235 </TD> 236 </TR> 237 </FORM> 238 </body> 239 </html> 240 <% 241 end if 242 response.end 243end if 244 245 246 247'----------------------------------------------------------------------------------------------------- 248'-------------------------------------------------------------------------- Submit an OutService Order 249'----------------------------------------------------------------------------------------------------- 250if request.form("Submit")="��� �����" then 251 vendorID = request.form("vendor") 252 otypeID = clng(request.form("type")) 253 otype = request.form("TypeName") 254 TotalPrice = request.form("price") 255 comment = request.form("comment") 256 ordDate = shamsiToday() 257 date1 = request.form("date1") 258 date2 = request.form("date2") 259 IsService = request.form("IsService") 260 qtty = request.form("qtty") 261 262 a = qtty 263 if isNumeric(a) and a<>"" then 264 qttyLetter = ConvertIT(a) 265 else 266 response.write "<br>" 267 call showAlert ("���! ����� ���� ���� ���.", CONST_MSG_ERROR) 268 response.end 269 end if 270 271 if TotalPrice="" then TotalPrice=0 272 if comment = "" then 273 comment = "-" 274 end if 275 276 if vendorID="" then 277 response.write "<br>" 278 call showAlert ("���! ������� ������ ���� ���.", CONST_MSG_ERROR) 279 response.end 280 end if 281 282 TypeID_IsService = otypeID 283 if IsService then 284 TypeID_IsService = TypeID_IsService & "_True" 285 IsServiceFlag = 1 286 if otypeID <> 0 then 287 set RS4 = conn.Execute ("SELECT * FROM OutServices where ID=" & otypeID) 288 if (RS4.eof) then 289 otype="-unknown-" 290 else 291 otype=RS4("Name") 292 end if 293 RS4.close 294 end if 295 else 296 TypeID_IsService = TypeID_IsService & "_False" 297 IsServiceFlag = 0 298 set RS4 = conn.Execute ("SELECT * FROM InventoryItems where ID=" & otypeID) 299 if (RS4.eof) then 300 otype="-unknown-" 301 else 302 otype=RS4("Name") 303 end if 304 RS4.close 305 end if 306 307 for i=1 to request.form("ReqID").count 308 RequestID= clng(request.form("ReqID")(i)) 309 set RSX=Conn.Execute ("SELECT * FROM purchaseRequests WHERE id = "& RequestID) 310 if TypeID_IsService <> RSX("TypeID") & "_" & RSX("IsService") then 311 conn.close 312 response.write "<BR><BR>" 313 call showAlert ("���!<br>��� ������� ��� ���� �� ��� ����� ���� ������ ����.", CONST_MSG_ERROR) 314 response.end 315 end if 316 RSX.close 317 next 318 319 mySql="INSERT INTO purchaseOrders (Vendor_ID, typeName, typeID, comment, OrdDate, price, IsService, qtty, qttyLetter) VALUES ("& clng(VendorID) & ", N'"& sqlSafe(otype) & "', "& otypeID & ", N'"& sqlSafe(comment) & "',N'"& sqlSafe(ordDate) & "', "& sqlSafe(TotalPrice) & " , "& IsServiceFlag & ", "& sqlSafe(qtty) & ", N'" & sqlSafe(qttyLetter) & "');SELECT @@Identity AS NewPO" 320 set RS4 = Conn.execute(mySQL).NextRecordSet 321 OrdID = RS4 ("NewPO") 322 RS4.close 323 324 for i=1 to request.form("ReqID").count 325 RequestID=request.form("ReqID")(i) 326 Percent=request.form("Percent")(i) 327 conn.Execute ("INSERT INTO purchaseRequestOrderRelations (Req_ID, Ord_ID, PercentOfAll) VALUES ("& RequestID & ", "& ordID & ", "& Percent & " )") 328 Conn.Execute ("UPDATE purchaseRequests SET status = 'ord' WHERE ID = "& RequestID ) 329 response.write RequestID & "- per: " 330 response.write Percent & " % <br>" 331 next 332 333 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusTime, statusDate, statusCode, StatusDetail, user_id) VALUES ("& OrdID & ", '"& currentTime10() & "', N'"& ordDate & "', "& 0 & ", N'����� �����' ," & session("ID") & ")") 334' conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusTime, statusDate, statusCode, StatusDetail) VALUES ("& OrdID & ", N'"& Date1 & "', "& 1 & ", N'�� ��� ����� ���� ����� ���' )") 335' conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusTime, statusDate, statusCode, StatusDetail) VALUES ("& OrdID & ", N'"& Date2 & "', "& 2 & ", N'�� ��� ����� ���� ������ ���' )") 336' 337' Changed By Kid 821224 Because There was An Error : Number of VALUES does not match the number of Fields. 338' 339 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusDate, statusCode, StatusDetail,user_id) VALUES ("& OrdID & ", N'"& Date1 & "', "& 1 & ", N'�� ��� ����� ���� ����� ���' ," & session("id") & ")") 340 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusDate, statusCode, StatusDetail,user_id) VALUES ("& OrdID & ", N'"& Date2 & "', "& 2 & ", N'�� ��� ����� ���� ������ ���' ," & session("id") & ")") 341 342 343 response.redirect "outServiceTrace.asp?od=" & ordID 344 345end if 346 347 348'----------------------------------------------------------------------------------------------------- 349'---------------------------------------------------------------------- Submit an Inventory Item Order 350'----------------------------------------------------------------------------------------------------- 351if request.form("Submit")="��� ����� ����" then 352 vendorID = request.form("vendor") 353 otypeID = clng(request.form("type")) 354 qtty = request.form("qtty") 355 comment = request.form("comment") 356 ordDate = shamsiToday() 357 date1 = request.form("date1") 358 date2 = request.form("date2") 359 360 if qtty="" then qtty=0 361 362 363 set RS4 = conn.Execute ("SELECT * FROM InventoryItems where ID=" & otypeID) 364 if (RS4.eof) then 365 otype="-unknown-" 366 else 367 otype=RS4("Name") 368 end if 369 RS4.close 370 371 mySql="INSERT INTO purchaseOrders (Vendor_ID, typeName, typeID, comment, OrdDate, price) VALUES ("& VendorID & ", N'"& otype & "', "& otypeID & ", N'"& comment & "',N'"& ordDate & "', "& TotalPrice & " )" 372 conn.Execute mySql 373 374 set RS4 = conn.Execute ("SELECT max(id) as nid FROM purchaseOrders where Vendor_ID=" & VendorID & " and ordDate='" & ordDate & "' and typeID=" & otypeID ) 375 if (RS4.eof) then 376 response.write "BAD ERROR!@<br> Contact system admin" 377 response.end 378 else 379 OrdID=RS4("nid") 380 end if 381 RS4.close 382 383 for i=1 to request.form("ReqID").count 384 RequestID=request.form("ReqID")(i) 385 Percent=request.form("Percent")(i) 386 conn.Execute ("INSERT INTO purchaseRequestOrderRelations (Req_ID, Ord_ID, PercentOfAll) VALUES ("& RequestID & ", "& ordID & ", "& Percent & " )") 387 Conn.Execute ("update purchaseRequests SET status = 'ord' where id = "& RequestID ) 388 response.write RequestID & "- per: " 389 response.write Percent & " % <br>" 390 next 391 392 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusDate, statusCode, StatusDetail,user_id,statusTime) VALUES ("& OrdID & ", '"& ordDate & "', "& 0 & ", N'����� �����' ," & session("id") & ", '"& currentTime10() & "')") 393 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusDate, statusCode, StatusDetail,user_id) VALUES ("& OrdID & ", '"& Date1 & "', "& 1 & ", N'�� ��� ����� ���� ����� ���' ," & session("id") & ")") 394 conn.Execute ("INSERT INTO purchaseOrderStatus (Ord_ID, statusDate, statusCode, StatusDetail,user_id) VALUES ("& OrdID & ", '"& Date2 & "', "& 2 & ", N'�� ��� ����� ���� ������ ���' ," & session("id") & ")") 395 396 397 response.redirect "outServiceTrace.asp?od=" & ordID 398 399end if 400 401'----------------------------------------------------------------------------------------------------- 402'------------------------------------------------------------------------------------------------ Main 403'----------------------------------------------------------------------------------------------------- 404 405sortBy=request("s") 406if sortBy="4" then 407 sB="order_ID" 408elseif sortBy="2" then 409 sB="ReqDate" 410elseif sortBy="3" then 411 sB="price" 412else 413 sB="typeName" 414end if 415 416%> 417<br> 418<SCRIPT LANGUAGE="JavaScript"> 419<!-- 420function checkValidation(){ 421 result = true; 422 try{ 423 var slctn = document.getElementsByName("outReq"); 424 var TypeID_IsService = ""; 425 for(i=0;i<slctn.length;i++){ 426 if(slctn[i].checked){ 427 if (TypeID_IsService == ""){ 428 TypeID_IsService = slctn[i].parentNode.getElementsByTagName("INPUT")[0].value; 429 } 430 if (TypeID_IsService != slctn[i].parentNode.getElementsByTagName("INPUT")[0].value){ 431 tmpBG=slctn[i].parentNode.parentNode.bgColor; 432 slctn[i].parentNode.parentNode.bgColor="red"; 433 slctn[i].focus(); 434 alert('���!\n �� �� ����� ���� ��� ������� �� ���� ����� �����.'); 435 slctn[i].parentNode.parentNode.bgColor=tmpBG; 436 result = false; 437 break; 438 } 439 } 440 } 441 } 442 catch(e){ 443 alert("Error: \n"+e.message) 444 result = false; 445 } 446 return result; 447} 448//--> 449</SCRIPT> 450<FORM METHOD="POST" ACTION="OutServiceOrder.asp" OnSubmit="return checkValidation();"> 451<% 452 set RSS=Conn.Execute ("SELECT * FROM purchaseRequests WHERE (Status = 'new' AND TypeID <> 0 AND IsService=1) ORDER BY " & sB) 453 if not RSS.EOF then 454%> 455 <TABLE dir=rtl align=center width=600 class="outServTable1"> 456 <TR class="outServTR1"> 457 <TH align=center colspan=6>������� ��� ���� ����� ����</TH> 458 </TR> 459 <TR class="outServTR1"> 460 <TD><INPUT TYPE="checkbox" NAME="" disabled></TD> 461 <TD><A HREF="outServiceOrder.asp?s=1"><SMALL>��� ������</SMALL></A></TD> 462 <TD><A HREF="outServiceOrder.asp?s=2"><SMALL>����� �������</SMALL></A></TD> 463 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 464 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 465 <TD><A HREF="outServiceOrder.asp?s=4"><SMALL>����� �����</SMALL></A></TD> 466 </TR> 467<% 468 469 tmpCounter=0 470 Do while not RSS.eof 471 set RST=Conn.Execute ("SELECT RealName FROM Users WHERE (ID = "& RSS("CreatedBy") & ")" ) 472 tmpCounter = tmpCounter + 1 473 Comment = RSS("Comment") 474 if Comment<>"-" then 475 Comment = "�����: " & Comment 476 else 477 Comment = "����� �����" 478 end if 479 if tmpCounter mod 2 = 1 then 480 tmpColor="#FFFFFF" 481 tmpColor2="#FFFFBB" 482 Else 483 tmpColor="#DDDDDD" 484 tmpColor2="#EEEEBB" 485 End if 486%> 487 <TR bgcolor="<%=tmpColor%>" title="<%=Comment%>"> 488 <TD><INPUT TYPE="Hidden" Name="TypeID_IsService" Value="<%=RSS("TypeID")&"_"&RSS("IsService")%>"><INPUT TYPE="checkbox" NAME="outReq" VALUE="<%=RSS("id")%>"></TD> 489 <TD><%=RSS("typeName")%></TD> 490 <TD><span dir=ltr><%=shamsidate(RSS("ReqDate"))%></span></TD> 491 <TD><%=RSS("price")%></TD> 492 <TD><%=RST("RealName")%></TD> 493 <TD><a href="../order/order.asp?act=show&id=<%=RSS("orderID")%>"><%=RSS("orderID")%></a></small></TD> 494 </TR> 495<% 496 RSS.moveNext 497 Loop 498%> 499 </TABLE> 500<% 501 end if 502 RSS.close 503 504 505 set RSS=Conn.Execute ("SELECT * FROM purchaseRequests WHERE (Status = 'new' AND IsService=0) ORDER BY " & sB) 506 if not RSS.EOF then 507%> 508 <BR> 509 <TABLE dir=rtl align=center width=600 class="outServTable1"> 510 <TR class="outServTR1"> 511 <TH align=center colspan=6>������� ��� ���� ���� ��� �����</TH> 512 </TR> 513 <TR class="outServTR1"> 514 <TD><INPUT TYPE="checkbox" NAME="" disabled></TD> 515 <TD><A HREF="outServiceOrder.asp?s=1"><SMALL>��� ������</SMALL></A></TD> 516 <TD><A HREF="outServiceOrder.asp?s=2"><SMALL>����� �������</SMALL></A></TD> 517 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 518 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 519 <TD><A HREF="outServiceOrder.asp?s=4"><SMALL>����� �����</SMALL></A></TD> 520 </TR> 521<% 522 523 tmpCounter=0 524 Do while not RSS.eof 525 set RST=Conn.Execute ("SELECT RealName FROM Users WHERE (ID = "& RSS("CreatedBy") & ")" ) 526 tmpCounter = tmpCounter + 1 527 Comment = RSS("Comment") 528 if Comment<>"-" then 529 Comment = "�����: " & Comment 530 else 531 Comment = "����� �����" 532 end if 533 if tmpCounter mod 2 = 1 then 534 tmpColor="#FFFFFF" 535 tmpColor2="#FFFFBB" 536 Else 537 tmpColor="#DDDDDD" 538 tmpColor2="#EEEEBB" 539 End if 540 541 orderIDpos = clng(RSS("OrderID")) 542 if orderIDpos<>-1 then 543 orderLink="<small><a href='../shopfloor/manageOrder.asp?radif=" & orderIDpos & "'>" & orderIDpos & "</a></small>" 544 else 545 orderLink=" " 546 end if 547%> 548 <TR bgcolor="<%=tmpColor%>" title="<%=Comment%>"> 549 <TD><INPUT TYPE="Hidden" Name="TypeID_IsService" Value="<%=RSS("TypeID")&"_"&RSS("IsService")%>"><INPUT TYPE="checkbox" NAME="outReq" VALUE="<%=RSS("id")%>"></TD> 550 <TD><%=RSS("typeName")%></TD> 551 <TD><span dir=ltr><%=RSS("ReqDate")%></span></TD> 552 <TD><%=RSS("price")%></TD> 553 <TD><%=RST("RealName")%></TD> 554 <TD><%=orderLink%> (�����: <%=RSS("qtty")%>) </TD> 555 </TR> 556 557<% 558 RSS.moveNext 559 Loop 560%> 561 </TABLE> 562<% 563 end if 564 RSS.close 565 566 set RSS=Conn.Execute ("SELECT * FROM purchaseRequests WHERE (Status = 'new' AND TypeID=0) ORDER BY " & sB) 567 568 if not RSS.EOF then 569 %> 570 <BR> 571 <TABLE dir=rtl align=center width=600 class="outServTable1"> 572 <TR class="outServTR1"> 573 <TH align=center colspan=6>������� ��� ���� ���� ������ � �����</TH> 574 </TR> 575 <TR class="outServTR1"> 576 <TD><INPUT TYPE="checkbox" NAME="" disabled></TD> 577 <TD><A HREF="outServiceOrder.asp?s=1"><SMALL>��� ������</SMALL></A></TD> 578 <TD><A HREF="outServiceOrder.asp?s=2"><SMALL>����� �������</SMALL></A></TD> 579 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 580 <TD><A HREF="outServiceOrder.asp?s=3"><SMALL>����</SMALL></A></TD> 581 <TD><A HREF="outServiceOrder.asp?s=4"><SMALL>����� �����</SMALL></A></TD> 582 </TR> 583<% 584 tmpCounter=0 585 Do while not RSS.eof 586 set RST=Conn.Execute ("SELECT RealName FROM Users WHERE (ID = "& RSS("CreatedBy") & ")" ) 587 Comment = RSS("Comment") 588 if Comment<>"-" then 589 Comment = "�����: " & Comment 590 else 591 Comment = "����� �����" 592 end if 593 tmpCounter = tmpCounter + 1 594 if tmpCounter mod 2 = 1 then 595 tmpColor="#FFFFFF" 596 tmpColor2="#FFFFBB" 597 Else 598 tmpColor="#DDDDDD" 599 tmpColor2="#EEEEBB" 600 End if 601 orderIDpos = clng(RSS("OrderID")) 602 if orderIDpos<>-1 then 603 orderLink="<small><a href='../order/order.asp?act=show&id=" & orderIDpos & "'>" & orderIDpos & "</a></small>" 604 else 605 orderLink=" " 606 end if 607 608 if (RSS("qtty")="" or RSS("qtty")="0") then 609 if orderIDpos = -1 then 610 orderQtty = "-" 611 else 612 orderQtty = "" 613 end if 614 else 615 orderQtty ="(�����:"& RSS("qtty") & ")" 616 end if 617%> 618 <TR bgcolor="<%=tmpColor%>" title="<%=Comment%>"> 619 <TD><INPUT TYPE="Hidden" Name="TypeID_IsService" Value="<%=RSS("TypeID")&"_"&RSS("IsService")%>"><INPUT TYPE="checkbox" NAME="outReq" VALUE="<%=RSS("id")%>"></TD> 620 <TD><%=RSS("typeName")%></TD> 621 <TD><span dir=ltr><%=shamsidate(RSS("ReqDate"))%></span></TD> 622 <TD><%=RSS("price")%></TD> 623 <TD><%=RST("RealName")%></TD> 624 <TD><%=orderLink%> <%=orderQtty%> </TD> 625 </TR> 626<% 627 RSS.moveNext 628 Loop 629%> 630 </TABLE> 631<% 632 end if 633 RSS.close 634%> 635<BR> 636<center><INPUT TYPE="submit" Name="Submit" Value="����� ����� ����" style="width:150px;" tabIndex="14"></center> 637<br> 638</FORM> 639<% 640Conn.Close 641%> 642 643<!--#include file="tah.asp" -->