瀏覽代碼

Aded Contact Page

Thomas Buck 11 年之前
父節點
當前提交
c7d48a0cbe
共有 5 個檔案被更改,包括 109 行新增6 行删除
  1. 1
    1
      BaconBarHelper/BaconBarHelper-Info.plist
  2. 1
    1
      RedditBar/BaconBar-Info.plist
  3. 95
    0
      web/contact.php
  4. 4
    4
      web/index.html
  5. 8
    0
      web/style.css

+ 1
- 1
BaconBarHelper/BaconBarHelper-Info.plist 查看文件

@@ -21,7 +21,7 @@
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>42</string>
24
+	<string>43</string>
25 25
 	<key>LSBackgroundOnly</key>
26 26
 	<true/>
27 27
 	<key>LSMinimumSystemVersion</key>

+ 1
- 1
RedditBar/BaconBar-Info.plist 查看文件

@@ -21,7 +21,7 @@
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>390</string>
24
+	<string>391</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>

+ 95
- 0
web/contact.php 查看文件

@@ -0,0 +1,95 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+    <head>
4
+        <meta charset="utf-8">
5
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+        <meta name="description" content="BaconBar Mac App">
7
+        <meta name="author" content="Thomas Buck">
8
+        <title>BaconBar - Contact Developer</title>
9
+        <link rel="shortcut icon" href="favicon.png">
10
+        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
11
+        <link rel="stylesheet" href="style.css">
12
+    </head>
13
+    <body>
14
+        <div id="out" class="container">
15
+            <a name="top"></a>
16
+            <div class="header">
17
+                <ul class="nav nav-pills pull-right">
18
+                    <li><a href="index.html">BaconBar</a></li>
19
+                    <li class="active"><a href="#">Contact</a></li>
20
+                </ul>
21
+                <h1>BaconBar</h1>
22
+            </div>
23
+<?php
24
+if ($_SERVER['REQUEST_METHOD'] == "POST") {
25
+    $email = $_POST['mail'];
26
+    $subject = $_POST['subject'];
27
+    $message = $_POST['message'];
28
+    if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
29
+?>
30
+                <div class="alert alert-warning">Please enter a valid E-Mail Address!</div>
31
+<?php
32
+    } else {
33
+        $message = wordwrap($message, 70);
34
+        $mailheader = "From: $email\r\nReply-To: $email\r\n";
35
+        if (mail("xythobuz@xythobuz.de", $subject, $message, $mailheader)) {
36
+?>
37
+            <div class="alert alert-success">Your message has been sent!</div>
38
+<?php
39
+        } else {
40
+?>
41
+            <div class="alert alert-danger">Your message couldn't be sent! Sorry :(</div>
42
+<?php
43
+        }
44
+    }
45
+?>
46
+                <div class="alert alert-info"><a href="javascript:history.back()">Go Back</a></div>
47
+<?php
48
+} else {
49
+?>
50
+            <p>
51
+                You can contact me using my personal E-Mail Address
52
+                <a href='&#109;ailto&#58;xyt&#104;o&#98;uz&#64;xy&#116;%&#54;8ob&#117;%7A&#46;&#100;e'>
53
+                    &lt;xy&#116;hobuz&#64;xyt&#104;obuz&#46;de&gt;
54
+                </a>
55
+                or with the following Contact Form.
56
+            </p>
57
+
58
+            <form action="contact.php" method="POST">
59
+                <fieldset>
60
+                    <legend>
61
+                        Contact BaconBar Developer
62
+                    </legend>
63
+                    <label>
64
+                        E-Mail Address
65
+                        <input type="email" name="mail" class="form-control" placeholder="john.doe@example.com" required>
66
+                    </label>
67
+                    <br>
68
+                    <label>
69
+                        Subject
70
+                        <input type="text" name="subject" class="form-control" required>
71
+                    </label>
72
+                    <br>
73
+                    <label>
74
+                        Message
75
+                        <textarea name="message" class="form-control" rows="10" required></textarea>
76
+                    </label>
77
+                    <br>
78
+                    <label>
79
+                        <input type="submit" value="Send mail!" class="btn btn-success pull-right butt">
80
+                    </label>
81
+                </fieldset>
82
+            </form>
83
+<?php
84
+}
85
+?>
86
+            <div class="footer">
87
+                <span>&copy; 2013 <a href="//xythobuz.de">Thomas Buck</a></span>
88
+                <span class="pull-right">Made with <a href="//getbootstrap.com">Bootstrap</a></span>
89
+            </div>
90
+        </div>
91
+    <img src="//xythobuz.de/stats/count.php?img" alt="Analytics">
92
+    <script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
93
+    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
94
+    </body>
95
+</html>

+ 4
- 4
web/index.html 查看文件

@@ -15,8 +15,8 @@
15 15
             <a name="top"></a>
16 16
             <div class="header">
17 17
                 <ul class="nav nav-pills pull-right">
18
-                    <li><a href="mai&#108;to&#58;%78%79th%6Fbuz&#64;x%&#55;9t%&#54;8ob&#37;75z%2&#69;d&#101;">Contact</a></li>
19
-                    <li><a href="#changelog">Changelog</a></li>
18
+                    <li class="active"><a href="#">BaconBar</a></li>
19
+                    <li><a href="contact.php">Contact</a></li>
20 20
                 </ul>
21 21
                 <h1>BaconBar</h1>
22 22
             </div>
@@ -69,8 +69,8 @@
69 69
                 </div>
70 70
                 <div class="panel-body">
71 71
                     <ul>
72
-                        <li>Can open BaconBar on login</li>
73
-                        <li>When saving new Preferences, the list is only reloaded if needed</li>
72
+                        <li>New Preference: Can open BaconBar on login</li>
73
+                        <li>When saving changed preferences, the list is only reloaded if needed</li>
74 74
                     </ul>
75 75
                 </div>
76 76
             </div>

+ 8
- 0
web/style.css 查看文件

@@ -106,3 +106,11 @@ body {
106 106
     margin-bottom: 40px;
107 107
     text-align: center;
108 108
 }
109
+
110
+label {
111
+    width: 100%;
112
+}
113
+
114
+.butt {
115
+    width: 12em;
116
+}

Loading…
取消
儲存