
*/ ?>
5) {
/* alert("관리자 승인이 필요합니다."); */
sleep(2);
header ("Location:/login/logout.php");
exit;
}
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
header("Expires: 0"); // rfc2616 - Section 14.21
//header("Refresh:0"); // reload refresh
if(isset($_REQUEST["menu"])) // 선택한 메뉴에 대한 저장변수 1은 철재방화 절단치수
$menu=$_REQUEST["menu"];
else
$menu=0;
if(isset($_REQUEST["amount"])) // 선택한 메뉴에 대한 저장변수 1은 철재방화 절단치수
$amount=$_REQUEST["amount"];
else
$amount=1;
function getfile()
{
$myfile = fopen("guiderail.txt", "w") or die("Unable to open file!");
$txt=$item_sel;
fwrite($myfile, $txt);
fclose($myfile);
}
function insert() {
$level= $_SESSION["level"];
if(!isset($_SESSION["level"]) || $level>10) {
sleep(1);
header ("Location:/login/logout.php");
exit;
}
$motor1 = $_REQUEST["motor1"];
$motor2 = $_REQUEST["motor2"];
$motor3 = $_REQUEST["motor3"];
$motor4 = $_REQUEST["motor4"];
$motor5 = $_REQUEST["motor5"];
$motor6 = $_REQUEST["motor6"];
$motor7 = $_REQUEST["motor7"];
$motor8 = $_REQUEST["motor8"];
$motor9 = $_REQUEST["motor9"];
$motor10= $_REQUEST["motor10"];
require_once("../lib/mydb.php");
$pdo = db_connect();
/* print "접속완료" ; */
try{
$pdo->beginTransaction();
$sql = "update chandj.settings set motor1=?,motor2=?,motor3=?,motor4=?,motor5=?,motor6=?,motor7=?,motor8=?,motor9=?,motor10=?" ;
$num=1;
$stmh = $pdo->prepare($sql);
$stmh->bindValue(1, $motor1, PDO::PARAM_STR);
$stmh->bindValue(2, $motor2, PDO::PARAM_STR);
$stmh->bindValue(3, $motor3, PDO::PARAM_STR);
$stmh->bindValue(4, $motor4, PDO::PARAM_STR);
$stmh->bindValue(5, $motor5, PDO::PARAM_STR);
$stmh->bindValue(6, $motor6, PDO::PARAM_STR);
$stmh->bindValue(7, $motor7, PDO::PARAM_STR);
$stmh->bindValue(8, $motor8, PDO::PARAM_STR);
$stmh->bindValue(9, $motor9, PDO::PARAM_STR);
$stmh->bindValue(10, $motor10, PDO::PARAM_STR);
$stmh->bindValue(11, $num, PDO::PARAM_STR);
//고유키값이 같나?의 의미로 ?로 num으로 맞춰야 합니다.
$stmh->execute();
$pdo->commit();
} catch (PDOException $Exception) {
$pdo->rollBack();
print "오류: ".$Exception->getMessage();
}
}
// 절곡물에 대한 정보 불러오기
require_once("../lib/mydb.php");
$pdo = db_connect();
$sql = "select * from chandj.bending where num = ? ";
$stmh = $pdo->prepare($sql);
$num=1;
$stmh->bindValue(1,$num,PDO::PARAM_STR);
$stmh->execute();
$count = $stmh->rowCount();
if($count<1){
print "검색결과가 없습니다.
";
}else{
$row = $stmh->fetch(PDO::FETCH_ASSOC);
$bendnum = $row["bendnum"];
$bendname = $row["bendname"];
$no=array();
$railsum=0;
for($i=1;$i<=20;$i++) {
$temp="no" . $i;
$no[$i] = $row[$temp];
$railsum+=$no[$i];
}
$sum= $row["sum"];
}
$arraynum=1;
?>
