2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 09/17/2008 *
4 * =================== Last change: 09/17/2008 *
6 * -------------------------------------------------------------------- *
7 * File : what-surfbar_list.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Surfbar URL statistics *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Surfbar-Statistiken *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2011 by Mailer Developer Team *
20 * For more information visit: http://www.mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
41 } elseif (!isMember()) {
42 redirectToIndexMemberOnlyModule();
45 // Add description as navigation point
46 addYouAreHereLink('member', __FILE__);
48 if ((!isExtensionActive('surfbar')) && (!isAdmin())) {
49 displayMessage(generateExtensionInactiveNotInstalledMessage('surfbar'));
54 $urlArray = SURFBAR_GET_USER_URLS();
56 // Are there entries or form is submitted?
57 if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestParameterSet('id'))) {
59 if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $urlArray)) {
60 // Action performed but shall we display it?
61 if (((postRequestParameter('action') != 'edit') && (postRequestParameter('action') != 'delete')) || (isPostRequestParameterSet('execute'))) {
62 // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed
63 displayMessage('{--MEMBER_SURFBAR_ACTION_DONE--}');
66 // Something went wrong
67 displayMessage('{--MEMBER_SURFBAR_ACTION_FAILED--}');
69 } elseif (count($urlArray) > 0) {
72 foreach ($urlArray as $id => $content) {
73 // "Translate"/insert data
74 if ($content['views_total'] > 0) {
75 // Include link to stats
76 $content['views_total'] = '[<a href="{%url=modules.php?module=login&what=surfbar_list%}">{%pipe,translateComma=' . $content['views_total'] . '%}</a>]';
78 $content['url_registered'] = generateDateTime($content['url_registered'], 2);
79 $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
80 $content['actions'] = SURFBAR_MEMBER_ACTIONS($content['id'], $content['url_status']);
83 $OUT .= loadTemplate('member_surfbar_list_row', true, $content);
87 loadTemplate('member_surfbar_list', false, $OUT);
89 // No URLs booked so far
90 displayMessage('{--MEMBER_SURFBAR_NO_URLS_FOUND--}');