All pastes #459694 Raw Edit

Stuff

public text v1 · immutable
#459694 ·published 2007-04-26 16:54 UTC
rendered paste body
<?php 
include "seguridad/seguridad.php";
include "seguridad/acceso.php";
comprobar('lamparas');
include "includes/funciones.php"; 
include "includes/query.php";
$rutentra = $_SESSION['rut'];
?>
<?php
// Include MySQL class
require_once('inc/mysql.class.php');
// Include database connection
require_once('inc/global.inc.php');
// Include functions
require_once('inc/functions.inc.php');
// Start the session
session_start();
// Process actions
$cart = $_SESSION['cart'];
$action = $_GET['action'];
switch ($action) {
	case 'add':
		if ($cart) {
			$cart .= ','.$_GET['id'];
		} else {
			$cart = $_GET['id'];
		}
		break;
	case 'delete':
		if ($cart) {
			$items = explode(',',$cart);
			$newcart = '';
			foreach ($items as $item) {
				if ($_GET['id'] != $item) {
					if ($newcart != '') {
						$newcart .= ','.$item;
					} else {
						$newcart = $item;
					}
				}
			}
			$cart = $newcart;
		}
		break;
	case 'update':
	if ($cart) {
		$newcart = '';
		foreach ($_POST as $key=>$value) {
			if (stristr($key,'qty')) {
				$id = str_replace('qty','',$key);
				$items = ($newcart != '') ? explode(',',$newcart) : explode(',',$cart);
				$newcart = '';
				foreach ($items as $item) {
					if ($id != $item) {
						if ($newcart != '') {
							$newcart .= ','.$item;
						} else {
							$newcart = $item;
						}
					}
				}
				for ($i=1;$i<=$value;$i++) {
					if ($newcart != '') {
						$newcart .= ','.$id;
					} else {
						$newcart = $id;
					}
				}
			}
		}
	}
	$cart = $newcart;
	break;
}
$_SESSION['cart'] = $cart;
?>
<HTML><HEAD><TITLE>Sierra Miranda S.C.M.</TITLE>
<script language="javascript" src="includes/cal2.js"></script>
<script language="javascript" src="includes/cal_conf2.js"></script>
<script src="includes/js.js"></script>
<link rel="stylesheet" href="css/styles.css" />
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
.style2 {color: #666666}
.style3 {color: #999999}
-->
</style>
<link href="estilos/estyleMenus.css" rel="stylesheet" type="text/css">
<link href="estilos/css1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
	background-image: url(img/fondoari.gif);
}
.style4 {font-size: 14px}
.style6 {font-size: 12px}
.style7 {color: #0651FF}
.style11 {font-size: 12px; font-weight: bold; }
.Estilo33 {font-size: 10px}
a:link {
	color: #0000CC;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #0000CC;
}
a:hover {
	text-decoration: none;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #0000CC;
}
.style111 {font-size: 8px}
.style12 {font-size: 11px}
.catalogo {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #333333;
}
.Estilo35 {color: #FF0000}
.Estilo36 {
	color: #F0F0F0;
	font-size: 9px;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD>
<BODY leftMargin=0 topMargin=10>
<SCRIPT language=JavaScript type=text/JavaScript>
 function Abrir_ayuda (pagina)
 {
  var
  opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=560,height=390,top=260,left=330";
  window.open(pagina,"",opciones);
 }
</SCRIPT>
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
  <TBODY>
  <TR>
    <TD width="100%"><LINK href="imagenes/redtic_mini.ico">
      <TABLE cellSpacing=0 cellPadding=0 width="100%" bgColor=#b90000 
        border=0>
        <TBODY>
          <TR>
            <TD height=27 bgcolor="#FFFFFF"><div align="center">
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="90">
                <param name="movie" value="arriba.swf">
                <param name="quality" value="high">
                <embed src="arriba.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="90"></embed>
              </object>
            </div></TD>
          </TR>
          <TR>
            <TD background=img/top2.gif height=16>
              <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                <TBODY>
                  <TR>
                    <TD width="52%" valign="top" class=menu1_blanco>&nbsp;&nbsp;Bienvenido : <? echo nombreusuario($rutentra);?></TD>
                    <TD class=menu1_blanco align=right width="48%"><table width="103%" border="0" align="right" cellpadding="0" cellspacing="0">
                        <tr class="dato">
                          <td width="206" align="right" class="Fecha"><font color="#FFFFFF" size="1">
                            <script>fechas();</script>
                          </font></td>
                          <td width="74" height="10" align="right" nowrap class=menu1_blanco id="relojito"><font color="#FFFFFF" size="2">&nbsp;</font>
                              <div align="right"><font color="#FFFFFF" size="2"> </font></div></td>
                        </tr>
                      </table>
       </TD>
                  </TR>
                </TBODY>
            </TABLE></TD>
          </TR>
          <TR>
            <th height=16 nowrap bgcolor="#FFFFFF" class="dato_grilla Estilo21"><div align="right"><span class="Estilo33"><a href="entrada.php">Entrada</a> ::::::  ::::::</span><a href="user.php"> <img src="img/boton/image003.png" alt="CAMBIAR MIS DATOS" width="24" height="23" border="0"></a> <img src="img/boton/image004.jpg" alt="AYUDA" width="26" height="24"> <a href="destroy.php"><img src="img/boton/image008.jpg" alt="SALIR DEL SISTEMA" width="26" height="26" border="0"></a></div></th>
          </TR>
          <TR>
            <th height=16 nowrap bgcolor="#FFFFFF">
              <div align="left"> 
                <table width="100%"  border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <th width="72%" scope="col"><div align="left">
                      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="435" height="89">
                        <param name="movie" value="menuarriba.swf">
                        <param name="quality" value="high">
                        <embed src="menuarriba.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="435" height="89"></embed>
                      </object>
                    </div></th>
                    <th width="28%" scope="col"><img src="img/boton/sierra.png" width="137" height="85"></th>
                  </tr>
                </table>         
                </div></th>
          </TR>
        </TBODY>
      </TABLE>      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">


<div class="Estilo33" id="booklist"></div></th>
            <th width="25%" valign="top" scope="col"><div id="shoppingcart">

<h1>Listado de Epp Agreados</h1>

<?php
echo writeShoppingCart();
?>

</div>
<div id="contents">

<h1>Listado Epp Agredados </h1>

<?php
echo showCart();

?>

<p align="left"><a href="catalogo.php" class="Estilo36">Volver al Catalogo</a></p>
<a href="salidaepp.php" class="r Estilo35">CONFIRMAR ENTREGA DE EPP</a></div>              
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></th>
          </tr>
          <tr>
            <th colspan="2" valign="top" bgcolor="#FFFFFF" scope="col">&nbsp;</th>
          </tr>
                </table></TD>
  </TR>
    
</TABLE>
<div align="center">
  <script>
JSClock();
</script>
</div>
</BODY></HTML>
<?php 
$rut2= $_SESSION["rut2"];
echo $rut2;
ob_end_flush();
?>