<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[runshop_name]); ?></h2>
<?$nametagmod = trim(strtolower(str_replace(" ","",$_POST[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_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[runshop_website]; ?>" target="_blank"><? echo $_POST[runshop_website]; ?></a></div>
  </div>
  <div class="drow">
    <div class="dcell name">Cart</div>
    <div class="dcell divider"></div>
    <div class="dcell value"><? if ($_POST[runshop_cart] == 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 < 10; $i++) echo("*"); 
        echo (" TECHNOLOGY, COMMUNITY &amp; EDUCATION ");
        for ($i = 0; $i < 10; $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[runshop_contact] == 0) { echo "None"; } else { echo "Yes, Their Names - "; echo stripslashes($_POST[runshop_contact_names]); } ?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Diagnostic Equipment</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_diagnostics]) {
    $implosion = implode(",", $_POST[runshop_diagnostics]);

    $sql = ("SELECT * FROM ".$prefix."RunshopsDiagnostics WHERE diagnostic_id IN ($implosion) ORDER BY diagnostic_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $diagnostic_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $diagnostic_list  = $diagnostic_list."$fetch[diagnostic_name], ";
    }
    $diagnostic_list = rtrim($diagnostic_list, ', ');

    echo $diagnostic_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">Shoes</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_shoes]) {
    $implosion = implode(",", $_POST[runshop_shoes]);

    $sql = ("SELECT * FROM ".$prefix."RunshopsShoes WHERE shoe_id IN ($implosion) ORDER BY shoe_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $shoe_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $shoe_list  = $shoe_list."$fetch[shoe_name], ";
    }
    $shoe_list = rtrim($shoe_list, ', ');

    echo $shoe_list;
}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Socks</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_socks]) {
    $implosion = implode(",", $_POST[runshop_socks]);

    $sql = ("SELECT * FROM ".$prefix."RunshopsSocks WHERE sock_id IN ($implosion) ORDER BY sock_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $sock_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $sock_list  = $sock_list."$fetch[sock_name], ";
    }
    $sock_list = rtrim($sock_list, ', ');

    echo $sock_list;
}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Run Focused Apparel</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_apparel_run]) {
    $implosion = implode(",", $_POST[runshop_apparel_run]);

    $sql = ("SELECT * FROM ".$prefix."RunshopsApparelRun WHERE apparel_run_id IN ($implosion) ORDER BY apparel_run_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $apparel_run_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $apparel_run_list  = $apparel_run_list."$fetch[apparel_run_name], ";
    }
    $apparel_run_list = rtrim($apparel_run_list, ', ');

    echo $apparel_run_list;
}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Tri-Focused Apparel</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_apparel_tri]) {
    $implosion = implode(",", $_POST[runshop_apparel_tri]);

    $sql = ("SELECT * FROM ".$prefix."RunshopsApparelTri WHERE apparel_tri_id IN ($implosion) ORDER BY apparel_tri_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $apparel_tri_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $apparel_tri_list  = $apparel_tri_list."$fetch[apparel_tri_name], ";
    }
    $apparel_tri_list = rtrim($apparel_tri_list, ', ');

    echo $apparel_tri_list;
}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Swim Gear</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_swimgear]) {
    $implosion = implode(",", $_POST[runshop_swimgear]);

    $sql = ("SELECT * FROM ".$prefix."ResourceSwimgear WHERE swimgear_id IN ($implosion) ORDER BY swimgear_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $swimgear_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $swimgear_list  = $swimgear_list."$fetch[swimgear_name], ";
    }
    $swimgear_list = rtrim($swimgear_list, ', ');

    echo $swimgear_list;

}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Wetsuits</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<?
if ($_POST[runshop_wetsuits]) {
    $implosion = implode(",", $_POST[runshop_wetsuits]);
    $sql = ("SELECT * FROM ".$prefix."ResourceWetsuit WHERE wetsuit_id IN ($implosion) ORDER BY wetsuit_name ASC");

    //echo $sql;

    $list = mysql_query($sql) or die(mysql_error());

    $wetsuit_list = "";
    while ($fetch = mysql_fetch_array($list)) {
        $wetsuit_list  = $wetsuit_list."$fetch[wetsuit_name], ";
    }
    $wetsuit_list = rtrim($wetsuit_list, ', ');

    echo $wetsuit_list;
}
?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name"></div>
    <div class="dcell divider"></div>
    <div class="dcell value">
      <? for ($i = 0; $i < 60; $i++) echo("*"); ?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Store Hours</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<? echo stripslashes(htmlspecialchars($_POST[runshop_hours])); ?>
    </div>
  </div>
  <div class="drow">
    <div class="dcell name">Runs &amp; Classes</div>
    <div class="dcell divider"></div>
    <div class="dcell value">
