Location: PHPKode > projects > T-77.com Operational Management System > omis/premail.php
<?php require_once('Connections/t77_connect.php'); ?>
<?php
$colname_doc = "0";
if (isset($_GET['id'])) {
  $colname_doc = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_t77_connect, $t77_connect);
$query_doc = sprintf("SELECT * FROM t77_bill_bills, t77_bill_types, t77_bill_contacts WHERE t77_bill_bills.bill_id = %s AND t77_bill_types.bill_type = t77_bill_bills.bill_type AND t77_bill_bills.bill_contact = t77_bill_contacts.contact_id", $colname_doc);
$doc = mysql_query($query_doc, $t77_connect) or die(mysql_error());
$row_doc = mysql_fetch_assoc($doc);
$totalRows_doc = mysql_num_rows($doc);

mysql_select_db($database_t77_connect, $t77_connect);
$query_settings = "SELECT * FROM t77_bill_settings";
$settings = mysql_query($query_settings, $t77_connect) or die(mysql_error());
$row_settings = mysql_fetch_assoc($settings);
$totalRows_settings = mysql_num_rows($settings);
?>
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!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">
<head>
<title><?php echo $row_doc['bill_name']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.radio {
	border: 0px none;
	background-color: #eeeeee;
}
-->
</style>
</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="31"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20"><img src="images/tabletopstart.gif" width="20" height="31" /></td>
          <td><table width="100%" height="30" border="0" cellpadding="5" cellspacing="0">
              <tr>
                <td><p><strong>Document mailen</strong></p>
                </td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="20">
          <tr>
            
          <td align="left" valign="top"><form action="mail.php?<? echo "ref=" . $_GET['ref'] . "&amp;quer=" . $_GET['quer']; ?>" method="post" name="premail" id="premail">
          <table width="100%" border="0" cellpadding="5" cellspacing="0" class="tableBorder">
            <tr>
              <td><h1 align="right">aan:</h1></td>
              <td><input name="t77to" type="text" id="t77to" value="<?php echo $row_doc['contact_email']; ?>" size="78" /></td>
            </tr>
            <tr bgcolor="#eeeeee">
              <td valign="top"><h1 align="right">onderwerp:</h1></td>
              <td><input name="subject" type="text" id="subject" value="<?php echo $row_doc['type_description']; ?> <?php echo $row_doc['bill_name']; ?>" size="78" /></td>
            </tr>
            <tr>
              <td valign="top"><h1 align="right">bericht:</h1></td>
              <td><textarea name="t77message" cols="80" rows="17">
			  

Met vriendelijke groet,
<?php echo $row_settings['contact_name'] . "\n"; ?>
<?php echo $row_settings['company_name'] . "\n"; ?>
<?php echo $row_settings['company_address'] . "\n"; ?>
<?php echo $row_settings['company_zip']; ?>, <?php echo $row_settings['company_city'] . "\n"; ?>
Tel: <?php echo $row_settings['company_tel']; ?></textarea>
  <input name="id" type="hidden" id="id" value="<?php echo $row_doc['bill_id']; ?>" /></td>
            </tr>
            <tr bgcolor="#eeeeee">
              <td><h1 align="right">bestandsformaat:</h1></td>
              <td><p><input name="format" type="radio" class="radio" value="pdf" checked="checked" />
              pdf
                      &nbsp;&nbsp;&nbsp;&nbsp;
					  <input name="format" type="radio" class="radio" value="html" />
				  html</p>			  </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit" value="Verstuur" /></td>
            </tr>
          </table>
          </form></td>
          </tr>
        </table>
    </td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($doc);

mysql_free_result($settings);
?>
Return current item: T-77.com Operational Management System