$rut2 = $_POST['rutp2'];
 $rut = $rut1 . '-' . $rut2;
 $nombreP = $_POST['NombreP'];
 $direccionP = $_POST['direccionP'];
 $cuidadP = $_POST['ciudadP'];
 $ciu = new ciudad();
 $arrc = $ciu->Select2($cuidadP);
 $rowciudad = mysql_fetch_array($arrc);
 $telefonoP = $_POST['telefonoP'];
 $ContactoP = $_POST['contactoP'];
 $idciudad = $rowciudad['ID_CIUDAD'];
 $prov = new proveedor();
 $row = $prov->Select($rut);
 $action = mysql_fetch_array($row);
 if ($action == null) {
     $prov->Add($rut, $idciudad, $nombreP, $direccionP, $ContactoP, $telefonoP);
 }
 include 'IngresarOCBD.php';
 $arr = $_SESSION["list"];
 $size = $_SESSION["size"];
 $fecha = time();
 $fechaactual = date("Y-m-d h:m:s", $fecha);
 $cont = new contiene();
 for ($i = 0; $i < $size; $i++) {
     $n = "c" . $i;
     $cont->Add($_POST["{$n}"], $_POST['NumOC'], "0", $rut, "0", 0, $arr[$i][1], 0, 0, $arr[$i][2], $fechaactual);
 }
 header("Location: paso.php?c=1");
 //header ("Location: IngresarOCBD.php");
 /*if($r==null){
 	$fecha= time();