Пример #1
0
</table>




<?php 
if ($action == 'contact') {
    $msg = "Name: " . trim(stripslashes($name)) . "\n";
    if ($accountrow["accountid"]) {
        $msg .= "Account ID: " . $accountrow["accountid"] . "\n";
    }
    $msg .= "Email: " . trim($email) . "\n";
    $msg .= "Phone: " . trim($phone) . "\n";
    $msg .= "Company: " . trim($company) . "\n\n";
    $msg .= trim(stripslashes($comments));
    if (strlike($msg, "cc:")) {
        $error = "Your message could not be sent.  The string \"cc:\" is not allowed.  Please try again.";
        echo $error;
    } else {
        @mysql_query("INSERT INTO contacts (accountid,timestamp,name,email,phone,company,comments) VALUES (\"" . $accountrow["accountid"] . "\",\"" . mytime() . "\",\"{$name}\",\"{$email}\",\"{$phone}\",\"{$company}\",\"{$comments}\")");
        mail("*****@*****.**", "coloradowaterjet.com contact", $msg);
        echo "Thank you for submitting the contact form.  We will get in touch with you as soon as possible.";
        include 'footer.php';
        exit;
    }
}
?>


<p>Send us an email by using the form below or use our <a href='/quote/index.php'>Request A Quote Form</a>.</p>
Пример #2
0
function get_field_type($tablename, $fieldname)
{
    $sql = "SHOW COLUMNS FROM {$tablename} LIKE '{$fieldname}'";
    $result = mysql_query($sql);
    $type = false;
    // WE COULD TRY UNBUFFERED IF WE CAN DO THE IF STATEMENT ON $row[1]
    if (mysql_num_rows($result) > 0) {
        $row = mysql_fetch_row($result);
        $type = $row[1];
        if (strlike($row[1], "(")) {
            $type = substr($row[1], 0, strpos($row[1], "("));
        }
    }
    return $type;
}
Пример #3
0





<table width="882" height="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr valign="bottom"><td colspan="2" width="882" background="/images/bluestripes.gif"><img src="/images/title_main.gif"></td></tr>
<tr valign="top" height="100%"><td class="gradient_left" width="328">
	<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr valign="top"><td width="100%">
<img src="/images/logo_bottom.gif"><br>
<img src="/images/clear.gif" height="1" width="116">
<div class="mynav">

<?php 
if (strlike($_SERVER["PHP_SELF"], "admin")) {
    echo "Admin";
    echo "<ul>";
    echo "<li><a href='/admin/quotes.php' class=\"nav\">Quotes</a></li>";
    echo "<li><a href='/admin/photos.php' class=\"nav\">Photos</a></li>";
    echo "<li><a href='/admin/photos_categories.php' class=\"nav\">Photo Categories</a></li>";
    echo "</ul>";
    echo "<br><br><br><br>";
}
?>
<a href='/index.php' class="nav">Home</a>
<br><br>
<a href='/capabilities.php' class="nav">Capabilities</a>
<br><br>
<a href='/applications.php' class="nav">Ideal<br>Applications</a>
<br><br>
Пример #4
0
        echo "<td><select name=\"status_" . $row["quoteid"] . "\" onchange=\"document.quotes.quoteid.value='" . $row["quoteid"] . "';document.quotes.submit();\">";
        for ($j = 0; $j < count($vals); $j++) {
            if ($vals[$j] != 'incomplete') {
                echo "<option value=\"" . $vals[$j] . "\"";
                if ($vals[$j] == $row[$fieldnames[$i]]) {
                    echo " selected=\"selected\"";
                }
                echo ">" . $vals[$j] . "</option>";
            }
        }
        echo "</select></td>";
    } elseif ($fieldnames[$i] == "timestamp") {
        echo "<td>" . date("m-d-y H:i", $row[$fieldnames[$i]]) . "</td>";
    } elseif ($fieldnames[$i] == "quoteid") {
        echo "<td><a href='/admin/quote.php?quoteid=" . $row[$fieldnames[$i]] . "'>" . $row[$fieldnames[$i]] . "</td>";
    } elseif (strlike($fieldnames[$i], 'materials_supplied_by_')) {
        if ($row[$fieldnames[$i]]) {
            echo "<td>yes</td>";
        } else {
            echo "<td>no</td>";
        }
    } else {
        echo "<td>" . nl2br(formvalue($row[$fieldnames[$i]])) . "&nbsp;</td>";
    }
    echo "</tr>";
}
// DESIGN FILES
$sql = "SELECT * FROM design_files WHERE quoteid='" . $row["quoteid"] . "'";
$temp = mysql_unbuffered_query($sql);
$files = "";
while ($t = mysql_fetch_array($temp)) {