username@email.com
2022-01-21 b18a7c8e54b51a5caa400e55cb8cc428c0301a0c
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <title>Customers</title>
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="jquery-jtemplates.js"></script>
  <link rel="stylesheet" href="style.css">
 
  <script type="text/javascript">
    $(document).ready(function() {
      //set template
      $("#CustomersList").setTemplateElement("Template-List");
      //add parameter using to calculate "age"
      //$("#CustomersList").setParam("year", 2012);
      //process template
      $("#CustomersList").processTemplateURL("data.json");
      
      //set template for detailed info
      $("#CustomerDetails").setTemplateElement("Template-Details");
    });
    
    //show customer detail, run from template
    function ShowDetails(cust) {
      //process a template
      $("#CustomerDetails").processTemplate(cust);
    }
    
    function fuck(s){
        return s;    
        //document.write(s);
    }
  </script>
</head>
 
<body>
 
  <!-- Templates -->
  <p style="display:none"><textarea id="Template-List" rows="0" cols="0"><!--
    {#template MAIN}
      <table>
        <tr class="{#cycle values=['bcEEC','bcCEE']}">
          <td class="header">Details</td>
          <td class="header">Name</td>
          <td class="header">Age</td>
          <td class="header">Fuck</td>
        </tr>
        {#foreach $T.Customers as Cust}
          {#include ROW root=$T.Cust}
        {#/for}
      </table>
    {#/template MAIN}
    
    {#template ROW}
      <tr class="{#cycle values=['bcEED','bcDEE']}">
        <td><a href="#" onclick="ShowDetails({#var $T})">SELECT</a></td>
        <td>{$T.FirstName} {$T.LastName}</td>
        <td>{$P.year-$T.Born}</td>
        <td>{#if $T.FirstName == "John"}
            fuck
            {#else }
            jbda
            {#/if}
            {#if $T.firstName}
                haha
            {#/if}
            
        </td>
      </tr>
    {#/template ROW}
  --></textarea></p>
  
  <p style="display:none"><textarea id="Template-Details" rows="0" cols="0"><!--
    <table>
      <tr><td class="header">First Name</td><td>{$T.FirstName}</td></tr>
      <tr><td class="header">Last Name</td><td>{$T.LastName}</td></tr>
      <tr><td class="header">Born</td><td>{$T.Born}</td></tr>
      <tr><td class="header">E-mail</td><td>{$T.Email.link('mailto:'+$T.Email)}</td></tr>
    </table>
  --></textarea></p>
 
  <!-- Output elements -->
  <div id="CustomersList" class="Content"></div>
  <div id="CustomerDetails" class="Content"></div>
  
</body>
</html>