"; $headerEmailsPedidos = "

"; $firmaEmails = "Reciba un cordial Saludo
Ten Color Company.
"; $fromEmails = "Ten Color Company"; $connection = mysql_connect("$host","$dbuser","$dbpass"); $db = mysql_select_db("$dbname",$connection); ?> "; if($permisos[$i]["idUsuario_mod"] == $idUsuario_mod){ $entrada = true; } } return $entrada; } function generaLog($idUsuario,$accion){ $accion = addslashes($accion); $sql = "INSERT INTO logs (idUsuario,accion,fecha) VALUES ($idUsuario,'$accion',NOW())"; $result = execQuery($sql); } function getCategorias($idTipo){ $sql = "SELECT DISTINCT(idCategoria) FROM promociones WHERE idTipo=$idTipo"; $result = execQuery($sql); $lista = array(); $i = 0; while($row = getRow($result)){ $sql2 = "SELECT * FROM categorias WHERE idCategoria=".$row["idCategoria"]; $result2 = execQuery($sql2); if($row2 = getRow($result2)){ $lista[$i]["idCategoria"] = $row2["idCategoria"]; $lista[$i]["nombre"] = $row2["nombre"]; $i++; } } return $lista; } function getProvincias(){ $sql = "SELECT * FROM provincias"; $result = execQuery($sql); $lista = array(); $i = 0; while($row = getRow($result)){ $lista[$i] = $row; $i++; } return $lista; } function Sustituto_Cadena($rb){ ## Sustituyo caracteres en la cadena final $rb = str_replace("", "", $rb); $rb = str_replace("", "", $rb); $rb = str_replace("®", "®", $rb); $rb = str_replace("", "", $rb); $rb = str_replace("�", "", $rb); $rb = str_replace("", "", $rb); $rb = str_replace("", "", $rb); $rb = str_replace("n~", "ñ", $rb); $rb = str_replace("º", "º", $rb); $rb = str_replace("a", "ª", $rb); $rb = str_replace("f¡", "", $rb); $rb = str_replace("n", "ñ", $rb); $rb = str_replace("'", "Ñ", $rb); $rb = str_replace("f±", "ñ", $rb); $rb = str_replace("n~", "ñ", $rb); $rb = str_replace("s", "Ú", $rb); return $rb; } ?>