summaryrefslogtreecommitdiff
path: root/views/marketplace.ejs
blob: b538692e5163e554cc2465a87ce886e989297822 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!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" <% } %> disabled>
                            <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" <% } %> disabled>

                        <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" <% } %> disabled>

                        <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"
                            <% } %> disabled>

                        <% 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" disabled>Submit</button>
                        <% } %>

                        <small class="form-text" style="color: #99CC33;">Marketplace coming soon!
                        </small>
                    </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" <% } %> disabled>
                            <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" <% } %> disabled>

                        <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>
                        </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>
                        </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>
                        </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>
                        </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>