index.html (1935B)
1 $def with (products,bag,sessionkey,productname,inbag,db,getprice,getrate) 2 $ totsats = 0 3 $ toteuro = 0 4 $ x = 0 5 $if sessionkey != 'empty': 6 <div id="bag"> 7 <div id="insidebag"> 8 in your order:<br> 9 $for i in bag: 10 $code: 11 price = getprice(i.product) 12 quantity = i.quantity 13 p_totsats=i.quantity*price[0] 14 p_toteuro=i.quantity*price[1] 15 $i.quantity x $productname(i.product) 16 <a href="/dropitem/$i.product">X</a> $p_totsats $p_toteuro€<br> 17 $code: 18 totsats += p_totsats 19 toteuro += p_toteuro 20 $if totsats > 0: 21 total: $totsats Satoshi or $toteuro € 22 <a href="/checkout">Checkout</a> 23 </div> 24 </div> 25 26 <div id="container"> 27 <br> 28 <h1>Rockman Brothers</h1> 29 <h4>International Heavy Voodoo Sound</h4> 30 <br> 31 <div id="logocontainer"> 32 33 </div> 34 35 <div id="productlist"> 36 $for i in products: 37 <div class="product" id="$i.id"> 38 $ goodies = db.query("SELECT * FROM soundlink WHERE id='" +i.id+"';") 39 $for g in goodies: 40 $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png': 41 <a href="/bigpic/$g.id"><img class="imgprod" src="/static/img/web/$g.soundname"></a> 42 $code: 43 sat, euro = getprice(i.id) 44 <h2> 45 $i.name 46 </h2> 47 <code>$i.category</code> 48 <pre>$i.description</pre> 49 $if i.available > 0: 50 Price $sat Satoshi ~ $euro € <a href="?putinbag=$i.id#$i.id">add to bag</a><br> 51 Available $i.available pcs 52 $else: 53 SOLD OUT! check back later. 54 </div> 55 <br> 56 <small>~-~</small> 57 <br> 58 </div> 59 <img class="logo" src="/static/bitcoin.png"> 60 <br> 61 <h2>$getrate()€/₿</h2> 62 <small>powered by <a href="https://github.com/ElementsProject/lightning">CLN</a>, <a href="https://dev.tarina.org/p/thiswebshoprules/">thiswebshoprules</a> and <a href="https://webpy.org">web.py </a></small> 63 <br> 64 <br> 65 <br> 66 <br> 67 <br> 68 <br> 69 <br>