class="lines-num lines-num-old"> 28 30
       <img src="{{news.better_featured_image.source_url}}" />
29 31
       <ion-card-header>
30 32
         <a [routerLink]="['../news-detail' , news.id]">

+ 7 - 4
src/app/news/news.page.scss

@@ -1,6 +1,6 @@
1
-ion-row {
2
-    background-color: #fcfcfc !important;
3
-}
1
+// ion-row {
2
+//     background-color: #fcfcfc !important;
3
+// }
4 4
 
5 5
 .list-card-margin {
6 6
     margin: 0 0 10px 0;
@@ -28,4 +28,7 @@ ion-card-content {
28 28
     color: darkslategray;
29 29
 }
30 30
 
31
-
31
+.header-tab {
32
+    background: rgb(2,0,36);
33
+background: linear-gradient(156deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 0%, rgba(7,65,158,1) 43%, rgba(4,122,195,1) 82%, rgba(0,212,255,1) 100%);
34
+}

+ 4 - 3
src/app/youtube/youtube.page.html

@@ -11,9 +11,10 @@
11 11
 <ion-content>
12 12
   <ion-grid>
13 13
     <ion-row>
14
-      <ion-col>
15
-        <h2>รายการย้อนหลัง</h2>
16
-        <hr>
14
+      <ion-col size="10" class="bg-color-4">
15
+        <h2 class="color-1">รายการย้อนหลัง</h2>
16
+      </ion-col>
17
+      <ion-col size="2" class="bg-color-6">        
17 18
       </ion-col>
18 19
     </ion-row>
19 20
   </ion-grid>

+ 3 - 3
src/app/youtube/youtube.page.scss

@@ -1,6 +1,6 @@
1
-ion-row {
2
-    background-color: #fcfcfc !important;
3
-}
1
+// ion-row {
2
+//     background-color: #fcfcfc !important;
3
+// }
4 4
 
5 5
 .list-card-margin {
6 6
     margin: 0 0 10px 0;

Файловите разлики са ограничени, защото са твърде много
+ 638 - 0
src/assets/icon/fm99-logo-2021-3.svg


BIN
src/assets/img-static/bg-content-min.jpg


+ 70 - 5
src/global.scss

@@ -86,8 +86,7 @@
86 86
 
87 87
 ion-content {
88 88
   // --ion-background-color: #111D12;
89
-  --background: url('./assets/img-static/bg-content-min.jpg') no-repeat 
90
-center/cover;
89
+  --background: url('./assets/img-static/bg-content-min.jpg') no-repeat center/cover;
91 90
 }
92 91
 
93 92
 
@@ -102,7 +101,7 @@ h2 {
102 101
   font-size: 1.3em;
103 102
   margin-top: 5px;
104 103
   margin-bottom: 0px;
105
-  color: darkorange;
104
+  // color: darkorange;
106 105
 
107 106
 }
108 107
 
@@ -111,7 +110,7 @@ h3 {
111 110
   font-size: 1.3em;
112 111
   margin-top: 5px;
113 112
   margin-bottom: 0px;
114
-  color: darkorange;
113
+  // color: darkorange;
115 114
 }
116 115
 
117 116
 .head-img {
@@ -119,6 +118,8 @@ h3 {
119 118
   display: flex;
120 119
   margin-left: 10px;
121 120
   margin-top: 5px;
121
+  // --box-shadow: 0 0 3px 0 var(--ion-color-medium);
122
+
122 123
 }
123 124
 
124 125
 // ion-toolbar {
@@ -143,4 +144,68 @@ hr {
143 144
 
144 145
 a {
145 146
   text-decoration: none;
146
-}
147
+}
148
+
149
+.bg-white {
150
+  background-color: #fff;
151
+}
152
+
153
+.bg-color-1 {
154
+  background: rgb(2,0,36);
155
+  background: linear-gradient(190deg, rgba(2,0,36,1) 0%, rgba(255,255,255,1) 0%, rgba(233,233,233,1) 61%, rgba(255,255,255,1) 90%, rgba(213,213,213,1) 100%);
156
+}
157
+
158
+.bg-color-2 {
159
+  background-color: rgb(74, 156, 224);
160
+}
161
+
162
+.bg-color-3 {
163
+  background-color: darkorange;
164
+}
165
+
166
+.bg-color-4 {
167
+  background-color: rgba(255, 255, 255, 0.3);
168
+}
169
+
170
+.bg-color-6 {
171
+  background-color:#c32020;
172
+}
173
+
174
+.color-1 {
175
+  color: #fff;
176
+}
177
+
178
+.color-2 {
179
+  color: rgb(74, 156, 224);
180
+}
181
+
182
+.color-3 {
183
+  color: darkorange;
184
+}
185
+
186
+.color-4 {
187
+  color: #0f4c75;
188
+}
189
+
190
+.color-5 {
191
+  color: #3282b8;
192
+}
193
+
194
+.color-6 {
195
+  color: #c32020;
196
+}
197
+
198
+ion-row.last-child-pad-bottom {
199
+
200
+  // padding-bottom: 15px;
201
+  // background: black;
202
+  // heading:last-child
203
+  :last-child {
204
+    // background: black;
205
+    // padding-bottom: 21px;
206
+  }
207
+}
208
+
209
+// ion-row.last-child-pad-bottom:last-child {
210
+//   background: black;
211
+// }

tum/whitesports - Gogs: Simplico Git Service

Geen omschrijving

wp-mail.php 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <?php
  2. /**
  3. * Gets the email message from the user's mailbox to add as
  4. * a WordPress post. Mailbox connection information must be
  5. * configured under Settings > Writing
  6. *
  7. * @package WordPress
  8. */
  9. /** Make sure that the WordPress bootstrap has run before continuing. */
  10. require __DIR__ . '/wp-load.php';
  11. /** This filter is documented in wp-admin/options.php */
  12. if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) {
  13. wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
  14. }
  15. $mailserver_url = get_option( 'mailserver_url' );
  16. if ( 'mail.example.com' === $mailserver_url || empty( $mailserver_url ) ) {
  17. wp_die( __( 'This action has been disabled by the administrator.' ), 403 );
  18. }
  19. /**
  20. * Fires to allow a plugin to do a complete takeover of Post by Email.
  21. *
  22. * @since 2.9.0
  23. */
  24. do_action( 'wp-mail.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
  25. /** Get the POP3 class with which to access the mailbox. */
  26. require_once ABSPATH . WPINC . '/class-pop3.php';
  27. /** Only check at this interval for new messages. */
  28. if ( ! defined( 'WP_MAIL_INTERVAL' ) ) {
  29. define( 'WP_MAIL_INTERVAL', 5 * MINUTE_IN_SECONDS );
  30. }
  31. $last_checked = get_transient( 'mailserver_last_checked' );
  32. if ( $last_checked ) {
  33. wp_die( __( 'Slow down cowboy, no need to check for new mails so often!' ) );
  34. }
  35. set_transient( 'mailserver_last_checked', true, WP_MAIL_INTERVAL );
  36. $time_difference = get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
  37. $phone_delim = '::';
  38. $pop3 = new POP3();
  39. if ( ! $pop3->connect( get_option( 'mailserver_url' ), get_option( 'mailserver_port' ) ) || ! $pop3->user( get_option( 'mailserver_login' ) ) ) {
  40. wp_die( esc_html( $pop3->ERROR ) );
  41. }
  42. $count = $pop3->pass( get_option( 'mailserver_pass' ) );
  43. if ( false === $count ) {
  44. wp_die( esc_html( $pop3->ERROR ) );
  45. }
  46. if ( 0 === $count ) {
  47. $pop3->quit();
  48. wp_die( __( 'There doesn&#8217;t seem to be any new mail.' ) );
  49. }
  50. for ( $i = 1; $i <= $count; $i++ ) {
  51. $message = $pop3->get( $i );
  52. $bodysignal = false;
  53. $boundary = '';
  54. $charset = '';
  55. $content = '';
  56. $content_type = '';
  57. $content_transfer_encoding = '';
  58. $post_author = 1;
  59. $author_found = false;
  60. foreach ( $message as $line ) {
  61. // Body signal.
  62. if ( strlen( $line ) < 3 ) {
  63. $bodysignal = true;
  64. }
  65. if ( $bodysignal ) {
  66. $content .= $line;
  67. } else {
  68. if ( preg_match( '/Content-Type: /i', $line ) ) {
  69. $content_type = trim( $line );
  70. $content_type = substr( $content_type, 14, strlen( $content_type ) - 14 );
  71. $content_type = explode( ';', $content_type );
  72. if ( ! empty( $content_type[1] ) ) {
  73. $charset = explode( '=', $content_type[1] );
  74. $charset = ( ! empty( $charset[1] ) ) ? trim( $charset[1] ) : '';
  75. }
  76. $content_type = $content_type[0];
  77. }
  78. if ( preg_match( '/Content-Transfer-Encoding: /i', $line ) ) {
  79. $content_transfer_encoding = trim( $line );
  80. $content_transfer_encoding = substr( $content_transfer_encoding, 27, strlen( $content_transfer_encoding ) - 27 );
  81. $content_transfer_encoding = explode( ';', $content_transfer_encoding );
  82. $content_transfer_encoding = $content_transfer_encoding[0];
  83. }
  84. if ( ( 'multipart/alternative' === $content_type ) && ( false !== strpos( $line, 'boundary="' ) ) && ( '' === $boundary ) ) {
  85. $boundary = trim( $line );
  86. $boundary = explode( '"', $boundary );
  87. $boundary = $boundary[1];
  88. }
  89. if ( preg_match( '/Subject: /i', $line ) ) {
  90. $subject = trim( $line );
  91. $subject = substr( $subject, 9, strlen( $subject ) - 9 );
  92. // Captures any text in the subject before $phone_delim as the subject.
  93. if ( function_exists( 'iconv_mime_decode' ) ) {
  94. $subject = iconv_mime_decode( $subject, 2, get_option( 'blog_charset' ) );
  95. } else {
  96. $subject = wp_iso_descrambler( $subject );
  97. }
  98. $subject = explode( $phone_delim, $subject );
  99. $subject = $subject[0];
  100. }
  101. /*
  102. * Set the author using the email address (From or Reply-To, the last used)
  103. * otherwise use the site admin.
  104. */
  105. if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) {
  106. if ( preg_match( '|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches ) ) {
  107. $author = $matches[0];
  108. } else {
  109. $author = trim( $line );
  110. }
  111. $author = sanitize_email( $author );
  112. if ( is_email( $author ) ) {
  113. /* translators: %s: Post author email address. */
  114. echo '<p>' . sprintf( __( 'Author is %s' ), $author ) . '</p>';
  115. $userdata = get_user_by( 'email', $author );
  116. if ( ! empty( $userdata ) ) {
  117. $post_author = $userdata->ID;
  118. $author_found = true;
  119. }
  120. }
  121. }
  122. if ( preg_match( '/Date: /i', $line ) ) { // Of the form '20 Mar 2002 20:32:37 +0100'.
  123. $ddate = str_replace( 'Date: ', '', trim( $line ) );
  124. // Remove parenthesised timezone string if it exists, as this confuses strtotime().
  125. $ddate = preg_replace( '!\s*\(.+\)\s*$!', '', $ddate );
  126. $ddate_timestamp = strtotime( $ddate );
  127. $post_date = gmdate( 'Y-m-d H:i:s', $ddate_timestamp + $time_difference );
  128. $post_date_gmt = gmdate( 'Y-m-d H:i:s', $ddate_timestamp );
  129. }
  130. }
  131. }
  132. // Set $post_status based on $author_found and on author's publish_posts capability.
  133. if ( $author_found ) {
  134. $user = new WP_User( $post_author );
  135. $post_status = ( $user->has_cap( 'publish_posts' ) ) ? 'publish' : 'pending';
  136. } else {
  137. // Author not found in DB, set status to pending. Author already set to admin.
  138. $post_status = 'pending';
  139. }
  140. $subject = trim( $subject );
  141. if ( 'multipart/alternative' === $content_type ) {
  142. $content = explode( '--' . $boundary, $content );
  143. $content = $content[2];
  144. // Match case-insensitive content-transfer-encoding.
  145. if ( preg_match( '/Content-Transfer-Encoding: quoted-printable/i', $content, $delim ) ) {
  146. $content = explode( $delim[0], $content );
  147. $content = $content[1];
  148. }
  149. $content = strip_tags( $content, '<img><p><br><i><b><u><em><strong><strike><font><span><div>' );
  150. }
  151. $content = trim( $content );
  152. /**
  153. * Filters the original content of the email.
  154. *
  155. * Give Post-By-Email extending plugins full access to the content, either
  156. * the raw content, or the content of the last quoted-printable section.
  157. *
  158. * @since 2.8.0
  159. *
  160. * @param string $content The original email content.
  161. */
  162. $content = apply_filters( 'wp_mail_original_content', $content );
  163. if ( false !== stripos( $content_transfer_encoding, 'quoted-printable' ) ) {
  164. $content = quoted_printable_decode( $content );
  165. }
  166. if ( function_exists( 'iconv' ) && ! empty( $charset ) ) {
  167. $content = iconv( $charset, get_option( 'blog_charset' ), $content );
  168. }
  169. // Captures any text in the body after $phone_delim as the body.
  170. $content = explode( $phone_delim, $content );
  171. $content = empty( $content[1] ) ? $content[0] : $content[1];
  172. $content = trim( $content );
  173. /**
  174. * Filters the content of the post submitted by email before saving.
  175. *
  176. * @since 1.2.0
  177. *
  178. * @param string $content The email content.
  179. */
  180. $post_content = apply_filters( 'phone_content', $content );
  181. $post_title = xmlrpc_getposttitle( $content );
  182. if ( '' === trim( $post_title ) ) {
  183. $post_title = $subject;
  184. }
  185. $post_category = array( get_option( 'default_email_category' ) );
  186. $post_data = compact( 'post_content', 'post_title', 'post_date', 'post_date_gmt', 'post_author', 'post_category', 'post_status' );
  187. $post_data = wp_slash( $post_data );
  188. $post_ID = wp_insert_post( $post_data );
  189. if ( is_wp_error( $post_ID ) ) {
  190. echo "\n" . $post_ID->get_error_message();
  191. }
  192. // We couldn't post, for whatever reason. Better move forward to the next email.
  193. if ( empty( $post_ID ) ) {
  194. continue;
  195. }
  196. /**
  197. * Fires after a post submitted by email is published.
  198. *
  199. * @since 1.2.0
  200. *
  201. * @param int $post_ID The post ID.
  202. */
  203. do_action( 'publish_phone', $post_ID );
  204. echo "\n<p><strong>" . __( 'Author:' ) . '</strong> ' . esc_html( $post_author ) . '</p>';
  205. echo "\n<p><strong>" . __( 'Posted title:' ) . '</strong> ' . esc_html( $post_title ) . '</p>';
  206. if ( ! $pop3->delete( $i ) ) {
  207. echo '<p>' . sprintf(
  208. /* translators: %s: POP3 error. */
  209. __( 'Oops: %s' ),
  210. esc_html( $pop3->ERROR )
  211. ) . '</p>';
  212. $pop3->reset();
  213. exit;
  214. } else {
  215. echo '<p>' . sprintf(
  216. /* translators: %s: The message ID. */
  217. __( 'Mission complete. Message %s deleted.' ),
  218. '<strong>' . $i . '</strong>'
  219. ) . '</p>';
  220. }
  221. }
  222. $pop3->quit();