| Line 85... |
Line 85... |
| 85 |
template = "<html><head><style>td,th{border:1px solid;padding:2px}</style></head><div>Total Orders: %s</div><br/><body><table style='font-size:12px;border:1px solid grey;border-spacing:0;cell-spacing:0;border-bottom:1px solid grey;border-bottom:1px solid transparent'>%s</table></body></html>"
|
85 |
template = "<html><head><style>td,th{border:1px solid;padding:2px}</style></head><div>Total Orders: %s</div><br/><body><table style='font-size:12px;border:1px solid grey;border-spacing:0;cell-spacing:0;border-bottom:1px solid grey;border-bottom:1px solid transparent'>%s</table></body></html>"
|
| 86 |
tbodyarr = []
|
86 |
tbodyarr = []
|
| 87 |
colhead="<tr><th>Id</th><th>User Id</th><th>Username</th><th>Store Id</th><th>Order Url</th><th>Subtag</th><th>Statu</th><th>Created on</th></tr>"
|
87 |
colhead="<tr><th>Id</th><th>User Id</th><th>Username</th><th>Store Id</th><th>Order Url</th><th>Subtag</th><th>Statu</th><th>Created on</th></tr>"
|
| 88 |
tbodyarr.append(colhead)
|
88 |
tbodyarr.append(colhead)
|
| 89 |
for row in result:
|
89 |
for row in result:
|
| 90 |
tbodyarr.append("<tr><td>" + xstr(row[0]) + "</td><td>" + xstr(row[1]) +"</td><td><a href=\"/transactions?user=" + xstr(row[1]) + "\">" + xstr(row[-1]) + "</a></td><td>" + xstr(row[2]) +"</td><td><a target='_blank' href='/rawhtml/" + xstr(row[0]) +"/?show=1" + "'>" + xstr(row[3])[:130] +"</a></td><td>" + xstr(row[4]) + "</td><td><a href=\"/transactions?status=" + xstr(row[5]) + "\">" + xstr(row[5]) + "</a></td><td>" + row[6].strftime("%Y-%m-%d %H:%M:%S") + "</td></tr>")
|
90 |
tbodyarr.append("<tr><td>" + xstr(row[0]) + "</td><td>" + xstr(row[1]) +"</td><td><a href=\"/transactions?user=" + xstr(row[1]) + "\">" + xstr(row[-1]) + "</a></td><td>" + xstr(row[2]) +"</td><td><a target='_blank' href='/rawhtml/" + xstr(row[0]) + "'>" + xstr(row[3])[:130] +"</a></td><td>" + xstr(row[4]) + "</td><td><a href=\"/transactions?status=" + xstr(row[5]) + "\">" + xstr(row[5]) + "</a></td><td>" + row[6].strftime("%Y-%m-%d %H:%M:%S") + "</td></tr>")
|
| 91 |
|
91 |
|
| 92 |
return template%(total_count, "".join(tbodyarr))
|
92 |
return template%(total_count, "".join(tbodyarr))
|
| 93 |
except:
|
93 |
except:
|
| 94 |
traceback.print_exc()
|
94 |
traceback.print_exc()
|
| 95 |
finally:
|
95 |
finally:
|