소스 검색

-fixing stuff

pull/1/head
Marcel Völkel 7 년 전
부모
커밋
050aed1f93

+ 4
- 2
Application/scf/Additionals/Download.php 파일 보기

@@ -52,6 +52,10 @@ class Download
52 52
         $this->absolutePath = $absolutePath;
53 53
     }
54 54
 
55
+    /**
56
+     * Download Control. Starts Downloads with the selected File in $tmpFile
57
+     * Absolute Path must be given!
58
+     */
55 59
     public function startDownloadFile()
56 60
     {
57 61
         $tmpPath = $this->getAbsolutePath();
@@ -73,6 +77,4 @@ class Download
73 77
         fclose($fh);
74 78
 
75 79
     }
76
-
77
-//TODO: Finishing Download Class to generate correct Downloads for Page!
78 80
 }

+ 26
- 1
Application/scf/Additionals/Tracking.php 파일 보기

@@ -6,17 +6,35 @@ use SCF\Core\Database;
6 6
 
7 7
 class Tracking
8 8
 {
9
-
9
+    /**
10
+     * @var Database
11
+     */
10 12
     private $_db;
11 13
 
14
+    /**
15
+     * @var string
16
+     */
12 17
     private $currentUserIp;
13 18
 
19
+    /**
20
+     * @var string
21
+     */
14 22
     private $currentUserAgent;
15 23
 
24
+    /**
25
+     * @var string
26
+     */
16 27
     private $currentUserReferer;
17 28
 
29
+    /**
30
+     * @var string
31
+     */
18 32
     private $trackingTarget;
19 33
 
34
+    /**
35
+     * Tracking constructor.
36
+     * @param Database $db
37
+     */
20 38
     public function __construct(Database $db)
21 39
     {
22 40
         $this->_db = $db;
@@ -70,6 +88,9 @@ class Tracking
70 88
         return $this->currentUserReferer;
71 89
     }
72 90
 
91
+    /**
92
+     * Check Users to track them only once a day
93
+     */
73 94
     public function checkUniqueUser()
74 95
     {
75 96
         $this->_db->query("SELECT ip_adress, `timestamp` FROM sks_unique_user WHERE ip_adress = '{$this->getCurrentUserIp()}' ORDER BY `timestamp` DESC LIMIT 1");
@@ -108,6 +129,10 @@ class Tracking
108 129
         return $this->trackingTarget;
109 130
     }
110 131
 
132
+    /**
133
+     * @param $target
134
+     * @param $dlVersion
135
+     */
111 136
     public function saveTrackingInDb($target, $dlVersion)
112 137
     {
113 138
         $tmpTarget = $target;

+ 0
- 3
Application/templates/sternenkindsaga/errorpages/404.tpl 파일 보기

@@ -10,7 +10,4 @@
10 10
         <div class="clearfix"></div>
11 11
     </div>
12 12
 </div>
13
-
14
-
15
-
16 13
 {include file="footer.tpl"}

+ 1
- 1
Application/templates/sternenkindsaga/misc/facebook.tpl 파일 보기

@@ -1,5 +1,5 @@
1 1
 <div id="fb-root"></div>
2
-<script>(function (d, s, id) {
2
+<script type="text/javascript">(function (d, s, id) {
3 3
         var js, fjs = d.getElementsByTagName(s)[0];
4 4
         if (d.getElementById(id)) return;
5 5
         js = d.createElement(s);

+ 0
- 3
bootstrap.php 파일 보기

@@ -44,8 +44,5 @@ $di->set('router', 'AltoRouter', true);
44 44
 $di->set('tracking', new Tracking(DI::getInstance()->get('db')), true);
45 45
 
46 46
 $settings = new System(DI::getInstance()->get('db'));
47
-
48 47
 $router = DI::getInstance()->get('router');
49
-
50
-
51 48
 $tpl = new Templates($settings,$router);

+ 5
- 6
web/Styles/css/sks-v2.css 파일 보기

@@ -7,8 +7,8 @@ body {
7 7
 
8 8
 header {
9 9
     max-width: 800px;
10
-    margin: 20px auto 0px auto;
11
-    box-shadow: 0px 5px 10px #000;
10
+    margin: 20px auto 0 auto;
11
+    box-shadow: 0 5px 10px #000;
12 12
 }
13 13
 
14 14
 footer {
@@ -20,7 +20,7 @@ footer {
20 20
     border-top: 2px solid #e79b1f;
21 21
     background: url("../images/bg.png");
22 22
     background-position: top left;
23
-    box-shadow: 0px -5px 10px #000000;
23
+    box-shadow: 0 -5px 10px #000000;
24 24
 }
25 25
 
26 26
 a {
@@ -39,7 +39,7 @@ a:hover {
39 39
 }
40 40
 
41 41
 .mediaLinks {
42
-    margin: 10px auto 0px auto;
42
+    margin: 10px auto 0 auto;
43 43
     float: right;
44 44
 }
45 45
 
@@ -50,7 +50,6 @@ a:hover {
50 50
 }
51 51
 
52 52
 .row-width {
53
-
54 53
     width: 95%;
55 54
     max-width: 800px;
56 55
     margin: 20px auto 10px auto;
@@ -104,7 +103,7 @@ a:hover {
104 103
     background: linear-gradient(#1f1a16, #4d3c32);
105 104
     padding: 10px;
106 105
 
107
-    box-shadow: 0px 5px 10px #000000;
106
+    box-shadow: 0 5px 10px #000000;
108 107
     -webkit-border-radius: 5px;
109 108
     -moz-border-radius: 5px;
110 109
     border-radius: 5px;

+ 0
- 2
web/index.php 파일 보기

@@ -22,14 +22,12 @@ $tracking->setCurrentUserAgent($_SERVER['HTTP_USER_AGENT']);
22 22
 $tracking->setCurrentUserReferer($userReferer);
23 23
 $tracking->checkUniqueUser();
24 24
 if($match === false) {
25
-    var_dump($match);
26 25
     $tpl->display('errorpages/404.tpl');
27 26
 }
28 27
 else {
29 28
     try {
30 29
         require $match['target'];
31 30
     } catch(Exception $e) {
32
-        echo '3';
33 31
         return $e->getMessage();
34 32
     }
35 33
 }

Loading…
취소
저장