Subversion Repositories LCARS

Rev

Rev 29 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 32
Line 2... Line 2...
2
  "http://www.w3.org/TR/html4/strict.dtd">
2
  "http://www.w3.org/TR/html4/strict.dtd">
3
<html lang="de">
3
<html lang="de">
4
  <head>
4
  <head>
5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
    <title>Seri-o-meter</title>
6
    <title>Seri-o-meter</title>
-
 
7
    <?php
-
 
8
//       require_once 'css/lessphp/lessc.inc.php';
-
 
9
//       lessc::ccompile('style.less', 'style-less.css');
-
 
10
       // require_once 'css/least/LEAST.php';
-
 
11
       // de\pointedears\css\least\LEAST::compile('style.least', 'style-least.css');
-
 
12
    ?>
7
    <link rel="stylesheet" href="style.css" type="text/css">
13
    <link rel="stylesheet" href="style.css" type="text/css">
8
    <script type="text/javascript">
14
    <script type="text/javascript">
9
    /*
15
    /*
10
      function setStyle(obj, style)
16
      function setStyle(obj, style)
11
      {
17
      {
Line 80... Line 86...
80
        var map = {
86
        var map = {
81
          "gene-roddenberry's-andromeda": "andromeda",
87
          "gene-roddenberry's-andromeda": "andromeda",
82
          "battlestar-galactica-2004":    "battlestar-galactica",
88
          "battlestar-galactica-2004":    "battlestar-galactica",
83
          "battlestar-galactica-2004-de": "battlestar-galactica",
89
          "battlestar-galactica-2004-de": "battlestar-galactica",
84
          "buffy-the-vampire-slayer":     "buffy",
90
          "buffy-the-vampire-slayer":     "buffy",
-
 
91
          "lois-clark-the-new-adventures-of-superman": "lois-clark-the-new-adventures-of-superman-1993",
85
          get: function (key) {
92
          get: function (key) {
86
            return this.hasOwnProperty(key) ? this[key] : key;
93
            return this.hasOwnProperty(key) ? this[key] : key;
87
          }
94
          }
88
        };
95
        };
89
        
96
        
90
        var f = function (e) {
97
        var f = function (e) {
91
          if (e && e.shiftKey && e.ctrlKey)
98
          if (e && e.shiftKey && e.ctrlKey)
92
          {
99
          {
93
            var key = map.get(this.textContent.toLowerCase()
100
            var key = map.get(this.textContent.toLowerCase()
94
              .replace(/[,()–]/g, "").replace(/\s+/g, "-").replace("-de", ""));
101
              .replace(/[&:.,()–]/g, "").replace(/\s+/g, "-").replace("-de", ""));
95
            window.open("http://serienjunkies.org/serie/" + encodeURIComponent(key));
102
            window.open("http://serienjunkies.org/serie/" + encodeURIComponent(key));
96
            e.preventDefault();
103
            e.preventDefault();
97
          }
104
          }
98
        };
105
        };
99
106
Line 113... Line 120...
113
  <body onload="net() // editor()">
120
  <body onload="net() // editor()">
114
    <h1 class="hidden">Seri-o-meter</h1>
121
    <h1 class="hidden">Seri-o-meter</h1>
115
    <?php // var_dump($serien); ?>
122
    <?php // var_dump($serien); ?>
116
    <table>
123
    <table>
117
    <?php
124
    <?php
-
 
125
    if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
-
 
126
    {
-
 
127
      function strftime_portable ($format, $timestamp = null)
-
 
128
      {
-
 
129
        if ($timestamp === null)
-
 
130
        {
-
 
131
          $timestamp = time();
-
 
132
        }
-
 
133
        
-
 
134
        $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
-
 
135
        return strftime($format, $timestamp);
-
 
136
      }
-
 
137
    }
-
 
138
    else
-
 
139
    {
-
 
140
      function strftime_portable ($format, $timestamp = null)
-
 
141
      {
-
 
142
        if ($timestamp === null)
-
 
143
        {
-
 
144
          $timestamp = time();
-
 
145
        }
-
 
146
        
-
 
147
        return strftime($format, $timestamp);
-
 
148
      }
-
 
149
    }
-
 
150
    
118
    setlocale(LC_ALL, 'de_CH.UTF-8');
151
    setlocale(LC_ALL, 'de_CH.UTF-8');
-
 
152
    
119
    foreach ($serien as $name => &$serie)
153
    foreach ($serien as $name => &$serie)
120
    {
154
    {
121
      ?>
155
      ?>
122
      <tr>
156
      <tr>
123
        <td style="text-align: center"><?php
157
        <td style="text-align: center"><?php
Line 152... Line 186...
152
            echo implode(', ', $serie['coverage']) . ' ('. $serie['count'];
186
            echo implode(', ', $serie['coverage']) . ' ('. $serie['count'];
153
            ?> von <?php $total = $serie['total']; echo $total; ?> Episoden)<?php
187
            ?> von <?php $total = $serie['total']; echo $total; ?> Episoden)<?php
154
              if (isset($serie['last_seen']))
188
              if (isset($serie['last_seen']))
155
              {
189
              {
156
                ?>; zuletzt am <?php
190
                ?>; zuletzt am <?php
157
                echo strftime('%A, %e. %B %Y %H:%M %z', $serie['last_seen']);
191
                echo strftime_portable('%A, %e. %B %Y %H:%M %z', $serie['last_seen']);
158
              }
192
              }
159
            ?></div>
193
            ?></div>
160
          <div class="box">
194
          <div class="box">
161
            <div class="meter"
195
            <div class="meter"
162
                 style="width: <?php
196
                 style="width: <?php