?? userinfo.php
字號:
<?$i=0;$j=0;require("Cart.php");DBinfo();Brand();Root();mysql_connect("$DBHost","$DBUser","$DBPass");if ($UID != "") {$result=mysql( "$DBName", "SELECT * FROM Users WHERE User='$UID'");$num=mysql_num_rows($result);if ($num == "0") {$dt=date( "YmdHis");$UID= "$dt$REMOTE_ADDR";$date=date( "z");mysql( "$DBName", "INSERT INTO Users VALUES ('$UID','$date')");Header( "Location: $PHP_SELF?UID=$UID");}}if ($UID == "") {$dt=date( "YmdHis");$UID= "$dt$REMOTE_ADDR";$date=date( "z");mysql( "$DBName", "INSERT INTO Users VALUES ('$UID','$date')");Header( "Location: $PHP_SELF?UID=$UID");}commonHeader("$Company","May I have your information please?");blueFont("Arial","Your shopping cart contains the following items:<br><br>");echo "<table border='1' cellpadding='5' cellspacing='5'><tr>";echo "<th>";redFont("Arial","Product Code");echo "</th>";echo "<th>";redFont("Arial","Product Name");echo "</th>";echo "<th>";redFont("Arial","Quantity");echo "</th>";echo "<th>";redFont("Arial","Cost");echo "</th>";echo "<th>";redFont("Arial","Shipping");echo "</th>";echo "<th>";redFont("Arial","Total");echo "</th>";echo "<th colspan='2'>";redFont("Arial","Add/Remove Items");echo "</th></tr>";$result=mysql("$DBName","SELECT * FROM CartItems WHERE UserID='$UID'");while ($row = mysql_fetch_row($result)) {$CUI=$row[0];$CII=$row[1];$CIQ=$row[2];$CDa=$row[3];$CCI=$row[4]; $result2=mysql("$DBName","SELECT * FROM Items WHERE ItemID='$CII'"); while ($row2=mysql_fetch_row($result2)) { $IIS=$row2[0]; $IIN=$row2[1]; $IID=$row2[2]; $IIC=$row2[3]; $ICa=$row2[4]; $ISC=$row2[5]; $III=$row2[6];$To[$i]=(($CIQ * $IIC)+($CIQ * $ISC));echo "<tr><td>";blueFont("Arial","$IIS");echo "</td><td>";blueFont("Arial","$IIN");echo "</td><td>";blueFont("Arial","$CIQ");echo "</td><td>";$IIC=number_format($IIC,"2",".","thousands_sep");blueFont("Arial","$$IIC");echo "</td><td>";if ($ISC == "0.00") {$ES="1";blueFont("Arial\" size=\"-2","$NoShipping");} else {$ISC=number_format($ISC,"2",".","thousands_sep");blueFont("Arial","$$ISC");}echo "</td><td>";$Tot=number_format($To[$i],"2",".","thousands_sep");blueFont("Arial","<b>$$Tot</b>");echo "<td valign=\"center\"><center>";echo "<FORM ACTION=\"$Relative/addQuantity.php\" METHOD=\"POST\">";echo "<input type=\"hidden\" name=\"CartItemsID\" value=\"$CCI\">";echo "<input type=\"hidden\" name=\"ItemName\" value=\"$IIN\">";echo "<input type=\"hidden\" name=\"UID\" value=\"$UID\">";echo "<input type=\"SUBMIT\" NAME=\"SUBMIT\" value=\"Add\">";echo "</center></td>";echo "</form>";echo "<td><center>";echo "<FORM ACTION=\"$Relative/removeItem.php\" METHOD=\"POST\">";echo "<input type=\"hidden\" name=\"CartItemsID\" value=\"$CCI\">";echo "<input type=\"hidden\" name=\"UID\" value=\"$UID\">";echo "<input type=\"SUBMIT\" NAME=\"SUBMIT\" value=\"Remove\">";echo "</center></td></tr>";echo "</form>";$i++; }}while ($j < $i) {$total=$total+$To[$j];$j++;}echo "<tr><td></td><td></td><td></td>";echo "<td colspan='2'>";redFont("Arial","<center><b><i>Total Cost: </i></b></center>");echo "<td>";$total=number_format($total,"2",".","thousands_sep");if ($ES == "1") {blueFont("Arial","<b><center>$$total</b>");blueFont("Arial\" size=\"-2"," Plus Shipping</center>");} elseif ($ES != "1") {blueFont("Arial","<b><center> $$total </center></b>"); }echo "<td colspan=\"2\"><center>";echo "<FORM ACTION=\"$Relative/emptyCart.php\" METHOD=\"POST\">";echo "<input type=\"hidden\" NAME=\"UID\" value=\"$UID\">";echo "<input type=\"SUBMIT\" NAME=\"SUBMIT\" value=\"Empty This Cart\">";echo "</center></td></tr></table>";echo "</form>";echo "<p>";fontSize("+1","blue","Arial","<b>Please fill out the information below</b><p>");echo "<form action=\"$Relative/order.php\" method=\"post\"><table border=\"0\"><tr><td>";fontSize("-1","blue","Arial","Your name<br>");echo "<input type=\"text\" name=\"Name\" size=\"40\"><p>";fontSize("-1","blue","Arial","Your address<br>");echo "<input type=\"text\" name=\"BuyAddress1\" size=\"40\"><br>";echo "<input type=\"text\" name=\"BuyAddress2\" size=\"40\"><p>";fontSize("-1","blue","Arial","Your city state and zip code<br>");echo "<input type=\"text\" name=\"BuyCity\" size=\"25\">";echo " <input type=\"text\" name=\"BuyState\" size=\"2\" MAXLENGTH=\"2\">";echo " <input type=\"text\" name=\"BuyZip\" size=\"7\" maxlength=\"12\"><p>";fontSize("-1","blue","Arial","Your e-mail address<br>");echo "<input type=\"text\" name=\"BuyEmail\" size=\"40\"><p>";fontSize("-1","blue","Arial","Your daytime (work) phone number<br>");echo "<input type=\"text\" name=\"DayPhone\" size=\"40\"><p>";fontSize("-1","blue","Arial","Your evening (home) phone number<br>");echo "<input type=\"text\" name=\"EvePhone\" size=\"40\"><p>";blueFont( "Arial\" size=\"-1", "Payment method<br>");echo "<INPUT TYPE=\"radio\" NAME=\"PayMethod\" VALUE=\"Check\">";redFont( "Arial\" size=\"-1", "Check or Money Order<br>");echo "<INPUT TYPE=\"radio\" NAME=\"PayMethod\" VALUE=\"Credit\" CHECKED>";redFont( "Arial\" size=\"-1", "Credit Card<br>");echo "<INPUT TYPE=\"radio\" NAME=\"PayMethod\" VALUE=\"Other\">";redFont( "Arial\" size=\"-1", "Other, please call me");echo "<p>";fontSize("-1","blue","Arial", "Credit Card type<br>");echo "<input type=\"text\" name=\"CCType\" size=\"40\"><p>";fontSize("-1","blue","Arial", "Credit Card number<br>");echo "<input type=\"text\" name=\"CCNum\" size=\"40\"><p>";fontSize("-1","blue","Arial", "Credit Card expiration date<br>");echo "<input type=\"text\" name=\"CCExpire\" size=\"40\"><p>";echo "<input type=\"checkbox\" name=\"Contact\" value=\"1\" CHECKED>";fontSize("-1","blue","Arial", " Please contact me before filling this order<p>");$Date=date("Y:z:Y-m-d");$total=ereg_replace(",","",$total);echo "<input type=\"hidden\" name=\"OrderTotal\" value=\"$total\"><input type=\"hidden\" name=\"Date\" value=\"$Date\"><input type=\"hidden\" name=\"UserID\" value=\"$UID\"><input type=\"hidden\" name=\"BuyerID\" value=\"\"><input type=\"hidden\" name=\"OrderNumber\" value=\"\"><input type=\"submit\" value=\"Complete This Order\"></form>";echo "</td></tr></table>";commonFooter($Relative,$UID);?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -