Skip to content

Instantly share code, notes, and snippets.

<html>
<title>Confirmation</title>
<head></head>
<body>
<?php
$pnumber = $_POST["pnumber"];
$vend = $_POST['vend'];
$prod = $_POST['product'];
$ppu = $_POST["ppu"];
$pib = $_POST["pib"];
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="LTenuta" />
<link href="ryform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function()
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="LTenuta" />
<link href="ryform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function()
{
for($i=0;$i<count($prod);++$i)
{
$query = "INSERT INTO purchase_items (quant,pib,price,id) VALUES ({$quant[$i]},{$pib[$i]},{$ppu[$i]},NULL)";
$query = "INSERT INTO purchases (orderno,,vendor,id) VALUES ('$pnumber','$vend',NULL)";
$result = mysql_query($query);
if (!$result) die ("Database access failed: " . mysql_error());
else {
echo "Created";
}
for($i=0;$i<count($prod);++$i)
{
$result=mysql_query('
INSERT INTO purchase_items (quant,pib,price,id) VALUES ({$quant[$i]},{$pib[$i]},{$ppu[$i]},NULL);');
//add each row to the database here
if (!$result) die ("Database access failed: " . mysql_error());
else {
echo "Created";
}
for($i=0;$i<count($prod);++$i)
{
$result=mysql_query('
INSERT INTO purchase_items (quant,pib,price,id) VALUES ({$quant[$i]},{$pib[$i]},{$ppu[$i]},NULL);');
//add each row to the database here
if (!$result) die ("Database access failed: " . mysql_error());
else {
echo "Created";
}
private string GetLocalIP ()
{
IPHostEntry host;
host = Dns.GetHostEntry ( Dns.GetHostName () );
foreach ( IPAddress ip in host.AddressList )
{
if ( ip.AddressFamily.Equals ( AddressFamily.InterNetwork ) ) return ip.ToString ();
}
return "127.0.0.1";
}
@compil3
compil3 / Form1.cs
Created August 2, 2013 06:05
method
private string GetLocalIP ()
{
IPHostEntry host;
host = Dns.GetHostEntry ( Dns.GetHostName () );
foreach ( IPAddress ip in host.AddressList )
{
if ( ip.AddressFamily.Equals ( AddressFamily.InterNetwork ) ) return ip.ToString ();
}
return "127.0.0.1";
}
public class Converter
{
public string sourceHtml { get; set; }
private static string filename = "[" + DateTime.Now.ToShortDateString() + " Habs Stats].xml";
public void StatsParser( string sourceHtml )
{
this.sourceHtml = sourceHtml;
this.ParseHtml();
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using HtmlAgilityPack;
using System.Xml;