Colocar Resposta 
 
Avaliação do Tópico:
  • 0 votos - 0 Média
  • 1
  • 2
  • 3
  • 4
  • 5
Duvidas de programação
09-11-2015, 11:51 (Esta mensagem foi modificada pela última vez a: 09-11-2015 11:52 por foreing.)
Mensagem: #1
Duvidas de programação
[font='Helvetica Neue', Helvetica, Arial, sans-serif]Boas [/font]

[font='Helvetica Neue', Helvetica, Arial, sans-serif]Eu estou a criar uma aplicação pessoal para usar na empresa.[/font]
[font='Helvetica Neue', Helvetica, Arial, sans-serif]Actualmente os meus problemas são:[/font]
[font='Helvetica Neue', Helvetica, Arial, sans-serif]- Quando imprimo o formulário ele encolhe.[/font]
[font='Helvetica Neue', Helvetica, Arial, sans-serif]- O tamanho dos campos na pagina impressa ocupa a linha todas queria colocar um tamanho mais pequeno[/font]
[font='Helvetica Neue', Helvetica, Arial, sans-serif]- Pretendia que depois de efectuados os cálculos, que fosse possível seleccionar uma opção e o programa passa-se a estar a espera de uma medida.[/font]


[font='Helvetica Neue', Helvetica, Arial, sans-serif]Provavelmente é possível fazer o mesmo noutra linguagem, mas como estas é as que estou mais familiarizado, pretendia fazer nestas e depois quando tiver um pouco mais de disponibilidade melhorar o programa.[/font]

Código:
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title></title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="all">
<!-- Custom styles for this template -->
<link href="jumbotron.css" rel="stylesheet">

<!-- CSS para impressão -->
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="../../assets/js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.right {
position: absolute;
right: 50px;
width: 350px;
padding: 30px;
}
.right2 {
padding-left: 500px;
}

.left {
padding-left: 125px;
margin: 0px;
}
.row {
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: center;

}
.line {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
}

</style>
</head>
<body >
<!-- Declaração de variaveis-->
<?php
$fabric = 0;
$spare = 0;
$xres = 0;
$yres = 0;
$mspeed = 0;
$lents = 0;
$sensor = 0;
$ncam = 0;
$dist = 0;
$fov = 0;
$ov = 0;
$alt = 0;
$alt1 = 0;
$alt2 = 0;
$ov1 = 0;
$fov1 = 0;
$pixeis = 0;
$pixeis1 = 0;
$pixeis2 = 0;
$ncam3 = 0;
$dist1 = 0;
$fov3 = 0;
$ov3 = 0;
$ncam4 = 0;
$dist2 = 0;
$fov4 = 0;
$ov4 = 0;
$line = 0;

/* Declaração do tamanho do pixel */

$px1=10;
$px2=5;
$px3=3.75;

?>
<img alt="d" class="right" src="img/fundo.png" />
<br><br><br><br><br><br><br><br>

<div class="line">
<header class="header no-print">
<div class="row">
<form class="form-horizontal" method="POST">
<fieldset>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="Fabric">Fabric Wide</label>
<div class="col-md-6">
<input id="Fabric" name="Fabric" type="text" placeholder="mm" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="Spare">Spare width</label>
<div class="col-md-6">
<input id="Spare" name="Spare" type="text" placeholder="mm" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="Xres">Resolution X</label>
<div class="col-md-6">
<input id="Xres" name="Xres" type="text" placeholder="mm/pixel" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="Yres">Resolution Y</label>
<div class="col-md-6">
<input id="Yres" name="Yres" type="text" placeholder="mm/pixel" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="mSpeed">Fabric Max speed</label>
<div class="col-md-6">
<input id="mSpeed" name="Mspeed" type="text" placeholder="m/min" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-5 control-label" for="Fabric">Lenses</label>
<div class="col-md-6">
<input id="lent" name="Lents" type="text" placeholder="mm" class="form-control input-md">
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-5 control-label" for="selectbasic">Select Line</label>
<div class="col-md-6">
<select id="selectline" name="Line" class="form-control">
<option value="1">Line 1</option>
<option value="2">Line 2</option>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-5 control-label" for="selectbasic">Select System</label>
<div class="col-md-6">
<select id="selectbasic" name="Sensor" class="form-control">
<option value="4080">SVC 2 - 4K</option>
<option value="8160">SVC 2 - 8K</option>
</select>
</div>
</div>
<!-- Button (Double) -->
<div class="form-group">
<label class="col-md-4 control-label" for="Bt1"></label>
<div class="col-md-8">
<button id="Bt1" name="Bt1" class="btn btn-primary">Calculate</button>
<button id="Bt3" name="Bt3" class="btn btn-inverse">Reset</button>
</div>
</div>
</fieldset>
</form>
<div class="left">
<a href="index.php"><button id="Bt2" name="Bt2" class="btn btn-primary">Back</button></a>

