'
<head>
<title>Reprint</title>
<script>
function addDate1() {
date1 = new Date();
var month = date1.getMonth() + 1;
var day = date1.getDate();
var year = date1.getFullYear();
if (document.getElementById('date1').value == '') {
document.getElementById('date1').value = year + '-' + month + '-' + day;
}
}
function addDate() {
date = new Date();
var month = date.getMonth() + 1;
var day = date.getDate();
var year = date.getFullYear();
if (document.getElementById('date').value == '') {
document.getElementById('date').value = year + '-' + month + '-' + day;
}
}
</script>
<style type="text/css">
.btn_hover:hover{
color: darkblue ;
}
</style>
</head>
<body onload="addDate();
addDate1()" style="background-color: aliceblue;" >
<table align="" border="1">
<tr align="">
<td >
<h3 align="center" >Reprint Request Form <img src="sarasavi.png" /> </h3>
<%
Date dNow = new Date();
SimpleDateFormat ft = new SimpleDateFormat(" yyyy.MM.dd");
out.print("<h4 align=\"center\">" + ft.format(dNow) + "</h4>");
%>
</td>
</tr>
<tr>
<td>
<h6 >
Enter ISBN or Scan the Barcode <i style="color: #545454" class=" icon-barcode"></i>
</h6>
<input id="isbn" type="text" placeholder="ISBN "/>
</td>
</tr>
</table>
<table border="1">
<tr>
<td>
<ul class=" tabs left " >
<li><a href="#tabr1" >Stores</a></li>
<li><a href="#tabr2">Publishing Department</a></li>
<li><a href="#tabr3">Printing Department</a></li>
<li><a href="#tabr4">Director</a></li>
</ul>
<!-- End Tabs -->
<!-- Stores -->
<form action="####" method="Post">
<div id="tabr1" class="tab-content">
<!-- HALF & HALF -->
<div class=" col_6">
<label for="text1" style=" font-size: 16px;">Title </label><br/>
<input id="text1" type="text" placeholder="Title" style="width: 355px; height: 28px;" /><br/><br/>
<label for="text2" style=" font-size: 16px;">Author </label><br/>
<input id="text2" type="text" placeholder="Author" style="width: 355px; height: 28px;" /><br/><br/>
<label for="text3" style=" font-size: 16px;">Price </label></span> <br/>
<input id="text3" type="text" placeholder="price" style="width: 95px; height: 28px;" /><br/><br/><br/>
<!-- Radio -->
<label style=" font-size: 16px;">Move</label><br/><br/>
<input type="radio" name="radio" id="radio1" />
<label for="radio1" class="inline">Fast</label><br/>
<input type="radio" name="radio" id="radio2" />
<label for="radio2" class="inline">Medium</label><br/>
<input type="radio" name="radio" id="radio3" />
<label for="radio3" class="inline">Slow</label><br/>
<!-- Radio -->
</div>
<div class="col_6">
<label for="text4" style=" font-size: 16px;">Stock in hand </label> <br/>
<input id="text4" type="text" placeholder="" style="width: 100px; height: 28px;" /><br/><br/>
<label style=" font-size: 16px;">Last GRN Date</label><br/>
<input type="date" ><br/><br/>
<label for="text5" style=" font-size: 16px;">Last GRN Quantity </label></span> <br/>
<input id="text5" type="text" placeholder="Qty" style="width: 100px; height: 28px;" /><br/><br/><br/>
<input type="submit" value="Save" class="btn_hover"/>
<input type="submit" value="Reset" class="btn_hover" />
</div>
</div>
</form>
<!-- Stores -->
<!-- Publishing Department -->
<form action="####" method="Post">
<div id="tabr2" class="tab-content">
<div class="col_4">
<!-- Check box -->
<input type="checkbox" id="check1" />
<label for="check1" class="inline" style="font-size: 16px; font-weight: bold;" >Informed the Author </label><br/><br/><br/>
<!-- Check box -->
<!-- Table sortable -->
<label style="font-size: 18px; font-weight: bold;"> Last Print </label> <br/><br/>
<table class="sortable" border='1'>
<thead><tr>
<th>Print</th>
<th>Date</th>
<th>Quantity</th>
</tr></thead>
<tbody>
<tr>
<td>Item1</td>
<td>Item2</td>
<td>Item3</td>
</tr>
<tr>
<td>Item1</td>
<td>Item2</td>
<td>Item3</td>
</tr>
</table>
<!-- Table sortable -->
<br/><br/>
<label for="text6" style=" font-size: 16px;">Printer </label><br/>
<input id="text6" type="text" placeholder="Type Printer Name" style="width: 355px; height: 28px;" /><br/><br/>
<!-- Select -->
<label for="select1">Paper Type</label> <br/>
<select id="select1">
<option value="0">- Choose a Paper Type -</option>
<option value="1">Bank Paper</option>
<option value="2">Book Printing Paper </option>
<option value="3">Art Paper</option>
<option value="4">Bulk</option>
</select>
<!-- Select -->
<br/><br/>
<label for="text7" style=" font-size: 16px;">Delivery for Printing </label><br/>
<input id="text7" type="text" placeholder="Type here" style="width: 355px; height: 28px;" /><br/><br/>
<label for="text8" style=" font-size: 16px;">Quantity Suggested</label><br/>
<input id="text8" type="text" placeholder="Type here" style="width: 355px; height: 28px;" /><br/><br/>
</div>
<div class="col_6" style="padding-left: 100px;">
<label style=" font-size: 16px;">Date</label><br/>
<input type="text" id="date1" readonly="true " ><br/><br/>
<label for="text9" style=" font-size: 16px;">Altered Page Numbers </label></span> <br/>
<input id="text9" type="text" placeholder="Eg-: 4 , 5 , 6 , 34" style="width: 355px; height: 28px;" /><br/><br/><br/>
<!-- Check box -->
<input type="checkbox" id="check2" />
<label for="check2" class="inline" style="font-size: 16px; font-weight: bold;">Sample Copies </label><br/><br/><br/>
<!-- Check box -->
<label for="text10" style=" font-size: 16px;">Altered Tracing (No.s) </label> <br/>
<input id="text10" type="text" placeholder="" style="width: 355px; height: 28px;" /><br/><br/>
<label style=" font-size: 16px;">Book Cover</label><br/><br/>
<input type="radio" name="radio" id="radio4" />
<label for="radio4" class="inline">Same Cover</label><br/><br/>
<input type="radio" name="radio" id="radio5" />
<label for="radio5" class="inline">New Cover</label><br/><br/><br/>
<input type="submit" value="Save" class="btn_hover"/>
<input type="submit" value="Reset" class="btn_hover" />
</div>
</div>
</form>
<!-- Publishing Department -->
<form action="####" method="Post">
<!-- Printing Department -->
<div id="tabr3" class="tab-content">
<div class="col_4">
<!-- Select2 -->
<label for="select2">Size</label> <br/>
<select id="select2">
<option value="0">- Choose a Size -</option>
<option value="1">SD 1/8</option>
<option value="2">D 1/8</option>
<option value="3">D 1/4</option>
<option value="4">Cr 1/8</option>
<option value="5">Cr 1/4</option>
<option value="6">A4</option>
<option value="7">A5</option>
<option value="8">B4</option>
</select><br/><br/><br/>
<!-- Select2 -->
<label style="font-size: 18px; font-weight: bold;">No. of Pages</label><br/><br/>
<label>Black & White -</label>
<input type="text" id="text11"style="width: 100px; height: 28px;" ><br/><br/>
<label style="padding-right: 45px">Colour -</label>
<input type="text" id="text12 "style="width: 100px; height: 28px;" ><br/><br/><br/>
<label style="font-size: 18px; font-weight: bold;"> Last Production Cost</label><br/><br/>
<!-- Table sortable2 -->
<table class="sortable" border='1'>
<thead><tr>
<th>Year</th>
<th>Qty</th>
<th>Cost</th>
<th>Unit Cost</th>
</tr></thead>
<tbody>
<tr>
<td>Item1</td>
<td>Item2</td>
<td>Item3</td>
<td>Item4</td>
</tr>
</table><br/><br/>
<!-- Table sortable2 -->
<label style="font-size: 18px; font-weight: bold;"> Estimated Printing Cost</label><br/><br/>
<label for="text13" style=" font-size: 16px;">Quantity</label> <br/>
<input id="text13" type="text" placeholder="" style="width: 155px; height: 28px;" /><br/><br/>
<label for="text14" style=" font-size: 16px;">Cost</label> <br/>
<input id="text14" type="text" placeholder="" style="width: 155px; height: 28px;" /><br/><br/>
<label for="text15" style=" font-size: 16px;">Unit Cost</label> <br/>
<input id="text15" type="text" placeholder="" style="width: 155px; height: 28px;" readonly="true" /><br/><br/>
</div>
<div class="col_3">
<!-- Select3 -->
<label for="select2">Paper</label> <br/>
<select id="select3">
<option value="0">- Choose a Paper -</option>
<option value="1">60 gsm</option>
<option value="2">70 gsm</option>
<option value="3">80 gsm</option>
<option value="4">100 gsm</option>
<option value="5">120 gsm</option>
<option value="6">150 gsm</option>
</select><br/><br/>
<!-- Select3 -->
<!-- Select4 -->
<label for="select4">Binding</label> <br/>
<select id="select4">
<option value="0">- Choose a Binding Methode -</option>
<option value="1">Hard Binding</option>
<option value="2">Perfect Binding</option>
<option value="3">Suddle Binding</option>
<option value="4">Thread Binding/Perfect Binding</option>
</select><br/><br/>
<!-- Select4 -->
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<input type="submit" value="Save" class="btn_hover"/>
<input type="submit" value="Reset" class="btn_hover" />
</div>
<div class="col_3">
<label style=" font-size: 16px;">Date</label><br/>
<input type="text" id="date" readonly="true" ><br/><br/>
</div>
</div>
<!-- Printing Department -->
</form>
<form action="####" method="Post">
<div id="tabr4" class="tab-content">
<div class="col_6">
<label for="text16" style=" font-size: 16px;">Present Price </label><br/>
<input id="text16" type="text" placeholder="current Price" style="width: 355px; height: 28px;" /><br/><br/>
<label for="text17" style=" font-size: 16px;">Revise Price </label><br/>
<input id="text17" type="text" placeholder="new Price" style="width: 355px; height: 28px;" /><br/><br/>
<label for="text18" style=" font-size: 16px;">Quantity </label></span> <br/>
<input id="text18" type="text" placeholder="Qty" style="width: 355px; height: 28px;" /><br/><br/><br/>
<input type="submit" value="Approve" class="btn_hover"/>
<input type="submit" value="Cancel" class="btn_hover" />
<input type="submit" value="Reset" class="btn_hover" />
</div>
<div class="col_4">
<!-- Textarea -->
<label for="textarea1" style="font-size: 18px; font-weight: bold;"> Remark</label><br/>
<textarea id="textarea1" placeholder="Type Here" style="width: 650px; height: 200px;" ></textarea>
</div>
</div>
</form>
</td>
</tr>
</table>
<!-- Tabs -->
</body>
'
jspを使用してJavaで小さなwebappを作成しましたが、ログイン認証に少し問題があります..
私には4人の異なるユーザーがいます。jspページに4つのタブがあります
タブへの制限付きアクセスを彼らに与える必要があります。
eg-director (すべてのタブを表示可能) 役員 1 (3 つのタブへのアクセスのみを表示可能) 役員 2 (2 つのタブへのアクセスのみを表示可能) 役員 3 (1 つのタブへのアクセスのみを表示可能)
それはセキュリティクリアランスのようなもので、私は非常に多くの方法を試みましたが失敗しました。ブール値をデータベースに渡してアクセスレベルを与えることでそれを行うことを考えています。プロジェクトの小さなサンプルログインである場合は助けが必要です私のために非常に助けてください