<? echo strip_tags(stripslashes($_POST[runshop_classes])) ?>
    </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[runshop_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[runshop_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="runshop_name" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_name])); ?>">
        <input type="hidden" name="runshop_address" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_address])); ?>">
        <input type="hidden" name="runshop_address_two" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_address_two])); ?>">
        <input type="hidden" name="runshop_city" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_city])); ?>">
        <input type="hidden" name="runshop_state" value="<? echo $_POST[runshop_state]; ?>">
        <input type="hidden" name="runshop_zip" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_zip])); ?>">
        <input type="hidden" name="runshop_phone" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_phone])); ?>">
        <input type="hidden" name="runshop_fax" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_fax])); ?>">
        <input type="hidden" name="runshop_email" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_email])); ?>">
        <input type="hidden" name="runshop_website" value="<? echo $_POST[runshop_website]; ?>">
        <input type="hidden" name="runshop_cart" value="<? echo $_POST[runshop_cart]; ?>">
        <input type="hidden" name="runshop_contact" value="<? echo $_POST[runshop_contact]; ?>">
        <input type="hidden" name="runshop_contact_names" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_contact_names])); ?>">
        <input type="hidden" name="runshop_diagnostics" value="<? echo(implode(',', $_POST[runshop_diagnostics])); ?>">
        <input type="hidden" name="runshop_shoes" value="<? echo(implode(',', $_POST[runshop_shoes])); ?>">
        <input type="hidden" name="runshop_swimgear" value="<? echo(implode(',', $_POST[runshop_swimgear])); ?>">
        <input type="hidden" name="runshop_wetsuits" value="<? echo(implode(',', $_POST[runshop_wetsuits])); ?>">
        <input type="hidden" name="runshop_socks" value="<? echo(implode(',', $_POST[runshop_socks])); ?>">
        <input type="hidden" name="runshop_apparel_run" value="<? echo(implode(',', $_POST[runshop_apparel_run])); ?>">
        <input type="hidden" name="runshop_apparel_tri" value="<? echo(implode(',', $_POST[runshop_apparel_tri])); ?>">
        <input type="hidden" name="runshop_hours" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_hours])); ?>">
        <input type="hidden" name="runshop_classes" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_classes])); ?>">
        <input type="hidden" name="runshop_info" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_info])); ?>">
        <input type="hidden" name="runshop_directions" value="<? echo stripslashes(htmlspecialchars($_POST[runshop_directions])); ?>">
        <? // need to temporary set the field as being valid ?>
        <input type="hidden" name="runshop_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.
        <input type="hidden" name="new_shop" value="1"  />
        <input type="hidden" name="runshop_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="runshop_submitted_by" value="<? echo($_POST[runshop_submitted_by]); ?>" />
        <input type="hidden" name="runshop_id" value="<? echo($_POST[runshop_id]); ?>" />
        <? } ?>
        <br><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="runshop_name" value="<? echo stripslashes(htmlspecialchars($name)); ?>">
        <input type="hidden" name="runshop_address" value="<? echo stripslashes(htmlspecialchars($address)); ?>">
        <input type="hidden" name="runshop_address_two" value="<? echo stripslashes(htmlspecialchars($address_two)); ?>">
        <input type="hidden" name="runshop_city" value="<? echo stripslashes(htmlspecialchars($city)); ?>">
        <input type="hidden" name="runshop_state" value="<? echo $state; ?>">
        <input type="hidden" name="runshop_zip" value="<? echo stripslashes(htmlspecialchars($zip)); ?>">
        <input type="hidden" name="runshop_phone" value="<? echo stripslashes(htmlspecialchars($phone)); ?>">
        <input type="hidden" name="runshop_fax" value="<? echo stripslashes(htmlspecialchars($fax)); ?>">
        <input type="hidden" name="runshop_email" value="<? echo stripslashes(htmlspecialchars($email)); ?>">
        <input type="hidden" name="runshop_website" value="<? echo $website; ?>">
        <input type="hidden" name="runshop_cart" value="<? echo $cart; ?>">
        <input type="hidden" name="runshop_contact" value="<? echo $contact; ?>">
        <input type="hidden" name="runshop_contact_names" value="<? echo stripslashes(htmlspecialchars($contact_names)); ?>">
        <input type="hidden" name="runshop_diagnostics" value="<? echo(implode(',', $diagnostics)); ?>">
        <input type="hidden" name="runshop_shoes" value="<? echo(implode(',', $shoes)); ?>">
        <input type="hidden" name="runshop_swimgear" value="<? echo(implode(',', $swimgear)); ?>">
        <input type="hidden" name="runshop_wetsuits" value="<? echo(implode(',', $wetsuits)); ?>">
        <input type="hidden" name="runshop_socks" value="<? echo(implode(',', $socks)); ?>">
        <input type="hidden" name="runshop_apparel_run" value="<? echo(implode(',', $apparel_run)); ?>">
        <input type="hidden" name="runshop_apparel_tri" value="<? echo(implode(',', $apparel_tri)); ?>">
        <input type="hidden" name="runshop_hours" value="<? echo stripslashes(htmlspecialchars($hours)); ?>">
        <input type="hidden" name="runshop_classes" value="<? echo stripslashes(htmlspecialchars($classes)); ?>">
        <input type="hidden" name="runshop_info" value="<? echo stripslashes(htmlspecialchars($info)); ?>">
        <input type="hidden" name="runshop_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="runshop_valid" value="1">
        <input type="hidden" name="runshop_id" value="<? echo($id); ?>" />
        <input type="hidden" name="runshop_submitted_by" value="<? echo $submitted_by; ?>">
        <input type="submit" name="submit" value="Edit Information" class="btn float-left">
      </form>
    </div>
  </div>
</div>
