* $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 - 2009 by Roland Haeder *
* Copyright (c) 2009, 2010 by Mailer Developer Team *
// By default show the list...
$show = true;
-// Check for 'id' element
-if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == 0))) {
+// Check for 'url_id' element
+if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('url_id')) || (!is_array(postRequestParameter('url_id'))) || (count(postRequestParameter('url_id')) == 0))) {
// Not found so output message
- loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
+ loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_SELECTIONS--}');
// Abort here
return;
if (isFormSent('edit')) {
// Show entries for editing
adminEditEntriesConfirm(
- postRequestParameter('id'),
+ postRequestParameter('url_id'),
'surfbar_urls',
array('url_id', 'url_userid', 'url'),
array('bigintval', 'addMemberSelectionBox', ''),
- array('', array(false, true, true, 'userid[]'), '')
+ array('', array(false, true, true, 'url_userid[]'), ''),
+ false,
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
$show = false;
} elseif (isPostRequestParameterSet('do_edit')) {
array(),
array(),
true,
- 'url_id'
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
} elseif (isPostRequestParameterSet('delete')) {
// Show entries for deletion
array('', '', '', ''),
false,
'url_id',
- 'userid',
+ 'url_userid',
'url_userid'
);
$show = false;
adminLockEntriesConfirm(
postRequestParameter('url_id'),
'surfbar_urls',
- array('url_id', 'url_userid', 'url', 'url_registered', 'status'),
+ array('url_id', 'url_userid', 'url', 'url_registered', 'url_status'),
array('bigintval', 'generateUserProfileLink', 'generateFrametesterUrl', '', 'translateSurfbarUrlStatus'),
array('', '', '', '', ''),
false,
- 'url_id'
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
$show = false;
} elseif (isPostRequestParameterSet('do_lock')) {
array(),
array(),
array(),
- array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
+ array('url_status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
true,
- 'url_id'
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
} elseif (isPostRequestParameterSet('undelete')) {
// Undelete selected URLs. This does only work for deleted URLs... ;-)
adminUndeleteEntriesConfirm(
postRequestParameter('url_id'),
'surfbar_urls',
- array('url_id', 'url_userid', 'url', 'url_registered', 'status'),
+ array('url_id', 'url_userid', 'url', 'url_registered', 'url_status'),
array('bigintval', 'generateUserProfileLink', 'generateFrametesterUrl', '', 'translateSurfbarUrlStatus'),
array('', '', '', '', ''),
false,
- 'url_id'
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
$show = false;
} elseif (isPostRequestParameterSet('do_undelete')) {
array(),
array(),
array(),
- array('status' => array('DELETED' => 'ACTIVE')),
+ array('url_status' => array('DELETED' => 'ACTIVE')),
true,
- 'url_id'
+ 'url_id',
+ 'url_userid',
+ 'url_userid'
);
}
`url_id` ASC", __FILE__, __LINE__);
// Do we have some URLs left?
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
// List all URLs
- $OUT = ''; $SW = 2;
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// "Translate"/add content
- $content['sw'] = $SW;
$content['url_registered'] = generateDateTime($content['url_registered'], 2);
$content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
- if (empty($content['url_lock_reason'])) $content['url_lock_reason'] = '---';
// Load row template
$OUT .= loadTemplate('admin_list_surfbar_urls_row', true, $content);
-
- // Switch color
- $SW = 3 - $SW;
} // END - while
// Load main template
loadTemplate('admin_list_surfbar_urls', false, $OUT);
} else {
// No URLs in surfbar
- loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
+ loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_NO_URLS_FOUND--}');
}
// Free result