X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-surfbar_list.php;h=1cd2ffc5c44f3871d5bb867d15e2c9203d834f85;hb=f42e417c1cd63d07563965c54bf10f6e1cd4248f;hp=aa07ac6400b52a134af379ff9da0a28483889721;hpb=07a07340291a560c3da7715d4d51c9b2f0d2adf2;p=mailer.git diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index aa07ac6400..1cd2ffc5c4 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Surfbar-Statistiken * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -33,14 +38,68 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); -} elseif (!IS_MEMBER()) { - LOAD_URL(URL."/modules.php?module=index"); + die(); +} elseif (!isMember()) { + redirectToIndexMemberOnlyModule(); } // Add description as navigation point -ADD_DESCR("member", basename(__FILE__)); +addMenuDescription('member', __FILE__); + +if ((!isExtensionActive('surfbar')) && (!isAdmin())) { + loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('surfbar')); + return; +} // END - if + +// Load user URLs +$URLs = SURFBAR_GET_USER_URLS(); + +// Are there entries or form is submitted? +if ((isFormSent()) && (isPostRequestElementSet(('action'))) && (isPostRequestElementSet('id'))) { + // Process the form + if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $URLs)) { + // Action performed but shall we display it? + if (((postRequestElement('action') != 'edit') && (postRequestElement('action') != "delete")) || (isPostRequestElementSet(('execute')))) { + // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_DONE')); + } // END - if + } else { + // Something went wrong + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_FAILED')); + } +} elseif (count($URLs) > 0) { + // List all URLs + $OUT = ''; $SW = 2; + foreach ($URLs as $id => $content) { + // "Translate"/insert data + $content['sw'] = $SW; + $content['url'] = generateDerefererUrl($content['url']); + if ($content['views_total'] > 0) { + // Include link to stats + $content['views_total'] = "[".translateComma($content['views_total'])."]"; + } // END - if + $content['registered'] = generateDateTime($content['registered'], '2'); + $content['last_locked'] = generateDateTime($content['last_locked'], '2'); + $content['actions'] = SURFBAR_MEMBER_ACTIONS($content['id'], $content['status']); + $content['status'] = translateSurfbarUrlStatus($content['status']); + if (empty($content['lock_reason'])) { + // Fixes some HTML problems with empty cells + $content['lock_reason'] = '---'; + } // END - if + + // Load row template + $OUT .= loadTemplate('member_surfbar_list_row', true, $content); + + // Switch color + $SW = 3 - $SW; + } // END - if + + // Load main template + loadTemplate('member_surfbar_list', false, $OUT); +} else { + // No URLs booked so far + loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_URLS_FOUND')); +} // ?>