diff options
Diffstat (limited to 'views/marketplace-spike.ejs')
| -rw-r--r-- | views/marketplace-spike.ejs | 455 |
1 files changed, 455 insertions, 0 deletions
diff --git a/views/marketplace-spike.ejs b/views/marketplace-spike.ejs new file mode 100644 index 0000000..178d83e --- /dev/null +++ b/views/marketplace-spike.ejs @@ -0,0 +1,455 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>Sin's SS Logger | Marketplace</title> + <link rel="shortcut icon" href="https://i.imgur.com/69mCrs0.jpg" type="image/jpg"> + <!-- CSS --> + <link rel="stylesheet" href="css/main.css"> + <link rel="stylesheet" href="css/now-ui-kit.css"> + <link rel="stylesheet" href="css/bootstrap.min.css"> + + <style> + html, + body { + background-color: #202124; + user-select: none; + } + + .container { + z-index: 999; + } + + #white-txt { + color: white !important; + } + + .highlightable { + user-select: text; + } + + footer { + position: fixed; + left: 0; + bottom: 3px; + width: 100%; + color: white; + text-align: center; + } + + #pink-link { + color: pink; + } + #pink-link:hover { + color: rgb(214, 161, 170); + } + + @media (max-width: 1810px) { + .newest { + display: none; + } + } + </style> + <!-- External Libraries --> + <!-- Invisible Scripts --> + <script src="https://code.jquery.com/jquery-3.5.0.min.js" + integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> + <script src="js/now-ui-kit.js"></script> + <script src="js/main.js"></script> + </head> + <body> + <!-- Visible Scripts --> + + <nav class="navbar navbar-expand-lg bg-transparent hideme" id="navbar-remove"> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav ml-auto"> + <li class="nav-item"> + <a href="#" class="nav-link disabled" style="opacity: 1;">Database Status: <span + style="color: #99CC33;">Online</span></a> + </li> + <div class="divider-vertical"></div> + <li class="nav-item"> + <a class="nav-link" href="/">Home</a> + </li> + <li class="nav-item active"> + <a href="#" class="nav-link">Marketplace Beta <span class="sr-only">(current)</span></a> + </li> + <!--<li class="nav-item"> + <a class="nav-link" href="/discord/bots/uwufier/about/">About</a> + </li>--> + <li class="nav-item"> + <a href="/profile" class="nav-link">Profile</a> + </li> + <li class="nav-item disabled"> + <a href="#" class="nav-link disabled">API</a> + </li> + <div class="divider-vertical"></div> + <li class="nav-item"> + <a href="https://kyzer.co" class="nav-link">More stuff from Sin</a> + </li> + </ul> + <!-- <button class="btn btn-outline-secondary my-2 my-sm-0 btn-round btn-sm">LOGIN</button> --> + </div> + </nav> + + <div class="container my-5"> + <form action="/submitMarketEntry" method="POST" class="my-4 form-inline hideme"> + <div class="row"> + <div class="col-sm"> + <label for="transactionType" class="sr-only">Type of transaction</label> + <select name="transactionType" id="transactionType" class="form-control mr-2" + <% if (name === null) { %> disabled data-toggle="tooltip" data-placement="top" + title="Login to submit" <% } %>> + <option value="purchase">Purchase</option> + <option value="sale">Sale</option> + <option value="trade">Trade</option> + </select> + + <label for="carsType" class="sr-only">Cars</label> + <input type="text" name="carsType" id="carsType" class="form-control mr-2" + placeholder="Car(s)" min="2" max="16" required <% if (name === null) { %> disabled + data-toggle="tooltip" data-placement="top" + title="Login to submit" <% } %>> + + <label for="sellerType" class="sr-only">Seller, Buyer or Trader's Name</label> + <input type="text" name="sellerType" id="sellerType" class="form-control mr-2" + placeholder="Seller/ Buyer/ Trader's Name" min="1" max="50" required + <% if (name === null) { %> disabled data-toggle="tooltip" data-placement="top" + title="Login to submit" <% } %>> + + <label for="priceType" class="sr-only">Price or Received Cars</label> + <input type="text" name="priceType" id="priceType" class="form-control mr-2" + placeholder="Price/ Received Car(s)" min="1" required <% if (name === null) { %> disabled + data-toggle="tooltip" data-placement="top" + title="Login to submit" + <% } %>> + + <% if (name === null) { %> + <a href="/login"> + <button type="button" class="btn btn-danger">Login to submit</button> + </a> + <% } else { %> + <button type="submit" class="btn btn-success">Submit</button> + <% } %> + </div> + </div> + </form> + + <form action="/searchEntries" method="POST" class="my-4 form-inline hideme"> + <div class="row"> + <div class="col-sm"> + <label for="transactionType" class="sr-only">Type of transaction</label> + <select name="transactionType" id="transactionType" class="form-control mr-2" + <% if (name === null) { %> disabled data-toggle="tooltip" data-placement="top" + title="Login to submit" <% } %>> + <option value="car-name">Name</option> + <option value="price">Price</option> + </select> + + <label for="carsType" class="sr-only">Cars</label> + <input type="text" name="carsType" id="carsType" class="form-control mr-2" + placeholder="Car Name or Price" min="2" max="16" required <% if (name === null) { %> disabled + data-toggle="tooltip" data-placement="top" + title="Login to submit" <% } %>> + + <a href="/login"> + <button type="button" disabled class="btn btn-success">Search</button> + </a> + </div> + </div> + </form> + + <div class="row"> + <div class="col-sm"> + <h3 id="white-txt" class="hideme">Your Listings</h3> + <table class="table table-striped"> + <thead class="hideme"> + <tr> + <th id="white-txt" class="hideme">Car(s)</th> + <th id="white-txt" class="hideme">Seller</th> + <th id="white-txt" class="hideme">Price</th> + <!-- <th id="white-txt" class="hideme" data-toggle="tooltip" data-placement="top" + title="Time of Sale">TOS</th> --> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> + </tr> + </thead> + <tbody> + <tr> + <td id="white-txt" class="highlightable hideme">RX7</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">150000</td> + <td id="white-txt" class="highlightable hideme">2020-05-12T03:01:12.6FS9</td> + </tr> + <!-- <% if (name === null) { %> + <tr> + <td id="white-txt" class="highlightable hideme">RX7</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">150000</td> + <td id="white-txt" class="highlightable hideme">2020-05-12T03:01:12.6FS9</td> + </tr> + <% } else { %> + <% if (loopCount < 1) { %> + <tr> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + </tr> + <% } else { %> + <% loop.forEach(lp => { %> + <tr> + <td id="white-txt" class="highlightable hideme"><%= lp.cars %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> + </tr> + <% }) %> + <% } %> + <% } %> --> + </tbody> + </table> + </div> + <div class="col-sm"> + <h3 id="white-txt" class="hideme">From Today</h3> + <table class="table table-striped"> + <thead class="hideme"> + <tr> + <th id="white-txt" class="hideme">Car(s)</th> + <th id="white-txt" class="hideme">Seller</th> + <th id="white-txt" class="hideme">Price</th> + <!-- <th id="white-txt" class="hideme" data-toggle="tooltip" data-placement="top" + title="Time of Sale">TOS</th> --> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> + </tr> + </thead> + <tbody> + <tr> + <td id="white-txt" class="highlightable hideme">RX7</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">150000</td> + <td id="white-txt" class="highlightable hideme">2020-05-06T08:08:34.827Z</td> + </tr> + <!-- <% if (name === null) { %> + <tr> + <td id="white-txt" class="highlightable hideme">RX7</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">150000</td> + <td id="white-txt" class="highlightable hideme">2020-05-06T08:08:34.827Z</td> + </tr> + <% } else { %> + <% if (loopCount < 1) { %> + <tr> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + </tr> + <% } else { %> + <% loop.forEach(lp => { %> + <tr> + <td id="white-txt" class="highlightable hideme"><%= lp.cars %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> + </tr> + <% }) %> + <% } %> + <% } %> --> + </tbody> + </table> + </div> + <div class="col-sm"> + <h3 id="white-txt" class="hideme">From This Week</h3> + <table class="table table-striped"> + <thead class="hideme"> + <tr> + <th id="white-txt" class="hideme">Car(s)</th> + <th id="white-txt" class="hideme">Buyer</th> + <th id="white-txt" class="hideme">Price</th> + <!-- <th id="white-txt" class="hideme" data-toggle="tooltip" data-placement="top" + title="Time of Sale">TOS</th> --> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> + </tr> + </thead> + <tbody> + <tr> + <td id="white-txt" class="highlightable hideme">R34</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">180000</td> + <td id="white-txt" class="highlightable hideme">2020-05-04T02:02:56.8F9J</td> + </tr> + <!-- <% if (name === null) { %> + <tr> + <td id="white-txt" class="highlightable hideme">R34</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">180000</td> + <td id="white-txt" class="highlightable hideme">2020-05-04T02:02:56.8F9J</td> + </tr> + <% } else { %> + <% if (loop2Count < 1) { %> + <tr> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + </tr> + <% } else { %> + <% loop2.forEach(lp => { %> + <tr> + <td id="white-txt" class="highlightable hideme"><%= lp.cars %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> + </tr> + <% }) %> + <% } %> + <% } %> --> + </tbody> + </table> + </div> + <div class="col-sm"> + <h3 id="white-txt" class="hideme">From This Month</h3> + <table class="table table-striped"> + <thead class="hideme"> + <tr> + <th id="white-txt">Received Car(s)</th> + <th id="white-txt">Trader</th> + <th id="white-txt">Traded Car(s)</th> + <!-- <th id="white-txt" data-toggle="tooltip" data-placement="top" title="Time of Sale">TOS</th> --> + <% if (name === null) { } else { %> + <th id="white-txt" class="hideme"></th> + <% } %> + </tr> + </thead> + <tbody> + <tr> + <td id="white-txt" class="highlightable hideme">R32</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">R34</td> + <td id="white-txt" class="highlightable hideme">2020-05-02T06:21:23.2J7F</td> + </tr> + <!-- <% if (name === null) { %> + <td id="white-txt" class="highlightable hideme">R32</td> + <td id="white-txt" class="highlightable hideme">Sin</td> + <td id="white-txt" class="highlightable hideme">R34</td> + <td id="white-txt" class="highlightable hideme">2020-05-02T06:21:23.2J7F</td> + <% } else { %> + <% if (loop3Count < 1) { %> + <tr> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + <td id="white-txt" class="highlightable hideme"></td> + </tr> + <% } else { %> + <% loop3.forEach(lp => { %> + <tr> + <td id="white-txt" class="highlightable hideme"><%= lp.cars %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.seller %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.price %></td> + <td id="white-txt" class="highlightable hideme"><%= lp.date %></td> + <!-- <td id="white-txt id" class="highlightable" style="display: none;"><%= lp._id %></td> --> + <td class="hideme"> + <form action="/deleteItem/<%= lp._id %>" method="post"> + <button type="submit" class="btn btn-danger" + style="float: right; font-size: 10px !important;" + data-toggle="tooltip" data-placement="top" + title="Delete this entry" data-delete-item-button>Delete</button> + </form> + </td> + </tr> + <% }) %> + <% } %> + <% } %> --> + </tbody> + </table> + </div> + </div> + + <% if (name === 'sin') { %> + <div class="newest hideme" style="position: absolute; top: 15px; left: 15px;"> + <!-- <div class="newest hideme" style="position: fixed; top: 5%; left: 5%;"> --> + <table class="table table-striped"> + <thead> + <tr> + <th id="white-txt">Users</th> + <th id="white-txt">Entries</th> + <th id="white-txt">Uptime</th> + </tr> + </thead> + <tbody> + <tr> + <td id="white-txt" class="highlightable"><%= UserCount %></td> + <td id="white-txt" class="highlightable"><%= EntryCount %></td> + <td id="white-txt" class="highlightable"><%= dateString %></td> + </tr> + </tbody> + </table> + </div> + <% } %> + </div> + + <footer class="hideme"> + <link rel="stylesheet" type="text/css" + href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> + Made with <i class="icon ion-heart"></i> by <a href="https://kyzer.co/">Sin</a>. | + <span class="highlightable"><%= quote.text %> -<%= quote.author.name %></span> + </footer> + + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" + integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"> + </script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" + integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"> + </script> + <script src="https://code.jquery.com/jquery-3.5.0.min.js" + integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script> + <script> + $('tbody').each(function() { + const list = $(this).children('tr'); + $(this).html(list.get().reverse()) + }); + + // if you are seeing this, this took way to long to complete. + </script> + </body> +</html>
\ No newline at end of file |