templates/de/html/member/member_surfbar_book_dynamic.tpl -text
templates/de/html/member/member_surfbar_book_static.tp -text
templates/de/html/member/member_surfbar_book_static.tpl -text
+templates/de/html/member/member_surfbar_edit_action_form.tpl -text
templates/de/html/member/member_surfbar_link.tpl -text
templates/de/html/member/member_surfbar_list.tpl -text
templates/de/html/member/member_surfbar_list_row.tpl -text
$GLOBALS['module'] = "admin"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// Simply redirect... :-)
LOAD_URL("modules.php?module=admin&action=login");
// Redirection should be done here
-}
- else
-{
+} else {
// You have to configure first!
LOAD_URL("install.php");
}
$GLOBALS['module'] = "agb"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed'))
$msg = null;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the "beg" extension active?
if (!EXT_IS_ACTIVE("beg")) {
$GLOBALS['module'] = "birthday_confirm"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the "birthday" extension active?
if (!EXT_IS_ACTIVE("birthday")) {
$GLOBALS['module'] = "click"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) {
// Update clicks counter...
$GLOBALS['module'] = "confirm"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')))
$CSS = "1"; $GLOBALS['module'] = "css";
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Set header
@header("Content-type: text/css");
$GLOBALS['module'] = "debug"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Redirect only to registration page when this script is installed
if (isBooleanConstantAndTrue('mxchange_installed')) {
$CSS = 0;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the "doubler" extension active?
if (!EXT_IS_ACTIVE("doubler")) {
$GLOBALS['module'] = "img"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "563");
+define('CURR_SVN_REVISION', "564");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`url` VARCHAR(255) NOT NULL DEFAULT '',
-`payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`last_salt` VARCHAR(255) NOT NULL DEFAULT '',
`views_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`views_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY(`id`),
UNIQUE KEY `userid_url` (`userid`,`url`),
INDEX `status_userid` (`status`,`userid`),
-INDEX (`payment_id`)
) TYPE=MyISAM COMMENT='Surfbar URLs'";
// Reload locks
// Display selected "action form"
function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) {
// Translate some data
- $urlData['registered'] = MAKE_DATETIME($urlData['registered'], "2");
- $urlData['views_total'] = TRANSLATE_COMMA($urlData['views_total']);
+ $urlData['registered'] = MAKE_DATETIME($urlData['registered'], "2");
+ $urlData['views_total'] = TRANSLATE_COMMA($urlData['views_total']);
+ $urlData['views_max'] = TRANSLATE_COMMA($urlData['views_max']);
+ $urlData['views_allowed'] = TRANSLATE_COMMA($urlData['views_allowed']);
+ $urlData['last_locked'] = MAKE_DATETIME($urlData['last_locked'], "2");
+
+ // Is the lock reason empty?
+ if (empty($urlData['lock_reason'])) {
+ // Fix it to three dashes
+ $urlData['lock_reason'] = "---";
+ } // END - if
+
+ // Default is not limited
+ $urlData['limited_yes'] = "";
+ $urlData['limited_no'] = " checked=\"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'] = "true";
+ } // END - if
// Load the form and display it
LOAD_TEMPLATE(sprintf("member_surfbar_%s_action_form", $action), false, $urlData);
} // END - if
// Look up the record
- $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason, views_max, views_allowed
+ $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed
FROM "._MYSQL_PREFIX."_surfbar_urls
WHERE %s='%s'".$add."
ORDER BY %s %s
if (empty($uid)) $uid = 0;
// Just run the insert query for now
- SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed) VALUES (%s,'%s','%s','%s','%s')",
+ SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid,url,status,views_max,views_allowed) VALUES (%s,'%s','%s',%s,%s)",
array(
$uid,
$urlData['url'],
$URLs = array();
// Begin the query
- $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason
+ $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.views_max, u.views_allowed, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason
FROM "._MYSQL_PREFIX."_surfbar_urls AS u
WHERE u.userid=%s AND u.status != 'DELETED'
ORDER BY u.id ASC",
}
// Special file
-require_once (PATH."inc/rdf.class.php");
+require_once(PATH."inc/rdf.class.php");
// Add description as navigation point
ADD_DESCR("guest", __FILE__);
if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
// No more URLs allowed to book!
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SURFBAR_NO_MORE_ALLOWED);
-} elseif (isset($_POST['ok'])) {
+} elseif ((isset($_POST['ok'])) && (isset($_POST['limited']))) {
// Is limitation "no" and "limit" is > 0?
if (($_POST['limited'] == "N") && ((isset($_POST['limit'])) && ($_POST['limit'] > 0)) || (!isset($_POST['limit']))) {
// Set it to unlimited
// Register the new URL
$insertId = SURFBAR_MEMBER_ADD_URL($_POST['url'], $_POST['limit']);
+ // By default something went wrong
+ $msg = MEMBER_SURFBAR_URL_NOT_ADDED;
+
// Was this fine?
if ($insertId > 0) {
// URL added and waiting for unlock
$msg = MEMBER_SURFBAR_URL_ADDED;
- } else {
- // Something went wrong!
- $msg = MEMBER_SURFBAR_URL_NOT_ADDED;
- }
+ } // END - if
// Load message template
LOAD_TEMPLATE("admin_settings_saved", false, $msg);
$GLOBALS['module'] = "index";
// Load config.php
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
define('mxchange_installing', true);
// Load security system
-require ("inc/libs/security_functions.php");
+require("inc/libs/security_functions.php");
// Init "action" and "what"
global $what, $action;
$GLOBALS['module'] = "install";
// Load config file
-require ("inc/config.php");
+require("inc/config.php");
// Header
-require (PATH."inc/header.php");
+require(PATH."inc/header.php");
// Reload page to page=welcome when it is not specified
if (!isset($_GET['page'])) {
LOAD_TEMPLATE("install_header");
// Here start's our installtion stuff
- require_once (PATH."inc/install-inc.php");
+ require_once(PATH."inc/install-inc.php");
// Close main installation table
LOAD_TEMPLATE("install_footer");
}
// Footer
-require (PATH."inc/footer.php");
+require(PATH."inc/footer.php");
//
?>
$CSS = "1"; $GLOBALS['module'] = "js";
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is this script installed and a JavaScript tag is provied?
if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
$GLOBALS['module'] = "lead-confirm";
// Load config.php
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
$GLOBALS['module'] = "login";
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// Simply redirect... :-)
LOAD_URL("modules.php?module=index&what=login");
// Redirection should be done here
-}
- else
-{
+} else {
// You have to configure first!
LOAD_URL("install.php");
}
+
// Really all done here... ;-)
?>
$GLOBALS['module'] = "mailid"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// Is the extension active
if (!EXT_IS_ACTIVE("mailid", true)) {
// Is not activated/installed yet!
$GLOBALS['module'] = "mailid"; $CSS = 0;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
if (isBooleanConstantAndTrue('mxchange_installed'))
{
//xdebug_start_trace();
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require_once ("inc/libs/security_functions.php");
+require_once("inc/libs/security_functions.php");
// Init "action" and "what"
global $what, $action, $startTime;
$GLOBALS['module'] = secureString($_GET['module']);
// Needed include files
-require ("inc/config.php");
+require("inc/config.php");
// Check if logged in
if (IS_MEMBER()) {
$GLOBALS['module'] = "ref"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Redirect only to registration page when this script is installed
if (isBooleanConstantAndTrue('mxchange_installed')) {
$GLOBALS['module'] = "show_bonus"; $CSS = 0;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the "bonus" extension active?
if (!EXT_IS_ACTIVE("bonus")) {
} // END - if
// List only rankings when script is installed
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// Include header
include(PATH."inc/header.php");
- if (($_GET['uid'] > 0) && ($_GET['d'] > 0) && (!empty($_GET['t'])))
- {
+ if (($_GET['uid'] > 0) && ($_GET['d'] > 0) && (!empty($_GET['t']))) {
// Set row name
$t = "";
switch ($_GET['t'])
$t = "mail_id";
break;
}
- if (!empty($t))
- {
+
+ // Valid type?
+ if (!empty($t)) {
// Check for data
$result = SQL_QUERY_ESC("SELECT DISTINCT d.gender, d.surname, d.family, b.level, b.points
FROM "._MYSQL_PREFIX."_user_data AS d
ON d.userid=b.userid
WHERE d.status='CONFIRMED' AND d.userid=%s AND b.".$t."='%s' LIMIT 1",
array(bigintval($_GET['uid']), bigintval($_GET['d'])), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Load data
list($gender, $sname, $fname, $level, $points) = SQL_FETCHROW($result);
// Load pre-template
define('__BONUS_MSG', LOAD_TEMPLATE("show_bonus_msg", true));
- }
- else
- {
+ } else {
// No data found
define('__BONUS_MSG', "<FONT class=\"guest_failed\">".BONUS_SHOW_NO_DATA."</FONT>");
}
// Free memory
SQL_FREERESULT($result);
- }
- else
- {
+ } else {
// Wrong type entered
define('__BONUS_MSG', "<FONT class=\"guest_failed\">".BONUS_SHOW_WRONG_TYPE."</FONT>");
}
- }
- else
- {
+ } else {
// Wrong call!
define('__BONUS_MSG', "<FONT class=\"guest_failed\">".BONUS_SHOW_WRONG_CALL."</FONT>");
}
// Include footer
include(PATH."inc/footer.php");
-}
- else
-{
+} else {
// You have to configure first!
LOAD_URL("install.php");
}
+
// Really all done here... ;-)
?>
require_once("inc/libs/security_functions.php");
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
require_once("inc/libs/security_functions.php");
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Redirect only to registration page when this script is installed
if (defined('mxchange_installed') && (isBooleanConstantAndTrue(mxchange_installed))) {
$msg = null;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
var old_limit = 0;
function FocusLimitedNo () {
- old_limit = limit.value;
+ if ((limit.value > 0) && (limit.value != '-')) {
+ old_limit = limit.value;
+ }
limit.disabled = true;
limit.setAttribute('class', 'disabled');
limit.style.textAlign = 'center';
}
function ResetForm () {
- FocusLimitedNo();
old_limit = 0;
+ FocusLimitedNo();
return true;
}
var old_limit = 0;
function FocusLimitedNo () {
- old_limit = limit.value;
+ if ((limit.value > 0) && (limit.value != '-')) {
+ old_limit = limit.value;
+ }
limit.disabled = true;
limit.setAttribute('class', 'disabled');
limit.style.textAlign = 'center';
}
function ResetForm () {
- FocusLimitedNo();
old_limit = 0;
+ FocusLimitedNo();
return true;
}
--- /dev/null
+<form id="edit" action="{!URL!}/modules.php?module=login&what=surfbar_list" method="post" onsubmit="return SubmitForm()" onreset="return ResetForm()">
+<div class="member_table dashed" style="width:600px;margin-top:10px">
+ <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px">
+ <strong>URL in Surfbar editieren:</strong>
+ </div>
+
+ <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+ URL eingeben: <input class="member_normal" type="text" name="url" size="20" maxlength="255" value="$content[url]" />
+ </div>
+
+ <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+ Soll die Anzahl Aufrufe begrenzt werden?<br />
+ <input type="radio" id="limited_no" onfocus="return FocusLimitedNo()" name="limited" value="N"$content[limited_no] /> {--NO--}
+ <input type="radio" id="limited_yes" onfocus="return FocusLimitedYes()" name="limited" value="Y"$content[limited_yes] /> {--YES--}
+ </div>
+
+ <div class="member_input bottom2" style="padding-top:5px;padding-bottom:5px">
+ Aufrufe begrenzen auf: <input class="member_normal" type="text" id="limit" name="limit" size="7" maxlength="20" value="$content[views_max]" />
+ </div>
+
+ <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px">
+ <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />
+ <input type="hidden" name="id" value="$content[id]" />
+ <input type="hidden" name="action" value="edit" />
+ <input type="hidden" name="execute" value="1" />
+ <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ACTION_EDIT_SUBMIT--}" />
+ </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+<!--
+var limit = document.getElementById('limit');
+var span = document.getElementById('span_limit');
+var old_limit = $content[views_max];
+
+function FocusLimitedNo () {
+ if ((limit.value > 0) && (limit.value != '-')) {
+ old_limit = limit.value;
+ }
+ limit.disabled = true;
+ limit.setAttribute('class', 'disabled');
+ limit.style.textAlign = 'center';
+ limit.value = '-';
+}
+
+function FocusLimitedYes () {
+ limit.disabled = false;
+ limit.setAttribute('class', 'member_normal');
+ limit.style.textAlign = 'left';
+ if (old_limit > 0) {
+ limit.value = old_limit;
+ } else {
+ limit.value = '';
+ }
+ limit.focus();
+}
+
+function SubmitForm () {
+ if (limit.value == '-') {
+ limit.value = 0;
+ }
+ return true;
+}
+
+function ResetForm () {
+ old_limit = 0;
+ FocusLimitedNo();
+ return false;
+}
+
+if ($content[limited] == true) {
+ FocusLimitedYes();
+} else {
+ FocusLimitedNo();
+}
+
+//-->
+</script>
+</form>
$GLOBALS['module'] = "view"; $CSS = -1;
// Load the required file(s)
-require ("inc/config.php");
+require("inc/config.php");
if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['banner']))) {
// Count banner view... we currently don't need the user's id but maybe