discourse-legacysite-perl/site/retailers/include_edit_confirm.php
2024-06-17 22:42:14 +10:00

472 lines
23 KiB
PHP

<p>
Please confirm your shop information. If everything is correct, click the submit button. Otherwise, you may click the edit button to change your shop information before submitting.
</p>
<h2><? echo stripslashes($_POST[retailer_name]); ?></h2>
<? $nametagmod = trim(strtolower(str_replace(" ","",$_POST[retailer_name]))); ?>
<div class="dtable form">
<div class="drow">
<div class="dcell name">Store Name</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes($_POST[retailer_name]); ?></div>
</div>
<div class="drow">
<div class="dcell name">Address </div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_address])); ?></div>
</div>
<div class="drow">
<div class="dcell name">Address 2</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_address_two])); ?></div>
</div>
<div class="drow">
<div class="dcell name">City</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_city])); ?></div>
</div>
<div class="drow">
<div class="dcell name">State</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_state])); ?></div>
</div>
<div class="drow">
<div class="dcell name">Zip</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_zip])); ?></div>
</div>
<div class="drow">
<div class="dcell name">Phone</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_phone])); ?></div>
</div>
<div class="drow">
<div class="dcell name">Fax</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_fax])); ?></div>
</div>
<div class="drow">
<div class="dcell name">E-mail</div>
<div class="dcell divider"></div>
<div class="dcell value"><? echo stripslashes(htmlspecialchars($_POST[retailer_email])); ?></div>
</div>
<div class="drow">
<div class="dcell name">Website</div>
<div class="dcell divider"></div>
<div class="dcell value"><a href="<? echo $_POST[retailer_website]; ?>" target="_blank"><? echo $_POST[retailer_website]; ?></a></div>
</div>
<div class="drow">
<div class="dcell name">Cart</div>
<div class="dcell divider"></div>
<div class="dcell value"><? if ($_POST[retailer_cart] == 0) { echo ("No"); } else { echo ("Yes"); } ?></div>
</div>
<div class="drow">
<div class="dcell name">Spoke Alliance Member</div>
<div class="dcell divider"></div>
<div class="dcell value"><? if ($_POST[retailer_spoke] == 0) { echo ("No"); } else { echo ("Yes"); } ?></div>
</div>
<div class="drow">
<div class="dcell name"></div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
for ($i = 0; $i < 15; $i++) echo("*");
echo (" PRODUCT DELIVERY CHANNELS ");
for ($i = 0; $i < 15; $i++) echo("*");
?>
</div>
</div>
<div class="drow">
<div class="dcell name">We ship mail-order via</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_mailorder_ecommerce] == 0) { echo (""); } else { echo ("e-commerce site"); } ?>
<? if ($_POST[retailer_mailorder_phone] == 0) { echo (""); } elseif ($_POST[retailer_mailorder_ecommerce] == 1) { echo (", phone"); } else { echo ("phone"); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">We offer local home/work delivery, transacting via</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_local_ecommerce] == 0) { echo (""); } else { echo ("e-commerce site"); } ?>
<? if ($_POST[retailer_local_phone] == 0) { echo (""); } elseif ($_POST[retailer_local_ecommerce] == 1) { echo (", phone"); } else { echo ("phone"); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">You may order in advance, and pick up, transacting via</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_pickup_ecommerce] == 0) { echo (""); } else { echo ("e-commerce site"); } ?>
<? if ($_POST[retailer_pickup_phone] == 0) { echo (""); } elseif ($_POST[retailer_pickup_ecommerce] == 1) { echo (", phone"); } else { echo ("phone"); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name"></div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
for ($i = 0; $i < 25; $i++) echo("*");
echo (" BIKE FIT ");
for ($i = 0; $i < 25; $i++) echo("*");
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Key Tri-Specific Contact(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_contact] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_contact_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">F.I.S.T. Tri Fitter(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_fist] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_fist_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">F.I.S.T. Road Fitter(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_fist_road] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_fist_road_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">F.I.S.T. Advanced Fitter(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_fist_advanced] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_fist_advanced_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">BFACT Score</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes(htmlspecialchars($_POST[retailer_bfact])); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">BikeFit, BodyGeometry, Retul, Serotta, or Trek Fitter(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_serotta] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_serotta_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Default Tri-Fit Methodology</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if (isset($_POST[retailer_method])) {
$sql = ("SELECT * FROM ".$prefix."RetailersMethods WHERE retailer_method_id = ".$_POST[retailer_method]." LIMIT 1");
//echo $sql;
$fetch = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($fetch) > 0) {
while ($method_list = mysql_fetch_array($fetch)) {
echo ("$method_list[retailer_method_name]");
}
} else {
echo ("Unanswered");
}
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Fit Bikes</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($_POST[retailer_fitbikes]) {
$implosion = implode(",", $_POST[retailer_fitbikes]);
$sql = ("SELECT * FROM gforum_RetailersFitbikes WHERE retailers_fitbike_id IN ($implosion) ORDER BY retailers_fitbike_name ASC");
//echo $sql;
$fetch = mysql_query($sql) or die(mysql_error());
$fitbike_list = "";
while ($list = mysql_fetch_array($fetch)) {
$fitbike_list = $fitbike_list."$list[retailers_fitbike_name], ";
}
$fitbike_list = rtrim($fitbike_list, ', ');
echo $fitbike_list;
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Motion-Capture Systems</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($_POST[retailer_motioncapture]) {
$implosion = implode(",", $_POST[retailer_motioncapture]);
$sql = ("SELECT * FROM gforum_RetailersMotioncapture WHERE retailers_motioncapture_id IN ($implosion) ORDER BY retailers_motioncapture_name ASC");
//echo $sql;
$fetch = mysql_query($sql) or die(mysql_error());
$motioncapture_list = "";
while ($list = mysql_fetch_array($fetch)) {
$motioncapture_list = $motioncapture_list."$list[retailers_motioncapture_name], ";
}
$motioncapture_list = rtrim($motioncapture_list, ', ');
echo $motioncapture_list;
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name"></div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
for ($i = 0; $i < 25; $i++) echo("*");
echo (" BRANDS ");
for ($i = 0; $i < 25; $i++) echo("*");
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Wetsuits</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($_POST[retailer_wetsuits]) {
$implosion = implode(",", $_POST[retailer_wetsuits]);
$sql = ("SELECT * FROM gforum_RetailersWetsuits WHERE retailers_wetsuit_id IN ($implosion) ORDER BY retailers_wetsuit_name ASC");
//echo $sql;
$fetch = mysql_query($sql) or die(mysql_error());
$wetsuit_list = "";
while ($list = mysql_fetch_array($fetch)) {
$wetsuit_list = $wetsuit_list."$list[retailers_wetsuit_name], ";
}
$wetsuit_list = rtrim($wetsuit_list, ', ');
echo $wetsuit_list;
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Bikes</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($_POST[retailer_bikes]) {
$implosion = implode(",", $_POST[retailer_bikes]);
$sql = ("SELECT * FROM gforum_RetailersBikes WHERE retailers_bike_id IN ($implosion) ORDER BY retailers_bike_name ASC");
//echo $sql;
$fetch = mysql_query($sql) or die(mysql_error());
$bike_list = "";
while ($list = mysql_fetch_array($fetch)) {
$bike_list = $bike_list."$list[retailers_bike_name], ";
}
$bike_list = rtrim($bike_list, ', ');
echo $bike_list;
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Custom Frames</div>
<div class="dcell divider"></div>
<div class="dcell value">
<?
if ($_POST[retailer_customs]) {
$implosion = implode(",", $_POST[retailer_customs]);
$sql = ("SELECT * FROM gforum_RetailersCustoms WHERE retailers_custom_id IN ($implosion) ORDER BY retailers_custom_name ASC");
//echo $sql;
$results = mysql_query($sql) or die(mysql_error());
$custom_list = "";
while ($row = mysql_fetch_array($results)) {
$custom_list = $custom_list."$row[retailers_custom_name], ";
}
$custom_list = rtrim($custom_list, ', ');
echo $custom_list;
}
?>
</div>
</div>
<div class="drow">
<div class="dcell name">Shop Hours</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo stripslashes(htmlspecialchars($_POST[retailer_hours])); ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Barnett-Trained Mechanic(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_barnett] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_barnett_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">United Bicycle Institute-Trained Mechanic(s)</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? if ($_POST[retailer_ubi] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[retailer_ubi_names]); } ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Shop Info</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo strip_tags(stripslashes($_POST[retailer_info])) ?>
</div>
</div>
<div class="drow">
<div class="dcell name">Directions</div>
<div class="dcell divider"></div>
<div class="dcell value">
<? echo strip_tags(stripslashes($_POST[retailer_directions])); ?>
</div>
</div>
<div class="drow actions">
<div class="dcell name"></div>
<div class="dcell divider"></div>
<div class="dcell value">
<form action="wiki_edit.php" method="post">
<input type="hidden" name="retailer_name" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_name])); ?>">
<input type="hidden" name="retailer_address" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_address])); ?>">
<input type="hidden" name="retailer_address_two" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_address_two])); ?>">
<input type="hidden" name="retailer_city" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_city])); ?>">
<input type="hidden" name="retailer_state" value="<? echo $_POST[retailer_state]; ?>">
<input type="hidden" name="retailer_zip" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_zip])); ?>">
<input type="hidden" name="retailer_phone" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_phone])); ?>">
<input type="hidden" name="retailer_fax" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_fax])); ?>">
<input type="hidden" name="retailer_email" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_email])); ?>">
<input type="hidden" name="retailer_website" value="<? echo $_POST[retailer_website]; ?>">
<input type="hidden" name="retailer_cart" value="<? echo $_POST[retailer_cart]; ?>">
<input type="hidden" name="retailer_spoke" value="<? echo $_POST[retailer_spoke]; ?>">
<input type="hidden" name="retailer_mailorder_ecommerce" value="<? echo $_POST[retailer_mailorder_ecommerce]; ?>">
<input type="hidden" name="retailer_mailorder_phone" value="<? echo $_POST[retailer_mailorder_phone]; ?>">
<input type="hidden" name="retailer_local_ecommerce" value="<? echo $_POST[retailer_local_ecommerce]; ?>">
<input type="hidden" name="retailer_local_phone" value="<? echo $_POST[retailer_local_phone]; ?>">
<input type="hidden" name="retailer_pickup_ecommerce" value="<? echo $_POST[retailer_pickup_ecommerce]; ?>">
<input type="hidden" name="retailer_pickup_phone" value="<? echo $_POST[retailer_pickup_phone]; ?>">
<input type="hidden" name="retailer_contact" value="<? echo $_POST[retailer_contact]; ?>">
<input type="hidden" name="retailer_contact_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_contact_names])); ?>">
<input type="hidden" name="retailer_fist" value="<? echo $_POST[retailer_fist]; ?>">
<input type="hidden" name="retailer_fist_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_fist_names])); ?>">
<input type="hidden" name="retailer_fist_road" value="<? echo $_POST[retailer_fist_road]; ?>">
<input type="hidden" name="retailer_fist_road_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_fist_road_names])); ?>">
<input type="hidden" name="retailer_fist_advanced" value="<? echo $_POST[retailer_fist_advanced]; ?>">
<input type="hidden" name="retailer_fist_advanced_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_fist_advanced_names])); ?>">
<input type="hidden" name="retailer_bfact" value="<? echo $_POST[retailer_bfact]; ?>">
<input type="hidden" name="retailer_serotta" value="<? echo $_POST[retailer_serotta]; ?>">
<input type="hidden" name="retailer_serotta_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_serotta_names])); ?>">
<input type="hidden" name="retailer_method" value="<? echo $_POST[retailer_method]; ?>">
<input type="hidden" name="retailer_fitbikes" value="<? echo(implode(',', $_POST[retailer_fitbikes])); ?>">
<input type="hidden" name="retailer_motioncapture" value="<? echo(implode(',', $_POST[retailer_motioncapture])); ?>">
<input type="hidden" name="retailer_wetsuits" value="<? echo(implode(',', $_POST[retailer_wetsuits])); ?>">
<input type="hidden" name="retailer_bikes" value="<? echo(implode(',', $_POST[retailer_bikes])); ?>">
<input type="hidden" name="retailer_customs" value="<? echo(implode(',', $_POST[retailer_customs])); ?>">
<input type="hidden" name="retailer_hours" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_hours])); ?>">
<input type="hidden" name="retailer_barnett" value="<? echo $_POST[retailer_barnett]; ?>">
<input type="hidden" name="retailer_barnett_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_barnett_names])); ?>">
<input type="hidden" name="retailer_ubi" value="<? echo $_POST[retailer_ubi]; ?>">
<input type="hidden" name="retailer_ubi_names" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_ubi_names])); ?>">
<input type="hidden" name="retailer_info" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_info])); ?>">
<input type="hidden" name="retailer_directions" value="<? echo stripslashes(htmlspecialchars($_POST[retailer_directions])); ?>">
<? // need to temporary set the field as being valid ?>
<input type="hidden" name="retailer_valid" value="1">
<input type="hidden" name="edit_shop" value="1">
<input type="hidden" name="confirm_entry" value="1">
<? if(isset($_POST[new_shop])){ ?>
This data will be saved as a NEW RETAILER.<br>
<input type="hidden" name="new_shop" value="1" />
<input type="hidden" name="retailer_submitted_by" value="<? echo($_POST[edited_by]); ?>" />
<? } else { ?>
This data will be saved as a modification to the EXISTING RETAILER.
<input type="hidden" name="save_changes" value="1" />
<input type="hidden" name="edited_by" value="<? echo($_POST[edited_by]); ?>">
<input type="hidden" name="retailer_submitted_by" value="<? echo($_POST[retailer_submitted_by]); ?>" />
<input type="hidden" name="retailer_id" value="<? echo($_POST[retailer_id]); ?>" />
<? } ?>
<input type="submit" name="submit" value="Submit Info" class="btn float-left" style="margin-right: 5px;" />
</form>
<form action="wiki_edit.php" method="post">
<input type="hidden" name="retailer_name" value="<? echo stripslashes(htmlspecialchars($name)); ?>">
<input type="hidden" name="retailer_address" value="<? echo stripslashes(htmlspecialchars($address)); ?>">
<input type="hidden" name="retailer_address_two" value="<? echo stripslashes(htmlspecialchars($address_two)); ?>">
<input type="hidden" name="retailer_city" value="<? echo stripslashes(htmlspecialchars($city)); ?>">
<input type="hidden" name="retailer_state" value="<? echo $state; ?>">
<input type="hidden" name="retailer_zip" value="<? echo stripslashes(htmlspecialchars($zip)); ?>">
<input type="hidden" name="retailer_phone" value="<? echo stripslashes(htmlspecialchars($phone)); ?>">
<input type="hidden" name="retailer_fax" value="<? echo stripslashes(htmlspecialchars($fax)); ?>">
<input type="hidden" name="retailer_email" value="<? echo stripslashes(htmlspecialchars($email)); ?>">
<input type="hidden" name="retailer_website" value="<? echo $website; ?>">
<input type="hidden" name="retailer_cart" value="<? echo $cart; ?>">
<input type="hidden" name="retailer_spoke" value="<? echo $spoke; ?>">
<input type="hidden" name="retailer_mailorder_ecommerce" value="<? echo $mailorder_ecommerce; ?>">
<input type="hidden" name="retailer_mailorder_phone" value="<? echo $mailorder_phone; ?>">
<input type="hidden" name="retailer_local_ecommerce" value="<? echo $local_ecommerce; ?>">
<input type="hidden" name="retailer_local_phone" value="<? echo $local_phone; ?>">
<input type="hidden" name="retailer_pickup_ecommerce" value="<? echo $pickup_ecommerce; ?>">
<input type="hidden" name="retailer_pickup_phone" value="<? echo $pickup_phone; ?>">
<input type="hidden" name="retailer_contact" value="<? echo $contact; ?>">
<input type="hidden" name="retailer_contact_names" value="<? echo stripslashes(htmlspecialchars($contact_names)); ?>">
<input type="hidden" name="retailer_fist" value="<? echo $fist; ?>">
<input type="hidden" name="retailer_fist_names" value="<? echo stripslashes(htmlspecialchars($fist_names)); ?>">
<input type="hidden" name="retailer_fist_road" value="<? echo $fist_road; ?>">
<input type="hidden" name="retailer_fist_road_names" value="<? echo stripslashes(htmlspecialchars($fist_road_names)); ?>">
<input type="hidden" name="retailer_fist_advanced" value="<? echo $fist_advanced; ?>">
<input type="hidden" name="retailer_fist_advanced_names" value="<? echo stripslashes(htmlspecialchars($fist_advanced_names)); ?>">
<input type="hidden" name="retailer_bfact" value="<? echo $bfact; ?>">
<input type="hidden" name="retailer_serotta" value="<? echo $serotta; ?>">
<input type="hidden" name="retailer_serotta_names" value="<? echo stripslashes(htmlspecialchars($serotta_names)); ?>">
<input type="hidden" name="retailer_method" value="<? echo $method; ?>">
<input type="hidden" name="retailer_fitbikes" value="<? echo(implode(',', $fitbikes)); ?>">
<input type="hidden" name="retailer_motioncapture" value="<? echo(implode(',', $motioncapture)); ?>">
<input type="hidden" name="retailer_wetsuits" value="<? echo(implode(',', $wetsuits)); ?>">
<input type="hidden" name="retailer_bikes" value="<? echo(implode(',', $bikes)); ?>">
<input type="hidden" name="retailer_customs" value="<? echo(implode(',', $customs)); ?>">
<input type="hidden" name="retailer_hours" value="<? echo stripslashes(htmlspecialchars($hours)); ?>">
<input type="hidden" name="retailer_barnett" value="<? echo $barnett; ?>">
<input type="hidden" name="retailer_barnett_names" value="<? echo stripslashes(htmlspecialchars($barnett_names)); ?>">
<input type="hidden" name="retailer_ubi" value="<? echo $ubi; ?>">
<input type="hidden" name="retailer_ubi_names" value="<? echo stripslashes(htmlspecialchars($ubi_names)); ?>">
<input type="hidden" name="retailer_info" value="<? echo stripslashes(htmlspecialchars($info)); ?>">
<input type="hidden" name="retailer_directions" value="<? echo stripslashes(htmlspecialchars($directions)); ?>">
<input type="hidden" name="edit_return" value="1">
<? // need to temporary set the field as being valid ?>
<input type="hidden" name="retailer_valid" value="1">
<input type="hidden" name="retailer_id" value="<? echo $id; ?>">
<input type="hidden" name="retailer_submitted_by" value="<? echo $submitted_by; ?>">
<input type="submit" name="submit" value="Edit Information" class="btn float-left" />
</form>
</div>
</div>
</div>