예제 #1
0
$nUser = searchByUserid($dbusercat, $matUser, $matAddr, $matComp, "", $userid, 1);
log_msg("number of users: " . $nUser . "Number of addresses:" . count($matAddr) . " AddrId = " . $matAddr[$address]->addressId . " Address: " . $address);
$CNPJ_CPF = $matUser[0]->CNPJ_CPF;
$compCNPJ = $matUser[0]->compCNPJ;
// $nAddr = searchAddressesByUserid($dbusercat, $matAddr, $userid);
$nAddr = searchAddrByCNPJ_CPF($dbusercat, $matAddr, $CNPJ_CPF, $compCNPJ);
if ($total > 0 and ($_SESSION['userType'] != 1 or $_SESSION['userType'] != 3)) {
    // Priced products and user not the System Manager
    // or Internal User.
    if ($nAddr == 0) {
        die("<br> <h3>{$strNoCPFCNPJ}<h3> <br>");
    }
}
// Instanciating Cart Group
$objCartG = new CartGroup($dbcat);
$objCartG->fill($sesskey, $userid);
// Verify Action
//if($action != $strCloseReq)
if ($action == $strContinue or $action == $strAdd) {
    ?>
<form name="cartAddressForm" method="POST" action="cartAddress.php">

<?php 
    // Showing Addresses
    if ($nAddr) {
        if ($mediaCD or $action == $strAdd) {
            ?>
         <br><h1><?php 
            echo $strDeliveryAddr;
            ?>
</h1><hr>