</div>
</div>
</header>
<div class="frame">
<?php
if ($_SERVER['REQUEST_METHOD']== "POST")
{}
<header class="header no-print">
<img class="right2" src="img/icn-imprimir.png" onclick="javascript:window.print();">
</header>
<header class="header print">
<!-- Tabela Linha 1 -->
<table class="table table-bordered">
<caption> Imput </caption>
<thead>
<tr>
<th class="text-center">Fabric Wide</th>
<th class="text-center">Spare width</th>
<th class="text-center">Resolution X</th>
<th class="text-center">Resolution Y</th>
<th class="text-center">Max speed</th>
<th class="text-center">Lenses</th>
<th class="text-center">System type</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><?php echo"$fabric" ?></td>
<td class="text-center"><?php echo"$spare mm" ?></td>
<td class="text-center"><?php echo"$xres mm/px" ?></td>
<td class="text-center"><?php echo"$yres mm/px" ?></td>
<td class="text-center"><?php echo"$mspeed m/min" ?></td>
<td class="text-center"><?php echo"$lents mm" ?></td>
<td class="text-center"><?php echo"$sensor" ?></td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<caption> Calculation </caption>
<thead>
<tr>
<th class="text-center">Cam number</th>
<th class="text-center">Space between cam</th>
<th class="text-center">FOV</th>
<th class="text-center">Overlap</th>
<th class="text-center">Height</th>
<th class="text-center">Pixels</th>
<th class="text-center">Selected</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><?php echo"$ncam" ?></td>
<td class="text-center"><?php echo"$dist mm" ?></td>
<td class="text-center"><?php echo"$fov mm" ?></td>
<td class="text-center"><?php echo"$ov mm" ?></td>
<td class="text-center"><?php echo"$alt mm" ?></td>
<td class="text-center"><?php echo"$sensor" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam" ?></td>
<td class="text-center"><?php echo"$dist mm" ?></td>
<td class="text-center"><?php echo"$fov1 mm" ?></td>
<td class="text-center"><?php echo"$ov1 mm" ?></td>
<td class="text-center"><?php echo"$alt mm" ?></td>
<td class="text-center"><?php echo"$pixeis" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam3" ?></td>
<td class="text-center"><?php echo"$dist1 mm" ?></td>
<td class="text-center"><?php echo"$fov3 mm" ?></td>
<td class="text-center"><?php echo"$ov3 mm" ?></td>
<td class="text-center"><?php echo"$alt1 mm" ?></td>
<td class="text-center"><?php echo"$pixeis1" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam4" ?></td>
<td class="text-center"><?php echo"$dist2 mm" ?></td>
<td class="text-center"><?php echo"$fov4 mm" ?></td>
<td class="text-center"><?php echo"$ov4 mm" ?></td>
<td class="text-center"><?php echo"$alt1 mm" ?></td>
<td class="text-center"><?php echo"$pixeis2" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
</tbody>
</table>
<!-- Tabela Linha 2 -->
<table class="table table-bordered">
<caption> Calculation </caption>
<thead>
<tr>
<th class="text-center">Cam number</th>
<th class="text-center">Space between cam</th>
<th class="text-center">FOV</th>
<th class="text-center">Overlap</th>
<th class="text-center">Height</th>
<th class="text-center">Pixels</th>
<th class="text-center">Selected</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><?php echo"$ncam" ?></td>
<td class="text-center"><?php echo"$dist mm" ?></td>
<td class="text-center"><?php echo"$fov mm" ?></td>
<td class="text-center"><?php echo"$ov mm" ?></td>
<td class="text-center"><?php echo"$alt mm" ?></td>
<td class="text-center"><?php echo"$sensor" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam" ?></td>
<td class="text-center"><?php echo"$dist mm" ?></td>
<td class="text-center"><?php echo"$fov1 mm" ?></td>
<td class="text-center"><?php echo"$ov1 mm" ?></td>
<td class="text-center"><?php echo"$alt mm" ?></td>
<td class="text-center"><?php echo"$pixeis" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam3" ?></td>
<td class="text-center"><?php echo"$dist1 mm" ?></td>
<td class="text-center"><?php echo"$fov3 mm" ?></td>
<td class="text-center"><?php echo"$ov3 mm" ?></td>
<td class="text-center"><?php echo"$alt1 mm" ?></td>
<td class="text-center"><?php echo"$pixeis1" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam4" ?></td>
<td class="text-center"><?php echo"$dist2 mm" ?></td>
<td class="text-center"><?php echo"$fov4 mm" ?></td>
<td class="text-center"><?php echo"$ov4 mm" ?></td>
<td class="text-center"><?php echo"$alt1 mm" ?></td>
<td class="text-center"><?php echo"$pixeis2" ?></td>
<td class="text-center"><input type="radio" ></td>
</tr>
</tbody>
</table>
</header>
</div>
</div>



<br><br><br><br><br><br>
<hr>
<footer>
<p>&copy; Company -(2015)</p>
</footer>
</div> <!-- /container -->

<!-- Bootstrap core Javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>


[font='Helvetica Neue', Helvetica, Arial, sans-serif]Print.css[/font]

Código:
@page {
margin: 0.5cm;
}

nav, footer, video, audio, object, embed {
display:none;
}

.print {
display:block;
}

.no-print {
display:none;
}

img {
max-width: 100%;
}

.wrap {

margin: 0;
float: none !important;
}

#size{
    
    width: 150px;
    margin-left: 200px;
}
Procurar todas as mensagens deste utilizador
Citar esta mensagem numa resposta
Colocar Resposta 


Saltar Fórum:


Utilizadores a ver este tópico: 1 Visitante(s)