?> "><?php echo $lang["first name"]; ?> </a></td> <td><a href="<?php echo mergeGetUrlData($_GET, "seller-browse.php?sort=sales"); ?> "><?php echo $lang["Sales"]; ?> </a></td> </tr> <?php $modulo = 0; while ($answer = db_fetch_assoc_array($result)) { $modulo = $modulo == 0 ? 1 : 0; ?> <tr class="bookbrowse-data-<?php echo $modulo; ?> "> <td><?php echo db_decode($answer["sellerKey"]); ?> </td> <td><a href="<?php echo mergeGetUrlData($_GET, "seller-info.php?key=" . db_decode($answer["sellerKey"]) . "&sort="); ?> "><?php echo db_decode($answer["lastName"]);
// Set language include_once "lang.inc.php"; // Checks if a seller is passed in parameter if (!isset($_GET["key"])) { header("Location: " . mergeGetUrlData($_GET, "error-no-seller.php")); exit; } // Connects to the database $db = db_connect(); if (is_null($db)) { die($lang["Error connecting to the database."] . $lang["MySQL says:"] . " " . db_error($db)); } // Gets seller info if it exists in the database $result = db_query($db, "SELECT * FROM " . $config["ddDBPrefix"] . "sellers WHERE sellerKey = '" . $_GET["key"] . "' LIMIT 1;"); if (!is_null($result) && db_num_rows($result) != 0) { $answer = db_fetch_assoc_array($result); } else { $answer = array(); $answer["sellerKey"] = db_encode($_GET["key"]); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include "stylesheet.inc.php"; ?> <title> <?php echo $lang["Edit a seller"];
<table class="noborder"> <tr> <td class="rightalign"><?php echo $lang["Book ID:"]; ?> </td><td><?php echo db_decode($answer["bookID"]); ?> </td> </tr> <?php // Gets seller info $result2 = db_query($db, "SELECT * FROM " . $config["ddDBPrefix"] . "sellers WHERE sellerKey = '" . $answer["sellerKey"] . "' LIMIT 1;"); // Do not db_decode this $answer2 = db_fetch_assoc_array($result2); ?> <tr> <td class="rightalign"><?php echo $lang["Seller ID:"]; ?> </td><td><a href="<?php echo mergeGetUrlData($_GET, "seller-info.php?key=" . db_decode($answer["sellerKey"]) . "&bookid="); ?> "><?php echo db_decode($answer["sellerKey"]); ?> </a> (<?php if (db_num_rows($result2) == 0) { echo $lang["Seller not in database"];