// Include fields only for action 'edit'
if ($action == "edit") {
// Default is not limited
- $urlData['limited_yes'] = "";
- $urlData['limited_no'] = " checked=\"checked\"";
+ $urlData['limited_yes'] = '';
+ $urlData['limited_no'] = ' chkecked="checked"';
$urlData['limited'] = "false";
// Is this URL limited?
if ($urlData['views_max'] > 0) {
// Then rewrite form data
- $urlData['limited_yes'] = " checked=\"checked\"";
- $urlData['limited_no'] = "";
+ $urlData['limited_yes'] = ' chkecked="checked"';
+ $urlData['limited_no'] = '';
$urlData['limited'] = "true";
} // END - if
} // END - if
$executed = false;
// Is limitation "no" and "limit" is > 0?
- if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == "N") && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
+ if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == 'N') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
// Set it to unlimited
$urlData[$action]['limit'] = 0;
} // END - if
$GLOBALS['last_url_data'] = array();
// Is the column an id number?
- if (($column == "id") || ($column == "userid")) {
+ if (($column == "id") || ($column == 'userid')) {
// Extra secure input
$searchTerm = bigintval($searchTerm);
} // END - if
// If the column is "id" there can be only one entry
- $limit = "";
+ $limit = '';
if ($column == "id") {
$limit = "LIMIT 1";
} // END - if
$content['limit'] = SURFBAR_TRANSLATE_LIMIT($content['limit']);
// If in reg-mode we notify admin
- if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == "Y")) {
+ if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
// Notify admin even when he as unlocked an email
SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content);
} // END - if
// Check wether the user is allowed to book more URLs
function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) {
// Is this admin and userid is zero or does the user has some URLs left to book?
- return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, "", array("REJECTED")) < getConfig('surfbar_max_order')));
+ return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
}
// Get total amount of URLs of given status for current user
function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") {
}
// Default is all URLs
- $add = "";
+ $add = '';
// Is the status set?
if (is_array($status)) {
if ($length == 0) $length = 10;
// Generate a code until the length matches
- $valCode = "";
+ $valCode = '';
while (strlen($valCode) != $length) {
// Is the salt set?
if (empty($salt)) {
// Updates the statistics of current URL/userid
function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
// Init add
- $add = "";
+ $add = '';
// Get allowed views
$allowed = SURFBAR_GET_VIEWS_ALLOWED();
$percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
// Get total users
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
// Get online users
$onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE();
$percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
// Get total users
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
// Calculate addon
$addon += abs($max * $percent * $totalUsers);
$USE = SURFBAR_GET_LOCK_IDS();
// Shall we add some URL ids to ignore?
- $add = "";
+ $add = '';
if (count($USE) > 0) {
// Ignore some!
$add = " AND sbu.id NOT IN (";
if (is_null($GLOBALS['cache_array']['surfbar']['last_salt'])) {
// Then repair it wit the static!
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_salt - FIXED!", false);
- $GLOBALS['cache_array']['surfbar']['last_salt'] = "";
+ $GLOBALS['cache_array']['surfbar']['last_salt'] = '';
} // END - if
// Fix missing last_surfed