This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require("class.phpmailer.php"); | |
$mail = new PHPMailer(); | |
$mail->IsSMTP(); | |
$mail->SMTPAuth = true; | |
$mail->Host = ""; // SMTP a utilizar. Por ej. smtp.elserver.com | |
$mail->Username = ""; // Correo completo a utilizar | |
$mail->Password = ""; // Contraseña | |
$mail->Port = 25; // Puerto a utilizar | |
$mail->From = "info@elserver.com"; // Desde donde enviamos (Para mostrar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string ipequipo = Request.UserHostAddress; | |
string nombrequipo = System.Net.Dns.GetHostEntry(Request.UserHostAddress).HostName; | |
// pasar hora a ANSI | |
string fechaAnsi = DateTime.Now.ToString("yyyy/MM/dd"); | |
// Quitar barras y pasar fecha a numerico | |
string fechaeq = (Int32.Parse(fechaAnsi.Replace(@"/", ""))).ToString(); | |
// Salvar hora entorno | |
string horaf = DateTime.Now.ToString("H:mm") + ":00"; | |
// Eliminar : dejar fecha numerica | |
string horaeq = (Int32.Parse(horaf.Replace(@":", ""))).ToString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public DataTable ExceltoDatatable(DataTable nombreTabla, string nombreArchivo) | |
{ | |
string rutacompletafile = nombreArchivo; | |
if (File.Exists(rutacompletafile)) | |
{ | |
string myConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + nombreArchivo + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\""; | |
OleDbConnection conn = new OleDbConnection(myConnection); | |
string strSQL = "SELECT * FROM [Hoja1$]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |