コード例 #1
0
ファイル: rxform2.5.php プロジェクト: robocon/shs
		$thdatevn=$d.'-'.$m.'-'.$yr.$nVn;
		$query ="UPDATE runno SET runno = $nVn,startday=now()  WHERE title='VN'";
		$result = mysql_query($query) or die("Query failed");
		//   	         echo mysql_errno() . ": " . mysql_error(). "\n";
		//                       echo "<br>";
		// print "ÇѹãËÁè  àÃÔèÁ VN = $nVn <br>";
	}	
//ŧ·ÐàºÕ¹㹠opday table
	$query = "INSERT INTO opday(thidate,thdatehn,hn,vn,thdatevn,ptname,
	ptright,goup,camp,note,idcard,toborow,borow,dxgroup,officer)VALUES('$thidate','$thdatehn','$cHn','$nVn',
	'$thdatevn','$cPtname','$cPtright','$cGoup','$cCamp','$note','$cIdcard','$case','$borow','$code21','$sOfficer');";
	$result = mysql_query($query) or die("Query failed,cannot insert into opday");
}else{

	$nVn=$row->vn;
	$query ="UPDATE opday SET phaok='$ok'  WHERE thdatehn = '$thdatehn' AND vn = '".$nVn."' ";
	$result = mysql_query($query) or die("Query failed,update opday");

	//print "VN: $nVn ŧ·ÐàºÕ¹仡è͹áÅéÇ......¼ÙéµÃǨÊͺÊÔ·¸Ô  ..........$sOfficer";
}
include("unconnect.inc");
/////rxform.php

include("opd/class_printvn_l.php");
$classopd = new printvn();
$classopd->input_hn($_SESSION["cHn"]);
$classopd->outputprint();

?>

コード例 #2
0
ファイル: vnprint.php プロジェクト: robocon/shs
<?php
session_start();

include("opd/class_printvn.php");
$classopd = new printvn();

?>
<HTML>
<HEAD>
<TITLE> Print VN </TITLE>
<script type="text/javascript">
ie4up=nav4up=false;
var agt = navigator.userAgent.toLowerCase();
var major = parseInt(navigator.appVersion);
if ((agt.indexOf('msie') != -1) && (major >= 4))
	ie4up = true;
if ((agt.indexOf('mozilla') != -1)  && (agt.indexOf('spoofer') == -1) && (agt.indexOf('compatible') == -1) && ( major>= 4))
	nav4up = true;

window.onload = function(){
	window.print();
	var t;
	t = 1*1000;
	setTimeout("window.close()",t);

}
</SCRIPT>

</HEAD>

<BODY  BGCOLOR='FFFFFF' TOPMARGIN=0 BOTTOMMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN='0'>