thiswebshoprules

git clone https://git.tarina.org/thiswebshoprules
Log | Files | Refs

goodies.html (1740B)


      1 $def with (key,keys,productname,db,getprice)
      2 <div id="container">
      3 <div id="default">
      4 <a href="/">go back</a>
      5 <br>
      6 <h2>All Your Goodies!</h2>
      7 <br>
      8 
      9 $ totsats = 0
     10 $ toteuro = 0
     11 $if keys != []:
     12     $for k in keys:
     13         $ bags = db.query("SELECT * FROM paidbags WHERE sessionkey='"+k.invoice_key+"' ORDER BY timeadded DESC;")
     14         $for i in bags:
     15             $ invoice = db.select('invoices', where="invoice_key='"+i.sessionkey+"'")[0]
     16             <div class="orders" id="$id">
     17             $code:
     18                 price = getprice(i.product)
     19                 quantity = i.quantity
     20                 p_totsats=i.quantity*price[0]
     21                 p_toteuro=i.quantity*price[1]
     22             $i.timeadded
     23             <br>
     24             $productname(i.product)<br>
     25             status: $invoice.status<br>
     26             $if invoice.status=='shipped':
     27                 $invoice.dateshipped
     28             <br>
     29             $ goodies = db.query("SELECT * FROM soundlink WHERE id='"+i.product+"';")
     30             $for g in goodies:
     31                 $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png':
     32                     <img src="/static/img/thumb/$g.soundname" style="width:120px"><br>
     33                 $else:
     34                     <a href="/static/upload/$g.soundlink/$g.soundname">$g.soundname</a> <- Download file
     35                     <br>
     36             $code:
     37                 totsats += p_totsats
     38                 toteuro += p_toteuro
     39             </div>
     40             <br>
     41 <br>
     42 total: $totsats Satoshi or $toteuro &euro;<br>
     43 <br>
     44 Order is only reserved once paid.
     45 If you choose NO-SHIPPING you will have to pick up the order yourself.
     46 Contact this guy rob@tarina.org ☮
     47 <br>
     48 <br>
     49 </div>
     50 <a href="/"><<<<<< back shoppin for more!!</a>
     51 </div>
     52 </div>
     53 </div>