if (count($_POST)>0) { if (!isset($_POST["Sugar"]) && $_POST["Sugar"] != "Spice") { exit(0); } } if (isset($_GET["pt"]) && $_GET["pt"]=="webadmin") { include("../startwebadmin.pinc"); } else { include("../startweb.pinc"); } $vars = array( fr("i", "bcTemplatesId", -1), fr("i", "bcCardsId", -1), fr("c", "SessionId", session_id()), fr("c", "currentDesign"), fr("c", "CompanyName"), fr("c", "YourName"), fr("c", "YourTitle"), fr("c", "pt"), fr("f", "sdpi", 109), fr("f", "pdpi", 300), fr("f", "sres", $sdpi/2.54), fr("f", "pres", $pdpi/2.54), fr("f", "zoom", 1), fr("f", "res", $sres*$zoom), fr("f", "cardWidth", 9), fr("f", "cardHeight", 5.5), fr("f", "ptToPx", (2.54/72)*$sres), "zoomLevels", "design", ); $zoomLevels = array(0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 3, 4); $design = $pt=="webadmin" ? 1 : 0; /////////////////////////////////////// /// Record user's information /// /////////////////////////////////////// /// Record if there's a currentDesign if ($currentDesign) { assert(!$design); $userUpds = stripGpcKeys('/^previewDetails_/', $_POST, array("CompanyName", "YourName", "Email", "EmailAddress", "PhoneNumber", "FaxNumber", "MobileNumber", "Address")); $email = isset($userUpds["Email"]) ? $userUpds["Email"] : (isset($userUpds["EmailAddress"]) ? $userUpds["EmailAddress"] : ""); $userUpds = array_merge($userUpds, array( "bcCardsId" => -1, "BrowserType" => $_SERVER["HTTP_USER_AGENT"], "SubmittedDate" => time(), "SessionId" => session_id(), "Referer" => $_SESSION["Referer"], "ExcludeFromBulkEmail" => true, "BusCard" => $currentDesign, "Email" => $email, )); unset($userUpds["EmailAddress"]); if (!isset($_SESSION["bcCardsId"])) { $bcCardsId = db_replace('bcCards', $userUpds, 'bcCardsId'); $_SESSION["bcCardsId"] = $bcCardsId; } else { $userUpds["bcCardsId"] = $_SESSION["bcCardsId"]; $bcCardsId = db_replace("bcCards", $userUpds, "bcCardsId"); } /// Email Message /// $msg = '
Someone is using the design tool.
'; $adminButtons = array( array("link" => 'http://www.apapublishing.com.au/34722admin/buscards/?s_keywords='.$bcCardsId, "text" => 'Preview Design & Details'), ); sendAdminEmail(array( "to" => $ADMINEMAILS["tppdesign"], "subject" => "User Log: Design in progress...", "message" => $msg, "onBehalfOf" => array($YourName, $email), "buttons" => $adminButtons, )); } $pg_title = "Design Your Business Card"; function pg_head() { global $design; if ($design) {?> } ?> global $footers; $footers[] = ''; } $template = sqlr("select * from bcTemplates where bcTemplatesId = ".$bcTemplatesId); $bc = sqlr("select bcCardsId, Email as EmailAddress, bcCards.* from bcCards where bcCardsId = ".$bcCardsId); $trackingNumber = $bc->gcv("bcCardsId"); function colorMenu($handler) { $red = array(array("33", "66", "ff"),array("00", "99", "cc")); $greenInts = array("00","33","66","99","cc","ff"); $blueInts = array("00","33","66","99","cc","ff"); $specialColor = array( "000000" => "Black", "ffffff" => "White", "ff0000" => "Red", "009900" => "Green", "0000ff" => "Blue", "ffcccc" => "Pink", "990099" => "Purple", "ff9900" => "Orange", "ffff00" => "Yellow", ); ?>| " title=" if (isset($specialColor[$col])) { echo $specialColor[$col]." - "; } echo $col; ?>" onclick=""> if (isset($specialColor[$col])) { echo $specialColor[$col][0]; } ?> | } $greenInts = array_reverse($greenInts); } $greenInts = array_reverse($greenInts); ?>
| " onclick=""> | } ?>