📄 fetch.pl
字号:
#!/usr/bin/perl################################################## Get the cmdline parameters ###################################################$function=$ARGV[$#ARGV];#print $function;if($function eq "update"){ $HTMLfile=qq~<HTML><HEAD><SCRIPT language=JavaScript> <!-- function assign(){}//to confirm the fields, including validation, before they are submitted function myConfirm() { if (document.forms[0].cr_number.value=='') {alert('cr_number is required for any TUXEDO CCE Regression CR. Please try again!'); return false;} document.forms[1].cr_number.value=document.forms[0].cr_number.value; //cr_number document.forms[1].cr_Summary.value=document.forms[0].cr_Summary.value; //cr_Summary document.forms[1].component.value=document.forms[0].component.value; //component document.forms[1].rel.value=document.forms[0].rel.value; //rel document.forms[1].rp.value=document.forms[0].rp.value; //rp document.forms[1].engineer.value=document.forms[0].engineer.value; //engineer document.forms[1].reporter.value=document.forms[0].reporter.value; //reporter document.forms[1].type.value=document.forms[0].type.value; //type document.forms[1].fix.value=document.forms[0].fix.value; //fix document.forms[1].status.value=document.forms[0].status.options[document.forms[0].status.selectedIndex].text; //status document.forms[1].rel_cr.value=document.forms[0].rel_cr.value; //rel_cr document.forms[1].date_updated.value=document.forms[0].updatemonth.options[document.forms[0].updatemonth.selectedIndex].text+'/'+document.forms[0].updateday.options[document.forms[0].updateday.selectedIndex].text+'/'+document.forms[0].updateyear.options[document.forms[0].updateyear.selectedIndex].text; //date_updated document.forms[1].description.value=document.forms[0].description.value; //description var names = new Array("cr_number","cr_Summary","component","rel","rp","engineer","reporter","type","fix","status","rel_cr","date_updated","description"); var windowHandle = window.open("","msgwin","width=600,height=500,scrollbars=yes"); if (!windowHandle.opener) windowHandle.opener = self; windowHandle.document.write("<HTML><HEAD><TITLE>For your information</TITLE></HEAD><BODY onBlur=\\"self.focus()\\"><table border=1>"); for (var l=0;l<names.length;l++) windowHandle.document.write("<TR><TD WIDTH=2%25 ALIGN=LEFT>" +names[l]+"<TD WIDTH=15%25 ALIGN=LEFT>" +document.forms[1].elements[l+1].value+"</TD></TR>"); windowHandle.document.write("</table>"); windowHandle.document.write('<FORM>'); windowHandle.document.write("<BR><br>Press OK to submit an Regression CR containing the above information?<BR><BR>"); windowHandle.document.write('<TABLE align=center>'); windowHandle.document.write("<TR><TD><INPUT align=center TYPE=button VALUE=' O k ' onClick=\\"opener.document.forms[1].submit();self.close()\\"> <INPUT align=center TYPE=button VALUE=Cancel onClick=\\"self.close()\\"></TR></TD>"); windowHandle.document.write('</TABLE></FORM></BODY></html>'); windowHandle.document.close(); } //clear all the text fieldsfunction clearText() {if (document.all){ for (var i=0;i<document.forms[0].elements.length;i++) if ((document.forms[0].elements[i].type == "text")||(document.forms[0].elements[i].type == "textarea")) document.forms[0].elements[i].value = ''; }else if (document.layers){ for (var i=0;i<document.forms[0].elements.length;i++) if ((document.forms[0].elements[i].type == "text")||(document.forms[0].elements[i].type == "textarea")) document.forms[0].elements[i].value = ''; for (var i=0;i<document.layers["num2"].document.forms[0].elements.length;i++) if (document.layers["num2"].document.forms[0].elements[i].type == "text") document.layers["num2"].document.forms[0].elements[i].value = ''; }}//--></SCRIPT></HEAD><BODY text=#000000 vLink=#ad0031 link=#00208c bgColor=#ffffee><A name=top></A><p align=left><!-- ====================================================================<A HREF="http://www-tux/tuxedo/tier4/tier4home" onClick="window.open('http://bjwin2k2/cce/index.html','temp');"><i>Back to home</i></A> ==================================================================== --><A href="http://bjwin2k2/cce/index.html"><I>Back to home</I></A> </P><TABLE cellSpacing=2 cellPadding=2 align=center border=0> <tr> <td align=center><font size = "5">Add A new Regression CR:</font></td></tr></TABLE> <p align="center"><font size="4" color="red">NOTE:</font><font size="4"> use "/" to seperate two CR numbers and don't need type "CR" while input CR numbers.</font></p> <TBODY></TBODY><FORM name=input><TABLE width="50%25" align=center border=2> <TBODY> <TR> <TD align=left bgcolor="#dcdcdc"><A title="the change request number">cr_number:<font color="red">*</font></A></TD> <TD align=left><INPUT size=10 name=cr_number></TD> <TD align=left bgcolor="#dcdcdc"><A title=Summary>Summary :</A></TD> <TD align=left><TEXTAREA name=cr_Summary rows=3 cols=30></TEXTAREA></TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="component">Component:</A></TD> <TD align=left><INPUT name=component></TD> <TD align=left bgcolor="#dcdcdc"><A title="rel">Rel :</A></TD> <TD align=left><INPUT name=rel></TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="rp">RP# :</A></TD> <TD align=left><INPUT name=rp></TD> <TD align=left bgcolor="#dcdcdc"><A title="engineer">Engineer:</A></TD> <TD align=left><INPUT name=engineer></TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="reporter">Reporter:</A></TD> <TD align=left><INPUT name=reporter></TD> <TD align=left bgcolor="#dcdcdc"><A title="type">Type :</A></TD> <TD align=left><INPUT name=type></TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="fix">Fix RP# :</A></TD> <TD align=left><INPUT name=fix></TD> <TD align=left bgcolor="#dcdcdc"><A title="the tier which the Regression CR belongs to">status:</A></TD> <TD align=left><SELECT size=1 name=status> <option> closed </option> <option> open </option> <option> open(partly) </option> </SELECT> </TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="rel_cr">Rel. CR :</A></TD> <TD align=left><INPUT name=rel_cr></TD> <TD align=left bgcolor="#dcdcdc"><A title="the date to escalate this Regression CR">date_updated:</A></TD> <TD align=left> <SCRIPT language=JavaScript> <!-- function pad (number) { return (number < 10) ? '0' + number : number; } function unpad(number) { return (number > 1900) ? number%25100 : ((number > 99) ? number -100 :number);} var today = new Date() ayear = today.getYear() amonth = today.getMonth()+1 aday = today.getDate() var output = 'Month<SELECT size = 1 name =updatemonth >'; for (var i=(-1)*amonth+1;i<=12-amonth;i++){ output += '<OPTION '; if (i==0) output += ' SELECTED'; output += '>' + (amonth+i) + '<\\/OPTION>'; } output += '<\\/SELECT> Day<SELECT size = 1 name = updateday >'; for (var i=(-1)*aday+1;i<=31-aday;i++){ output += '<OPTION '; if (i==0) output += ' SELECTED'; output += '>' + (aday+i) + '<\\/OPTION>'; } output += '<\\/SELECT> Year<SELECT size = 1 name = updateyear>';//This is bogus! When you cross a new year, for the initial value of 'i' in//the FOR loop below, you need to MAKE SURE that it is the negative of the//value of the 2-digit year. for (var i=(-1)*ayear+1980; i<=2050-ayear; i++) { output += '<OPTION '; if (i==0) output += ' SELECTED'; output += '>' + (ayear+i) + '<\\/OPTION>'; } output += '<\\/SELECT>'; document.write(output); //--></SCRIPT> </TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="a brief description of the Regression CR">description:</A></TD> <TD align=left colspan=3><TEXTAREA name=description rows=15 cols=90></TEXTAREA></TD></TR> </TBODY></TABLE></FORM><FORM name=output action=http://lcui01:11120 method=post><INPUT type=hidden name=update value=1> <INPUT type=hidden name=cr_number> <INPUT type=hidden name=cr_Summary> <INPUT type=hidden name=component> <INPUT type=hidden name=rel><INPUT type=hidden name=rp> <INPUT type=hidden name=engineer> <INPUT type=hidden name=reporter> <INPUT type=hidden name=type> <INPUT type=hidden name=fix> <INPUT type=hidden name=status> <INPUT type=hidden name=rel_cr> <INPUT type=hidden name=date_updated> <INPUT type=hidden name=description> </FORM><A name=dyn></A><FORM name=dynamicfoot><TABLE align=center> <TBODY> <TR> <TD><INPUT onclick=myConfirm() type=button value="Submit it" name=upload> <INPUT onclick=clearText() type=button value="Reset text"> </TD></TR></TBODY></TABLE></FORM></BODY></HTML> ~;}else{ $HTMLfile=qq~<HTML><HEAD><SCRIPT language=JavaScript> <!-- function assign(){}//to confirm the fields, including validation, before they are submitted function myConfirm() { if ((document.forms[0].cr_number.value=='')&&(document.forms[0].rel.value=='')&&(document.forms[0].rp.value=='')) {alert('You should choose one at least in the table.Please try again!'); return false;} document.forms[1].cr_number.value=document.forms[0].cr_number.value; //cr_number document.forms[1].rel.value=document.forms[0].rel.value; //rel document.forms[1].rp.value=document.forms[0].rp.value; //rp var names = new Array("cr_number","rel","rp"); document.forms[1].submit();} //clear all the text fieldsfunction clearText() {if (document.all){ for (var i=0;i<document.forms[0].elements.length;i++) if ((document.forms[0].elements[i].type == "text")||(document.forms[0].elements[i].type == "textarea")) document.forms[0].elements[i].value = ''; }else if (document.layers){ for (var i=0;i<document.forms[0].elements.length;i++) if ((document.forms[0].elements[i].type == "text")||(document.forms[0].elements[i].type == "textarea")) document.forms[0].elements[i].value = ''; for (var i=0;i<document.layers["num2"].document.forms[0].elements.length;i++) if (document.layers["num2"].document.forms[0].elements[i].type == "text") document.layers["num2"].document.forms[0].elements[i].value = ''; }}function listAll() {
document.output2.submit();
} //--></SCRIPT></HEAD><BODY text=#000000 vLink=#ad0031 link=#00208c bgColor=#ffffee><A name=top></A><P align=left><!-- ====================================================================<A HREF="http://www-tux/tuxedo/tier4/tier4home" onClick="window.open('http://bjwin2k2/cce/index.html','temp');"><i>Back to home</i></A> ==================================================================== --><A href="http://bjwin2k2/cce/index.html"><I>Back to home</I></A> </P><TABLE cellSpacing=2 cellPadding=2 align=center border=0> <tr><td align=left><font size = "4">Query A TUXEDO CCE Regression CR:</font></td></tr> <TBODY></TBODY></TABLE><FORM name=input><TABLE width="50%25" align=center border=2> <TBODY> <TR> <TD align=left bgcolor="#dcdcdc"><A title="the change request number">cr_number:</A></TD> <TD align=left><INPUT size=50 name=cr_number></TD> </TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="rel">Rel :</A></TD> <TD align=left><INPUT size=50 name=rel></TD></TR> <TR> <TD align=left bgcolor="#dcdcdc"><A title="rp">RP# :</A></TD> <TD align=left><INPUT size=50 name=rp></TD> </TR> </TBODY></TABLE></FORM><FORM name=output action=http://lcui01:11120 method=post><INPUT type=hidden name=query value=1> <INPUT type=hidden name=cr_number> <INPUT type=hidden name=rel><INPUT type=hidden name=rp> </FORM><FORM name=output2 action=http://lcui01:11120 method=post>
<INPUT type=hidden name=query value=2>
<INPUT type=hidden name=cr_number>
<INPUT type=hidden name=rel>
<INPUT type=hidden name=rp>
</FORM><A name=dyn></A><FORM name=dynamicfoot><TABLE align=center> <TBODY> <TR> <TD><INPUT onclick=myConfirm() type=button value="Submit it" name=upload> <INPUT onclick=clearText() type=button value="Reset text"> <INPUT onclick=listAll() type=button value="List all"> </TD></TR></TBODY></TABLE></FORM></BODY></HTML>~;}print $HTMLfile;#################LIST'S window# var windowHandle = window.open("","msgwin","width=500,height=300,scrollbars=yes");
# if (!windowHandle.opener)
# windowHandle.opener = self;
# windowHandle.document.write("<HTML><HEAD><TITLE>For your information</TITLE></HEAD><BODY onBlur=\\"self.focus()\\">");
# windowHandle.document.write('<FORM>');
# windowHandle.document.write("<BR><br>Are you sure to list all?<BR><BR>");
# windowHandle.document.write('<TABLE align=center>');
# windowHandle.document.write("<TR><TD><INPUT align=center TYPE=button VALUE=' O k ' onClick=\\"opener.document.output2.submit();self.close()\\"> <INPUT align=center TYPE=button VALUE=Cancel onClick=\\"self.close()\\"></TR></TD>");
# windowHandle.document.write('</TABLE></FORM></BODY></html>');
# windowHandle.document.close(); ########################QUERY'S window# var windowHandle = window.open("","msgwin","width=500,height=300,scrollbars=yes");# if (!windowHandle.opener)# windowHandle.opener = self;# windowHandle.document.write("<HTML><HEAD><TITLE>For your information</TITLE></HEAD><BODY onBlur=\\"self.focus()\\"><table border=1>");# for (var l=0;l<names.length;l++)# windowHandle.document.write("<TR><TD WIDTH=2%25 ALIGN=LEFT>"# +names[l]+"<TD WIDTH=15%25 ALIGN=LEFT>"# +document.forms[1].elements[l+1].value+"</TD></TR>");# windowHandle.document.write("</table>");# windowHandle.document.write('<FORM>');# windowHandle.document.write("<BR><br>Press OK to submit a Regression CR containing the above information?<BR><BR>"); # windowHandle.document.write('<TABLE align=center>');# windowHandle.document.write("<TR><TD><INPUT align=center TYPE=button VALUE=' O k ' onClick=\\"opener.document.forms[1].submit();self.close()\\"> <INPUT align=center TYPE=button VALUE=Cancel onClick=\\"self.close()\\"></TR></TD>"); # windowHandle.document.write('</TABLE></FORM></BODY></html>');# windowHandle.document.close();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -