<?php
session_start();
if(isset($_GET['torno']) && $_GET['torno']=="ok"){
$_SESSION['torno']="ok";
}else{
$_SESSION['torno']="";
}
$_SESSION['barcodecard']="1234567890123";//questa poi da toglere
include ("connect.php");
$puntiattuali=10;
$_SESSION['cliente']="OasiPC";
$transazioni=34;
$_SESSION['user']="Deborah Di Stefano";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="grafica.css" rel="stylesheet" type="text/css">
<meta name="keywords" content="">
<style>
A:link { text-decoration : none ; color: black;}
A:visited {text-decoration : none ; color: black}
A:hover { text-decoration : none ; }
</style>
<style type="text/css">
<!--
img {border: 0; }
-->
</style>
<title>Maschera Vendite</title>
<style type="text/css">
#main {
width: 920px; /*la larghezza dell’elemento*/
height: 820px; /*l’altezza dell’elemento*/
position: absolute; /*posizione assoluta per potere riposizionare l’elemento*/
left: 50%; /*il bordo sinistra dell’elemento si troverà al 50% della larghezza disponibile*/
top: 50px; /*il bordo superiore dell’elemento si troverà al 50% dell’altezza disponibile*/
margin-left: -460px; /*la metà della larghezza dell’elemento è tolta come margine superiore per centrarlo*/
/*background-color: #f7b76b*/
background-color:#7E6141
}
div#headersx {
position:absolute;
width:270px; height:220px;
overflow:hidden;
}
div#headercenter {
position:absolute;
width:340px; height:220px;
overflow:hidden;
/*background-color: #939*/
}
div#headerdx {
position:absolute;
width:270px; height:220px;
overflow:hidden;
/*background-color:#CCF*/
}
div#vedirighe {
position:absolute;
width:920px; height:400px;
overflow:hidden;
}
div#logo {
position:absolute;
width:320px; height:115px;
overflow:hidden;
}
body {
font: 11px Rockwell;
}
</style>
<script type="text/javascript" language="Javascript">
function riparti(obj) {
obj.value="";
obj.focus();
}
</script>
</head>
<body bgcolor="b89952">
<form action="vedi_righe.php" target="elenco" method="post" name="inv_bc">
<div id="main" style="left:50%;" >
<div id="logo" style="top:10px; left:300px; width:320px; height:120px;" >
<img src="logo_gestionale.png" width="320" height="115" />
</div>
<div id="headersx" style="top:135px; left:10px; width:270px; height:220px;" >
<table width="270">
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="CERCA LA FIDELITY CARD" class="cercafidelity">
</td></tr>
<TR>
<TD> <b><font size="2">CARD N°:</font><font color="#FFFFFF" size="2"> <?php echo $_SESSION[barcodecard]; ?></font></b></TD></TR>
<TR><TD> <b><font size="2">CLIENTE:</font></b><b><font color="#FFFFFF" size="2"> <?php echo $_SESSION[cliente]; ?></font></b></TD></TR>
<?php
if(!isset($_SESSION['barcode'])){
echo'<tr><td> <b><font size="2">SALDO PUNTI: </font></b>';
echo'<b><font color="red"> 0 </font></b></td></tr>';
} else {
$query=mysql_query("SELECT * FROM fidelitypoint WHERE barcode='$_SESSION[barcode]' ");
//verifico che esista una una card con tale barcode
$esiste=mysql_num_rows($query);
//se $esiste == 0 non cè
if($esiste > 0){//esiste
//estraggo usn e pass
$rows=mysql_fetch_array($query);
}
$pt=0;
$totpt=0;
$querypunti=mysql_query("Select sum(punti) from fidelitypoint where barcode='$_SESSION[barcode]'");
$row=mysql_fetch_array($querypunti);
echo'<tr><td> <b><font size="2">SALDO PUNTI: </font></b>';
echo'<b><font color="red" size="2"> ' . $row[0] . '</font></b></td></tr>';
}
?>
<TR><TD> <b><font size="2">PUNTI ATTUALI:</font></b><b><font color="#FFFFFF" size="2"> <?php echo $puntiattuali; ?></font></b></TD></TR><tr><td height="3"></td></tr></table>
<table align="center">
<tr>
<td align="center"><input type="button" onClick="window.open('cerca_tessera.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="USA PUNTI" class="usapunti">
<input type="button" onClick="window.open('cerca_tessera.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="ANAGRAFICA CARD" class="anagraficacard">
</td></tr>
</table>
<table align="center">
<tr> <td height="2"></td></tr>
<tr>
<td></td>
<td align="center">
<input type="text" placeholder="Barcode" name="barcodeart_new" class="barcode" id="barcodeart" value="" onFocus="riparti(this)"></td><td>
<input type="submit" class="visto" name="visto" value=""></td>
</TR>
</TABLE>
</div>
<div id="headercenter" style="top: 135px; left: 292px; width: 340px; height: 220px;" >
<TABLE width="340">
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="LOGOUT" class="logout">
</td>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="TURNI" class="turni">
</td>
<td align="center""><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="APPUNTI" class="appunti">
</td>
</Tr>
</TABLE>
<table align="left">
<TR><TD><b><font size="2">OPERATORE</font></b> <img src="administrator.png" height="14" width="14"></TD><td><b><font color="#FFFFFF" size="2"> <?php echo $_SESSION[user]; ?></font></b></TD></TR>
<TR><TD><b><font size="2">DATA</font></b></TD><TD><b><font color="#FFFFFF" size="2"><?php echo (date("d/m/Y")); ?></font></b></TD></TR>
<tr><td><b><font size="2">ORA</font></b></td><td> <b><font color="#FFFFFF" size="2"> <?php echo (date("H:i"));?></font></b></td></tr>
<tr><td><b><font size="2">TRANSAZIONE N°</font></b></td><td><b> <font color="#FFFFFF" size="2"> <?php echo $transazioni; ?></font></b></td></tr>
</table>
<table align="center">
<tr>
<td></td></tr>
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="ACCONTO" class="acconto"></td>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="ACCREDITO" class="buonoreso">
</td>
<td align="center">
<input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="CREA FATTURA" class="creafattura"></td></tr>
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="RESO ARTICOLO" class="resoart"></td>
<td align="center"><input type="button"
onClick="window.open('cerca.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="CERCA ARTICOLO" class="cercaarticolo"></td>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="ASSISTENZA" class="assistenza">
</td></tr>
</table>
</div>
<div id="headerdx" style="top:135px; left:640px; width:270px; height:220px;" >
<table width="270">
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="AREA SUPERVISOR" class="areasuper">
</td></tr>
<tr>
<td align="center"><input type="button" onClick="window.open('cerca_cliente.htm', 'Cerca card', 'width=940, height=780, resizable, status, scrollbars=1, location');"
value="CLIENTI" class="rubricaclienti">
<input type="button" onClick="window.open('cerca_fornitore.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="FORNITORI" class="rubricaclienti"></td>
</Tr>
<tr>
<td align="center"><input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="BUONI REGALO" class="areasuper">
</td></tr>
<tr>
<td align="center">
<input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="BUONO € 5,00" class="buono">
<input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="BUONO € 10,00" class="buono">
</td>
</Tr>
<tr>
<td align="center">
<input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="BUON0 € 20,00" class="buono">
<input type="button" onClick="window.open('puntifidelity.htm', 'Cerca card', 'width=690, height=700, resizable, status, scrollbars=1, location');"
value="BUONO € 50,00" class="buono">
</td>
</Tr>
</TABLE>
</div>
<div id="vedirighe" style="top:365px; left:10px; width:920px; height:400px;" >
<TABLE>
<TR>
<td width="620">
<iframe name="elenco" frameborder="no" src="vedi_righe.php" width="920" scrolling="auto" height="400"></iframe>
</td>
</TR>
</TABLE>
<p align="center"><font color="#00FF00">BLOCCO DESCRIZIONE</font></p>
</div>
</div>
</form>
</body>
</html>