@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | // |
32 | 32 | // Bootstrapping |
33 | 33 | // |
34 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
35 | -require PMF_ROOT_DIR . '/lang/language_en.php'; |
|
34 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
35 | +require PMF_ROOT_DIR.'/lang/language_en.php'; |
|
36 | 36 | |
37 | 37 | // |
38 | 38 | // Get language (default: english) |
39 | 39 | // |
40 | 40 | $language = PMF_Filter::filterInput(INPUT_GET, 'lang', FILTER_SANITIZE_STRING); |
41 | 41 | if (!is_null($language) && PMF_Language::isASupportedLanguage($language)) { |
42 | - require PMF_ROOT_DIR . '/lang/language_' . $language . '.php'; |
|
42 | + require PMF_ROOT_DIR.'/lang/language_'.$language.'.php'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | // |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | PMF_String::init($language); |
49 | 49 | |
50 | 50 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
51 | -if (! $user instanceof PMF_User_CurrentUser) { |
|
51 | +if (!$user instanceof PMF_User_CurrentUser) { |
|
52 | 52 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
53 | 53 | } |
54 | -$refreshTime = (PMF_AUTH_TIMEOUT - PMF_AUTH_TIMEOUT_WARNING) * 60; |
|
54 | +$refreshTime = (PMF_AUTH_TIMEOUT - PMF_AUTH_TIMEOUT_WARNING)*60; |
|
55 | 55 | ?> |
56 | 56 | <!DOCTYPE html> |
57 | 57 | <html lang="<?php print $PMF_LANG['metaLanguage']; ?>" class="no-js"> |
@@ -1,25 +1,25 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * A dummy page used within an IFRAME for warning the user about his next |
|
4 | - * session expiration and to give him the contextual possibility for |
|
5 | - * refreshing the session by clicking <OK> |
|
6 | - * |
|
7 | - * PHP Version 5.3 |
|
8 | - * |
|
9 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
10 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
11 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
12 | - * |
|
13 | - * @category phpMyFAQ |
|
14 | - * @package Administration |
|
15 | - * @author Matteo Scaramuccia <[email protected]> |
|
16 | - * @author Thorsten Rinne <[email protected]> |
|
17 | - * @author Uwe Pries <[email protected]> |
|
18 | - * @copyright 2006-2016 phpMyFAQ Team |
|
19 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
20 | - * @link http://www.phpmyfaq.de |
|
21 | - * @since 2006-05-08 |
|
22 | - */ |
|
3 | + * A dummy page used within an IFRAME for warning the user about his next |
|
4 | + * session expiration and to give him the contextual possibility for |
|
5 | + * refreshing the session by clicking <OK> |
|
6 | + * |
|
7 | + * PHP Version 5.3 |
|
8 | + * |
|
9 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
10 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
11 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
12 | + * |
|
13 | + * @category phpMyFAQ |
|
14 | + * @package Administration |
|
15 | + * @author Matteo Scaramuccia <[email protected]> |
|
16 | + * @author Thorsten Rinne <[email protected]> |
|
17 | + * @author Uwe Pries <[email protected]> |
|
18 | + * @copyright 2006-2016 phpMyFAQ Team |
|
19 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
20 | + * @link http://www.phpmyfaq.de |
|
21 | + * @since 2006-05-08 |
|
22 | + */ |
|
23 | 23 | |
24 | 24 | define('PMF_ROOT_DIR', dirname(__DIR__)); |
25 | 25 |
@@ -19,20 +19,20 @@ 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 | 29 | $do = PMF_Filter::filterInput(INPUT_GET, 'do', FILTER_SANITIZE_STRING); |
30 | 30 | |
31 | -if ('insertentry' == $do && ($permission['editbt']|| $permission['addbt']) || |
|
31 | +if ('insertentry' == $do && ($permission['editbt'] || $permission['addbt']) || |
|
32 | 32 | 'saveentry' == $do && $permission['editbt']) { |
33 | 33 | |
34 | 34 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
35 | - if (! $user instanceof PMF_User_CurrentUser) { |
|
35 | + if (!$user instanceof PMF_User_CurrentUser) { |
|
36 | 36 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
37 | 37 | } |
38 | 38 | |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | 'email' => $email, |
88 | 88 | 'comment' => (!is_null($comment) ? 'y' : 'n'), |
89 | 89 | 'date' => empty($date) ? date('YmdHis') : str_replace(array('-', ':', ' '), '', $date), |
90 | - 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000'), |
|
91 | - 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959'), |
|
90 | + 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart).'000000'), |
|
91 | + 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959'), |
|
92 | 92 | 'linkState' => '', |
93 | 93 | 'linkDateCheck' => 0 |
94 | 94 | ); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $faq->addCategoryRelations($categories['rubrik'], $record_id, $recordData['lang']); |
143 | 143 | |
144 | 144 | if ($tags != '') { |
145 | - $tagging->saveTags($record_id, explode(',',$tags)); |
|
145 | + $tagging->saveTags($record_id, explode(',', $tags)); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | $faq->addPermission('user', $record_id, $restricted_users); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $dateEnd = PMF_Filter::filterInput(INPUT_POST, 'dateEnd', FILTER_SANITIZE_STRING); |
41 | 41 | $question = PMF_Filter::filterInput(INPUT_POST, 'question', FILTER_SANITIZE_STRING); |
42 | 42 | $categories = PMF_Filter::filterInputArray(INPUT_POST, array('rubrik' => array('filter' => FILTER_VALIDATE_INT, |
43 | - 'flags' => FILTER_REQUIRE_ARRAY))); |
|
43 | + 'flags' => FILTER_REQUIRE_ARRAY))); |
|
44 | 44 | $record_lang = PMF_Filter::filterInput(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
45 | 45 | $tags = PMF_Filter::filterInput(INPUT_POST, 'tags', FILTER_SANITIZE_STRING); |
46 | 46 | $active = PMF_Filter::filterInput(INPUT_POST, 'active', FILTER_SANITIZE_STRING); |
@@ -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 | |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | $itemsPerPage = 32; |
34 | 34 | $allCrumbs = $fa->getBreadcrumbs(); |
35 | 35 | |
36 | -$crumbs = array_slice($allCrumbs, ($page - 1) * $itemsPerPage, $itemsPerPage); |
|
36 | +$crumbs = array_slice($allCrumbs, ($page - 1)*$itemsPerPage, $itemsPerPage); |
|
37 | 37 | |
38 | 38 | $pagination = new PMF_Pagination( |
39 | 39 | $faqConfig, |
40 | 40 | array( |
41 | - 'baseUrl' => PMF_Link::getSystemRelativeUri() . '?' . str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
41 | + 'baseUrl' => PMF_Link::getSystemRelativeUri().'?'.str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
42 | 42 | 'total' => count($allCrumbs), |
43 | 43 | 'perPage' => $itemsPerPage, |
44 | 44 | ) |
@@ -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 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <p> |
40 | 40 | <select onchange="loadStopWordsByLang(this.options[this.selectedIndex].value)" id="stopwords_lang_selector"> |
41 | 41 | <option value="none">---</option> |
42 | -<?php foreach($sortedLanguageCodes as $key => $value) { ?> |
|
42 | +<?php foreach ($sortedLanguageCodes as $key => $value) { ?> |
|
43 | 43 | <option value="<?php echo strtolower($key); ?>"><?php echo $value; ?></option> |
44 | 44 | <?php } ?> |
45 | 45 | </select> |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main stop words configuration frontend |
|
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 Anatoliy Belsky <[email protected]> |
|
14 | - * @copyright 2009-2016 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 2009-04-01 |
|
18 | - */ |
|
3 | + * The main stop words configuration frontend |
|
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 Anatoliy Belsky <[email protected]> |
|
14 | + * @copyright 2009-2016 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 2009-04-01 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -21,10 +21,10 @@ discard block |
||
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | $protocol = 'http'; |
24 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
24 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
25 | 25 | $protocol = 'https'; |
26 | 26 | } |
27 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
28 | 28 | exit(); |
29 | 29 | } |
30 | 30 | |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | $date = new PMF_Date($faqConfig); |
36 | 36 | $perpage = 15; |
37 | 37 | $pages = PMF_Filter::filterInput(INPUT_GET, 'pages', FILTER_VALIDATE_INT); |
38 | - $page = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1); |
|
38 | + $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
|
39 | 39 | |
40 | 40 | if (is_null($pages)) { |
41 | - $pages = round(($logging->getNumberOfEntries() + ($perpage / 3)) / $perpage, 0); |
|
41 | + $pages = round(($logging->getNumberOfEntries() + ($perpage/3))/$perpage, 0); |
|
42 | 42 | } |
43 | 43 | |
44 | - $start = ($page - 1) * $perpage; |
|
44 | + $start = ($page - 1)*$perpage; |
|
45 | 45 | $ende = $start + $perpage; |
46 | 46 | |
47 | 47 | $baseUrl = sprintf( |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Overview of actions in the admin section |
|
4 | - * |
|
5 | - * PHP Version 5.3 |
|
6 | - * |
|
7 | - * http://www.mozilla.org/MPL/ |
|
8 | - * |
|
9 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
10 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
11 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
12 | - * |
|
13 | - * @category phpMyFAQ |
|
14 | - * @package Administration |
|
15 | - * @author Thorsten Rinne <[email protected]> |
|
16 | - * @copyright 2003-2016 phpMyFAQ Team |
|
17 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | - * @link http://www.phpmyfaq.de |
|
19 | - * @since 2003-02-23 |
|
20 | - */ |
|
3 | + * Overview of actions in the admin section |
|
4 | + * |
|
5 | + * PHP Version 5.3 |
|
6 | + * |
|
7 | + * http://www.mozilla.org/MPL/ |
|
8 | + * |
|
9 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
10 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
11 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
12 | + * |
|
13 | + * @category phpMyFAQ |
|
14 | + * @package Administration |
|
15 | + * @author Thorsten Rinne <[email protected]> |
|
16 | + * @copyright 2003-2016 phpMyFAQ Team |
|
17 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | + * @link http://www.phpmyfaq.de |
|
19 | + * @since 2003-02-23 |
|
20 | + */ |
|
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | $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 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $dir = opendir(PMF_ROOT_DIR."/data"); |
48 | 48 | $first = 9999999999999999999999999; |
49 | 49 | $last = 0; |
50 | - while($trackingFile = readdir($dir)) { |
|
50 | + while ($trackingFile = readdir($dir)) { |
|
51 | 51 | // The filename format is: trackingDDMMYYYY |
52 | 52 | // e.g.: tracking02042006 |
53 | 53 | if (($trackingFile != '.') && ($trackingFile != '..') && (10 == strpos($trackingFile, $month))) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | </tr> |
103 | 103 | <tr> |
104 | 104 | <td><?php echo $PMF_LANG["ad_stat_vpd"]; ?>:</td> |
105 | - <td><?php echo (($danz != 0) ? round(($vanz / $danz),2) : 0); ?></td> |
|
105 | + <td><?php echo (($danz != 0) ? round(($vanz/$danz), 2) : 0); ?></td> |
|
106 | 106 | </tr> |
107 | 107 | <tr> |
108 | 108 | <td><?php echo $PMF_LANG["ad_stat_fien"]; ?>:</td> |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main statistics page |
|
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-2016 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-24 |
|
19 | - */ |
|
3 | + * The main statistics page |
|
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-2016 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-24 |
|
19 | + */ |
|
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <div class="controls"> |
67 | 67 | <?php |
68 | 68 | foreach ($instance->getInstanceConfig($instanceData->id) as $key => $config) { |
69 | - echo '<span class="uneditable-input">' . $key . ': ' . $config . '</span><br/>'; |
|
69 | + echo '<span class="uneditable-input">'.$key.': '.$config.'</span><br/>'; |
|
70 | 70 | } |
71 | 71 | ?> |
72 | 72 | </div> |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Frontend to edit an instance |
|
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 Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2012-2016 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 2012-04-16 |
|
18 | - */ |
|
3 | + * Frontend to edit an instance |
|
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 Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2012-2016 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 2012-04-16 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -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 | |
@@ -73,19 +73,19 @@ discard block |
||
73 | 73 | <td style="width: 60px;"><?php echo $data['usr']; ?></td> |
74 | 74 | <td style="width: 60px;"> |
75 | 75 | <?php |
76 | - if (round($data['num'] * 20) > 75) { |
|
76 | + if (round($data['num']*20) > 75) { |
|
77 | 77 | $progressBar = 'success'; |
78 | - } elseif (round($data['num'] * 20) < 25) { |
|
78 | + } elseif (round($data['num']*20) < 25) { |
|
79 | 79 | $progressBar = 'danger'; |
80 | 80 | } else { |
81 | 81 | $progressBar = 'info'; |
82 | 82 | } |
83 | 83 | ?> |
84 | 84 | <div class="progress progress-<?php echo $progressBar ?>" style="width: 50px;"> |
85 | - <div class="bar" style="width: <?php echo round($data['num'] * 20); ?>%;"></div> |
|
85 | + <div class="bar" style="width: <?php echo round($data['num']*20); ?>%;"></div> |
|
86 | 86 | </div> |
87 | 87 | </td> |
88 | - <td style="width: 60px;"><?php echo round($data['num'] * 20); ?>%</td> |
|
88 | + <td style="width: 60px;"><?php echo round($data['num']*20); ?>%</td> |
|
89 | 89 | </tr> |
90 | 90 | <?php |
91 | 91 | $oldcategory = $data['category_id']; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The page with the ratings of the votings |
|
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-2016 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 | + * The page with the ratings of the votings |
|
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-2016 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'; |
@@ -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 | - * 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-2016 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-2016 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'; |