@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Footer of the admin area |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @author Matteo Scaramuccia <[email protected]> |
|
15 | - * @copyright 2003-2015 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2003-02-26 |
|
19 | - */ |
|
3 | + * Footer of the admin area |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @author Matteo Scaramuccia <[email protected]> |
|
15 | + * @copyright 2003-2015 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2003-02-26 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | <footer> |
37 | 37 | <div class="container-fluid"> |
38 | 38 | <div class="row"> |
39 | - <form action="index.php<?php print (isset($action) ? '?action=' . $action : ''); ?>" method="post" class="pull-right" accept-charset="utf-8"> |
|
39 | + <form action="index.php<?php print (isset($action) ? '?action='.$action : ''); ?>" method="post" class="pull-right" accept-charset="utf-8"> |
|
40 | 40 | <?php print PMF_Language::selectLanguages($LANGCODE, true); ?> |
41 | 41 | </form> |
42 | 42 | </div> |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | ?> |
62 | 62 | <iframe id="keepPMFSessionAlive" src="session.keepalive.php?lang=<?php print $LANGCODE; ?>" style="border: none;" width="0" height="0"></iframe> |
63 | 63 | <?php |
64 | - if (isset($auth) && (('takequestion' == $action) || ('editentry' == $action) || ('editpreview' == $action) || |
|
65 | - ('addnews' == $action) || ('editnews' == $action) || ('copyentry' == $action))) { |
|
64 | + if (isset($auth) && (('takequestion' == $action) || ('editentry' == $action) || ('editpreview' == $action) || |
|
65 | + ('addnews' == $action) || ('editnews' == $action) || ('copyentry' == $action))) { |
|
66 | 66 | |
67 | 67 | if ($faqConfig->get('main.enableWysiwygEditor') == true) { |
68 | 68 |
@@ -161,9 +161,12 @@ |
||
161 | 161 | // Submit the form by an ajax request |
162 | 162 | <?php if (isset($faqData['id']) && $faqData['id'] == 0): ?> |
163 | 163 | var data = {action: "ajax", ajax: 'recordAdd'}; |
164 | - <?php else: ?> |
|
164 | + <?php else { |
|
165 | + : ?> |
|
165 | 166 | var data = {action: "ajax", ajax: 'recordSave'}; |
166 | - <?php endif; ?> |
|
167 | + <?php endif; |
|
168 | +} |
|
169 | +?> |
|
167 | 170 | var id = $('#answer')[0].parentNode.parentNode.id; |
168 | 171 | $.each($('#' + id).serializeArray(), function(i, field) { |
169 | 172 | data[field.name] = field.value; |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * AJAX: handling of Ajax configuration calls |
|
4 | - * |
|
5 | - * PHP 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @author Thorsten Rinne <[email protected]> |
|
15 | - * @copyright 2009-2015 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2009-04-01 |
|
19 | - */ |
|
3 | + * AJAX: handling of Ajax configuration calls |
|
4 | + * |
|
5 | + * PHP 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @author Thorsten Rinne <[email protected]> |
|
15 | + * @copyright 2009-2015 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2009-04-01 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ') || !$permission['editconfig']) { |
22 | 22 | header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $password = PMF_Filter::filterInput(INPUT_GET, 'password', FILTER_SANITIZE_STRING); |
46 | 46 | |
47 | 47 | $data = array( |
48 | - 'url' => 'http://' . $url . '.' . $_SERVER['SERVER_NAME'], |
|
48 | + 'url' => 'http://'.$url.'.'.$_SERVER['SERVER_NAME'], |
|
49 | 49 | 'instance' => $instance, |
50 | 50 | 'comment' => $comment |
51 | 51 | ); |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | |
62 | 62 | if ($faqInstanceClient->createClientFolder($hostname)) { |
63 | 63 | |
64 | - $clientDir = PMF_ROOT_DIR . '/multisite/' . $hostname; |
|
64 | + $clientDir = PMF_ROOT_DIR.'/multisite/'.$hostname; |
|
65 | 65 | $clientSetup = new PMF_Instance_Setup(); |
66 | 66 | $clientSetup->setRootDir($clientDir); |
67 | 67 | |
68 | - $faqInstanceClient->copyConstantsFile($clientDir . '/constants.php'); |
|
69 | - $faqInstanceClient->copyLdapConstantsFile($clientDir . '/constants_ldap.php'); |
|
68 | + $faqInstanceClient->copyConstantsFile($clientDir.'/constants.php'); |
|
69 | + $faqInstanceClient->copyLdapConstantsFile($clientDir.'/constants_ldap.php'); |
|
70 | 70 | |
71 | 71 | $dbSetup = array( |
72 | 72 | 'dbServer' => $DB['server'], |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ); |
79 | 79 | $clientSetup->createDatabaseFile($dbSetup, ''); |
80 | 80 | |
81 | - $faqInstanceClient->setClientUrl('http://' . $hostname); |
|
81 | + $faqInstanceClient->setClientUrl('http://'.$hostname); |
|
82 | 82 | $faqInstanceClient->createClientTables($dbSetup['dbPrefix']); |
83 | 83 | |
84 | 84 | PMF_Db::setTablePrefix($dbSetup['dbPrefix']); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $stopwords->setLanguage($stopwordsLang); |
169 | 169 | if (null !== $stopwordId && -1 < $stopwordId) { |
170 | 170 | echo $stopwords->update($stopwordId, $stopword); |
171 | - } elseif (!$stopwords->match($stopword)){ |
|
171 | + } elseif (!$stopwords->match($stopword)) { |
|
172 | 172 | echo $stopwords->add($stopword); |
173 | 173 | } else { |
174 | 174 |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
@@ -30,15 +30,15 @@ discard block |
||
30 | 30 | |
31 | 31 | $perpage = 50; |
32 | 32 | $day = PMF_Filter::filterInput(INPUT_POST, 'day', FILTER_VALIDATE_INT); |
33 | - $firstHour = mktime (0, 0, 0, date('m', $day), date('d', $day), date('Y', $day)); |
|
34 | - $lastHour = mktime (23, 59, 59, date('m', $day), date('d', $day), date('Y', $day)); |
|
33 | + $firstHour = mktime(0, 0, 0, date('m', $day), date('d', $day), date('Y', $day)); |
|
34 | + $lastHour = mktime(23, 59, 59, date('m', $day), date('d', $day), date('Y', $day)); |
|
35 | 35 | |
36 | 36 | $session = new PMF_Session($faqConfig); |
37 | 37 | $sessiondata = $session->getSessionsbyDate($firstHour, $lastHour); |
38 | 38 | $date = new PMF_Date($faqConfig); |
39 | 39 | ?> |
40 | 40 | <header> |
41 | - <h2><i class="icon-tasks"></i> <?php echo $PMF_LANG['ad_sess_session'] . ' ' . date("Y-m-d", $day); ?></h2> |
|
41 | + <h2><i class="icon-tasks"></i> <?php echo $PMF_LANG['ad_sess_session'].' '.date("Y-m-d", $day); ?></h2> |
|
42 | 42 | </header> |
43 | 43 | |
44 | 44 | <table class="table table-striped"> |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Sessionbrowser |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2003-2015 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2003-02-24 |
|
18 | - */ |
|
3 | + * Sessionbrowser |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2003-2015 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2003-02-24 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -19,16 +19,16 @@ |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
29 | 29 | $ajaxAction = PMF_Filter::filterInput(INPUT_GET, 'ajaxaction', FILTER_SANITIZE_STRING); |
30 | 30 | |
31 | -switch($ajaxAction) { |
|
31 | +switch ($ajaxAction) { |
|
32 | 32 | |
33 | 33 | case 'getpermissions': |
34 | 34 |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if (is_string($val)) { |
42 | 42 | $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val); |
43 | 43 | $val = str_replace("'", "\\'", $val); |
44 | - $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"] = $val; |
|
44 | + $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"] = $val; |
|
45 | 45 | } elseif (is_array($val)) { |
46 | 46 | /** |
47 | 47 | * Here we deal with a two dimensional array |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | |
57 | 57 | foreach ((array)@$_POST['LANG_CONF'] as $key => $val) { |
58 | 58 | // if string like array(blah-blah-blah), extract the contents inside the brackets |
59 | - if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/',$val,$matches1)) { |
|
59 | + if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/', $val, $matches1)) { |
|
60 | 60 | // split the resulting string of delimiters such as "number =>" |
61 | 61 | $valArr = preg_split( |
62 | 62 | '/\s*(\d+)\s*\=\>\s*/', |
63 | 63 | $matches1[1], |
64 | 64 | null, |
65 | - PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY |
|
65 | + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |
|
66 | 66 | ); |
67 | 67 | // in an array $valArr contents like "number substring", "substring", "number substring", "substring", ... |
68 | 68 | $numVal = count($valArr); |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | } |
82 | 82 | } |
83 | 83 | } |
84 | - $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ",$newValArr).')'; |
|
84 | + $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ", $newValArr).')'; |
|
85 | 85 | } |
86 | 86 | } else { // compatibility for old behavior |
87 | 87 | $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val); |
88 | 88 | $val = str_replace("'", "\\'", $val); |
89 | - $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = $val; |
|
89 | + $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = $val; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | $lang = strtolower($_SESSION['trans']['rightVarsOnly']["PMF_LANG[metaLanguage]"]); |
104 | - $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php"; |
|
104 | + $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php"; |
|
105 | 105 | |
106 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
106 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
107 | 107 | print 0; |
108 | 108 | exit; |
109 | 109 | } |
110 | 110 | |
111 | - if (!copy($filename, PMF_ROOT_DIR . "/lang/language_" . $lang . ".bak.php")) { |
|
111 | + if (!copy($filename, PMF_ROOT_DIR."/lang/language_".$lang.".bak.php")) { |
|
112 | 112 | print 0; |
113 | 113 | exit; |
114 | 114 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | if (0 === strpos($key, 'PMF_LANG')) { |
131 | 131 | $val = "'$val'"; |
132 | 132 | } |
133 | - array_push($tmpLines, '$' . str_replace(array('[', ']'), array("['", "']"), $key) . " = $val;"); |
|
133 | + array_push($tmpLines, '$'.str_replace(array('[', ']'), array("['", "']"), $key)." = $val;"); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | $newFileContents .= implode("\n", $tmpLines); |
@@ -150,17 +150,17 @@ discard block |
||
150 | 150 | |
151 | 151 | $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING); |
152 | 152 | |
153 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
153 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
154 | 154 | print 0; |
155 | 155 | exit; |
156 | 156 | } |
157 | 157 | |
158 | - if (!copy(PMF_ROOT_DIR . "/lang/language_$lang.php", PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) { |
|
158 | + if (!copy(PMF_ROOT_DIR."/lang/language_$lang.php", PMF_ROOT_DIR."/lang/language_$lang.bak.php")) { |
|
159 | 159 | print 0; |
160 | 160 | exit; |
161 | 161 | } |
162 | 162 | |
163 | - if (!unlink(PMF_ROOT_DIR . "/lang/language_$lang.php")) { |
|
163 | + if (!unlink(PMF_ROOT_DIR."/lang/language_$lang.php")) { |
|
164 | 164 | print 0; |
165 | 165 | exit; |
166 | 166 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | exit; |
176 | 176 | } |
177 | 177 | |
178 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
178 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
179 | 179 | print 0; |
180 | 180 | exit; |
181 | 181 | } |
@@ -184,17 +184,17 @@ discard block |
||
184 | 184 | $langName = @$languageCodes[$langCode]; |
185 | 185 | $langCharset = "UTF-8"; |
186 | 186 | $langDir = PMF_Filter::filterInput(INPUT_POST, 'langdir', FILTER_SANITIZE_STRING); |
187 | - $langNPlurals= strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1)); |
|
187 | + $langNPlurals = strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1)); |
|
188 | 188 | $langDesc = PMF_Filter::filterInput(INPUT_POST, 'langdesc', FILTER_SANITIZE_STRING); |
189 | - $author = (array) @$_POST['author']; |
|
189 | + $author = (array)@$_POST['author']; |
|
190 | 190 | |
191 | - if(empty($langCode) || empty($langName) || empty($langCharset) || |
|
191 | + if (empty($langCode) || empty($langName) || empty($langCharset) || |
|
192 | 192 | empty($langDir) || empty($langDesc) || empty($author)) { |
193 | 193 | print 0; |
194 | 194 | exit; |
195 | 195 | } |
196 | 196 | |
197 | - $fileTpl = <<<FILE |
|
197 | + $fileTpl = <<<FILE |
|
198 | 198 | <?php |
199 | 199 | /** |
200 | 200 | * %s |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'), |
229 | 229 | $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
230 | 230 | |
231 | - $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl); |
|
231 | + $retval = @file_put_contents(PMF_ROOT_DIR.'/lang/language_'.strtolower($langCode).'.php', $fileTpl); |
|
232 | 232 | print intval($retval); |
233 | 233 | break; |
234 | 234 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | case 'send_translated_file': |
237 | 237 | |
238 | 238 | $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING); |
239 | - $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php"; |
|
239 | + $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php"; |
|
240 | 240 | |
241 | 241 | if (!file_exists($filename)) { |
242 | 242 | print 0; |
@@ -255,6 +255,6 @@ discard block |
||
255 | 255 | $mail->addTo('[email protected]'); |
256 | 256 | $mail->addAttachment($filename, null, 'text/plain'); |
257 | 257 | |
258 | - print (int) $mail->send(); |
|
258 | + print (int)$mail->send(); |
|
259 | 259 | break; |
260 | 260 | } |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Handle ajax requests for the interface translation tool |
|
4 | - * |
|
5 | - * PHP 5.2 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Anatoliy Belsky <[email protected]> |
|
14 | - * @author Alexander Melnik <[email protected]> |
|
15 | - * @copyright 2009-2015 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2009-05-12 |
|
19 | - */ |
|
3 | + * Handle ajax requests for the interface translation tool |
|
4 | + * |
|
5 | + * PHP 5.2 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Anatoliy Belsky <[email protected]> |
|
14 | + * @author Alexander Melnik <[email protected]> |
|
15 | + * @copyright 2009-2015 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2009-05-12 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'), |
229 | - $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
|
229 | + $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
|
230 | 230 | |
231 | 231 | $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl); |
232 | 232 | print intval($retval); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 | |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $newsHeader = $news->getNewsHeader(); |
181 | 181 | $date = new PMF_Date($faqConfig); |
182 | 182 | if (count($newsHeader)) { |
183 | - foreach($newsHeader as $newsItem) { |
|
183 | + foreach ($newsHeader as $newsItem) { |
|
184 | 184 | ?> |
185 | 185 | <tr> |
186 | 186 | <td><?php echo $newsItem['header']; ?></td> |
@@ -366,8 +366,8 @@ discard block |
||
366 | 366 | <?php print($item['user']); ?> |
367 | 367 | </a>:<br> |
368 | 368 | <?php print($item['content']); ?><br> |
369 | - <?php print($PMF_LANG['newsCommentDate'] . PMF_Date::createIsoDate($item['date'], 'Y-m-d H:i', false)); ?> |
|
370 | - <a href="?action=delcomment&artid=<?php print($newsId); ?>&cmtid=<?php print($item['id']); ?>&type=<?php print(PMF_Comment::COMMENT_TYPE_NEWS);?>"> |
|
369 | + <?php print($PMF_LANG['newsCommentDate'].PMF_Date::createIsoDate($item['date'], 'Y-m-d H:i', false)); ?> |
|
370 | + <a href="?action=delcomment&artid=<?php print($newsId); ?>&cmtid=<?php print($item['id']); ?>&type=<?php print(PMF_Comment::COMMENT_TYPE_NEWS); ?>"> |
|
371 | 371 | <img src="images/delete.gif" alt="<?php echo $PMF_LANG["ad_entry_delete"] ?>" title="<?php echo $PMF_LANG["ad_entry_delete"] ?>" border="0" width="17" height="18" align="right"> |
372 | 372 | </a> |
373 | 373 | </div> |
@@ -400,8 +400,8 @@ discard block |
||
400 | 400 | 'authorEmail' => $email, |
401 | 401 | 'active' => (is_null($active)) ? 'n' : 'y', |
402 | 402 | 'comment' => (is_null($comment)) ? 'n' : 'y', |
403 | - 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000', |
|
404 | - 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959', |
|
403 | + 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart).'000000', |
|
404 | + 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959', |
|
405 | 405 | 'link' => $link, |
406 | 406 | 'linkTitle' => $linktitle, |
407 | 407 | 'date' => date('YmdHis'), |
@@ -441,8 +441,8 @@ discard block |
||
441 | 441 | 'authorEmail' => $email, |
442 | 442 | 'active' => (is_null($active)) ? 'n' : 'y', |
443 | 443 | 'comment' => (is_null($comment)) ? 'n' : 'y', |
444 | - 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000', |
|
445 | - 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959', |
|
444 | + 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart).'000000', |
|
445 | + 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959', |
|
446 | 446 | 'link' => $link, |
447 | 447 | 'linkTitle' => $linktitle, |
448 | 448 | 'date' => date('YmdHis'), |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main administration file for the news. |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @author Matteo Scaramuccia <[email protected]> |
|
15 | - * @copyright 2003-2015 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2003-02-23 |
|
19 | - */ |
|
3 | + * The main administration file for the news. |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @author Matteo Scaramuccia <[email protected]> |
|
15 | + * @copyright 2003-2015 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2003-02-23 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Cuts out a category |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | - * |
|
11 | - * @category phpMyFAQ |
|
12 | - * @package Administration |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2003-2015 phpMyFAQ Team |
|
15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | - * @link http://www.phpmyfaq.de |
|
17 | - * @since 2003-12-25 |
|
18 | - */ |
|
3 | + * Cuts out a category |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
10 | + * |
|
11 | + * @category phpMyFAQ |
|
12 | + * @package Administration |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2003-2015 phpMyFAQ Team |
|
15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
16 | + * @link http://www.phpmyfaq.de |
|
17 | + * @since 2003-12-25 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
29 | -$page = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1); |
|
29 | +$page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
|
30 | 30 | |
31 | 31 | $glossary = new PMF_Glossary($faqConfig); |
32 | 32 | $glossaryItems = $glossary->getAllGlossaryItems(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (0 < $numItems) { |
52 | 52 | |
53 | 53 | $output = array(); |
54 | - $visibleItems = array_slice($glossaryItems, ($page - 1) * $itemsPerPage, $itemsPerPage); |
|
54 | + $visibleItems = array_slice($glossaryItems, ($page - 1)*$itemsPerPage, $itemsPerPage); |
|
55 | 55 | |
56 | 56 | foreach ($visibleItems as $item) { |
57 | 57 | $output['item'][] = $item['item']; |
@@ -19,24 +19,24 @@ |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
29 | 29 | if (is_null($error)) { |
30 | - $loginMessage = '<p>' . $PMF_LANG['ad_auth_insert'] . '</p>'; |
|
30 | + $loginMessage = '<p>'.$PMF_LANG['ad_auth_insert'].'</p>'; |
|
31 | 31 | } else { |
32 | - $loginMessage = '<p class="alert alert-error">' . $error . '</p>'; |
|
32 | + $loginMessage = '<p class="alert alert-error">'.$error.'</p>'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $tpl->parse( |
36 | 36 | 'writeContent', |
37 | 37 | array( |
38 | - 'registerUser' => '<a href="?action=register">' . $PMF_LANG['msgRegistration'] . '</a>', |
|
39 | - 'sendPassword' => '<a href="?action=password">' . $PMF_LANG['lostPassword'] . '</a>', |
|
38 | + 'registerUser' => '<a href="?action=register">'.$PMF_LANG['msgRegistration'].'</a>', |
|
39 | + 'sendPassword' => '<a href="?action=password">'.$PMF_LANG['lostPassword'].'</a>', |
|
40 | 40 | 'loginHeader' => $PMF_LANG['msgLoginUser'], |
41 | 41 | 'loginMessage' => $loginMessage, |
42 | 42 | 'writeLoginPath' => $faqSystem->getSystemUri($faqConfig), |