templates/de/html/member/member_surfbar_book_dynamic.tpl -text
templates/de/html/member/member_surfbar_book_static.tpl -text
templates/de/html/member/member_surfbar_link.tpl -text
+templates/de/html/member/member_surfbar_start_dynamic.tpl -text
templates/de/html/member/member_surfbar_start_static.tpl -text
templates/de/html/member/member_themes.tpl -text
templates/de/html/member/member_transfer_list.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "352");
+define('CURR_SVN_REVISION', "353");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
}
// Create selection box or array of splitted timestamp
function CREATE_TIME_SELECTIONS($timestamp, $prefix="", $display="", $align="center", $return_array=false) {
- // Calculate 15-seconds timestamp (15-seconds-steps shall be fine ;) )
- $stamp = round($timestamp / 15) * 15;
+ // Calculate 2-seconds timestamp
+ $stamp = round($timestamp / 2) * 2;
// Do we have a leap year?
$SWITCH = 0;
// Is seconds zero and time is < 60 seconds?
if (($s == 0) && ($stamp < 60)) {
// Fix seconds
- $s = $timestamp;
+ $s = round($timestamp);
} // END - if
//
} // END - if
} // END - foreach
- // Remove leading commata and space
- $ret = substr($ret, 2);
+ // Do we have something there?
+ if (strlen($ret) > 0) {
+ // Remove leading commata and space
+ $ret = substr($ret, 2);
+ } else {
+ // Zero seconds
+ $ret = "0 "._SECONDS;
+ }
// Return fancy time string
return $ret;
define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL', "Vergütungsmodel auswählen:");
define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC', "Statische Werte verwenden.");
define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC', "Dynamische Werte errechnen.");
-define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung:");
+define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung/ Verweildauer/Reload-Sperre:");
define('ADMIN_CONFIG_SURFBAR_MAX_ORDER', "Maximal durch Mitglied in Surfbar buchbare URLs:");
define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind: (*)");
define('ADMIN_CONFIG_SURFBAR_AUTOSTART', "Surfbar soll nach Ruhezeit automatisch starten?");
define('ADMIN_SURFBAR_NOTIFY_URL_CONFIRMED_SUBJECT', "URL in Surfbar freigegeben");
// Auto-generated admin subject lines
-define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "[Surfbar:] - URL entfernt");
-define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "[Surfbar:] - URL geändert");
+define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL entfernt");
+define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL geändert");
define('ADMIN_CONFIRMED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Freigabe einer URL");
define('ADMIN_LOCKED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Sperrung einer URL");
// All done!
return true;
}
+// Calculate minimum value for dynamic payment model
+function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
+ global $_CONFIG;
+
+ // Addon is zero by default
+ $addon = 0;
+
+ // Percentage part
+ $percent = abs(log($_CONFIG['surfbar_dynamic_percent'] / 100 + 1));
+
+ // Get total users
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+
+ // Get online users
+ $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE();
+
+ // Calculate addon
+ $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers);
+
+ // Get total URLs
+ $totalUrls = SURFBAR_GET_TOTAL_URLS();
+
+ // Get user's total URLs
+ $userUrls = SURFBAR_GET_TOTAL_USER_URLS();
+
+ // Calculate addon
+ $addon += abs(log($userUrls / $totalUrls + 1) * $percent * $totalUrls);
+
+ // Return addon
+ return $addon;
+}
+// Calculate maximum value for dynamic payment model
+function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
+ global $_CONFIG;
+
+ // Addon is zero by default
+ $addon = 0;
+
+ // Maximum value
+ $max = log(2);
+
+ // Percentage part
+ $percent = abs(log($_CONFIG['surfbar_dynamic_percent'] / 100 + 1));
+
+ // Get total users
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+
+ // Calculate addon
+ $addon += abs($max * $percent * $totalUsers);
+
+ // Get total URLs
+ $totalUrls = SURFBAR_GET_TOTAL_URLS();
+
+ // Calculate addon
+ $addon += abs($max * $percent * $totalUrls);
+
+ // Return addon
+ return $addon;
+}
+// Calculate dynamic lock
+function SURFBAR_CALCULATE_DYNAMIC_LOCK () {
+ global $_CONFIG;
+
+ // Default lock is 30 seconds
+ $addon = 30;
+
+ // Get online users
+ $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE();
+
+ // Calculate lock
+ $addon = abs(log($onlineUsers / $addon +1));
+
+ // Return value
+ return $addon;
+}
// "Getter" for lock ids array
function SURFBAR_GET_LOCK_IDS () {
// Prepare some arrays
// Prepare content for output
$content = array(
- 'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']),
- 'surfbar_static_time' => CREATE_FANCY_TIME($_CONFIG['surfbar_static_time']),
- 'surfbar_static_lock' => CREATE_FANCY_TIME($_CONFIG['surfbar_static_lock']),
- 'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent'])
+ 'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']),
+ 'surfbar_static_time' => CREATE_FANCY_TIME($_CONFIG['surfbar_static_time']),
+ 'surfbar_static_lock' => CREATE_FANCY_TIME($_CONFIG['surfbar_static_lock']),
);
+// In dynamic mode we need some more data
+if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") {
+ // Total URLs
+ $content = array(
+ 'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']),
+ 'surfbar_total_urls' => SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0"),
+ 'surfbar_user_urls' => SURFBAR_GET_TOTAL_USER_URLS(),
+ 'surfbar_total_online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
+ 'surfbar_total_users' => TRANSLATE_COMMA(GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)),
+ 'surfbar_min_reward' => TRANSLATE_COMMA(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()),
+ 'surfbar_max_reward' => TRANSLATE_COMMA(SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE()),
+ 'surfbar_min_time' => CREATE_FANCY_TIME(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()),
+ 'surfbar_max_time' => CREATE_FANCY_TIME(SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE()),
+ 'surfbar_dynamic_lock' => CREATE_FANCY_TIME(SURFBAR_CALCULATE_DYNAMIC_LOCK()),
+ 'surfbar_static_reward' => TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']),
+ 'surfbar_static_time' => CREATE_FANCY_TIME($_CONFIG['surfbar_static_time'])
+ );
+} // END - if
+
// Load the template
LOAD_TEMPLATE("member_surfbar_start_".strtolower($_CONFIG['surfbar_pay_model']), false, $content);
-<FORM
- action="{!URL!}/modules.php?module=admin&what=user_contct&u_id=$content[u_id]"
- method="POST">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="400"
- class="admin_table dashed" align="center">
+<FORM action="{!URL!}/modules.php?module=admin&what=user_contct&u_id=$content[u_id]" method="POST">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="400" class="admin_table dashed" align="center">
<TR>
- <TD align="center" class="admin_title bottom2" height="30"><STRONG>{--ADMIN_CONTACT_USER--}:<BR />
- $content[surname] $content[family] <<A
- href="mailto:$content[email]">$content[email]</A>></STRONG></TD>
+ <TD align="center" class="admin_title bottom2" height="30">
+ <STRONG>{--ADMIN_CONTACT_USER--}:<BR />
+ $content[surname] $content[family] <<A href="mailto:$content[email]">$content[email]</A>></STRONG>
+ </TD>
</TR>
<TR>
<TD align="center" class="bottom2" style="padding: 10px"><TEXTAREA
</TD>
</TR>
<TR>
- <TD class="admin_footer"><INPUT type="reset"
- class="admin_reset" value="{--CLEAR_FORM--}"> * <INPUT
- type="submit" name="ok" class="admin_submit"
- value="{--CONTACT_USER--}"></TD>
+ <TD class="admin_footer">
+ <INPUT type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
+ <INPUT type="submit" name="ok" class="admin_submit" value="{--CONTACT_USER--}" />
+ </TD>
</TR>
</TABLE>
</FORM>
</TR>
<TR>
<TD class="admin_footer">
- --> <STRONG><A href="{!URL!}/modules.php?module=admin">{--ADMIN_CONTINUE_LOGIN--}</A></STRONG>
+ »» <STRONG><A href="{!URL!}/modules.php?module=admin">{--ADMIN_CONTINUE_LOGIN--}</A></STRONG>
</TD>
</TR>
</TABLE>
{--DOUBLER_POINTS_1--} <STRONG>{!__CHARGE_VALUE!}%</STRONG>
{--DOUBLER_POINTS_2--}<br />
<br />
- {--DOUBLER_EXAMPLE_1--} <STRONG>500 {!POINTS!}</STRONG> -->
+ {--DOUBLER_EXAMPLE_1--} <STRONG>500 {!POINTS!}</STRONG> »»
{--DOUBLER_EXAMPLE_2--} <STRONG>1000 {!POINTS!}</STRONG>{--DOUBLER_EXAMPLE_3--}<br />
<br />
<STRONG class="big">{--DOUBLER_FULL_PAYOUT--}</STRONG><br />
<LI>{--DOUBLER_POINTS_1--} <STRONG>{!__CHARGE_VALUE!}%</STRONG>
{--DOUBLER_POINTS_2--}</LI>
<LI>{--DOUBLER_EXAMPLE_1--} <STRONG>500 {!POINTS!}</STRONG>
- --> {--DOUBLER_EXAMPLE_2--} <STRONG>1000 {!POINTS!}</STRONG>{--DOUBLER_EXAMPLE_3--}</LI>
+ »» {--DOUBLER_EXAMPLE_2--} <STRONG>1000 {!POINTS!}</STRONG>{--DOUBLER_EXAMPLE_3--}</LI>
<LI>{--DOUBLER_REFERRAL_1--} <STRONG>{!__REF_VALUE!}%</STRONG>
{--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--}
{--DOUBLER_REFERRAL_4--}
<TABLE border="0" cellspacing="0" cellpadding="0" class="guest_table" width="100%">
<TR>
<TD align="center" height="30">
- --> <A href="{!URL!}/modules.php?module=index&what=sponsor_login">{--SPONSOR_BACK_TO_LOGIN--}</A><br />
+ »» <A href="{!URL!}/modules.php?module=index&what=sponsor_login">{--SPONSOR_BACK_TO_LOGIN--}</A><br />
</TD>
</TR>
</TABLE>
<TABLE border="0" cellspacing="0" cellpadding="0" class="guest_table" width="100%">
<TR>
<TD align="center" height="30">
- --> <A href="{!URL!}/modules.php?module=index&what=sponsor_login&mode=lost_pass">{--SPONSOR_PASSWORD_LOST--}</A>
+ »» <A href="{!URL!}/modules.php?module=index&what=sponsor_login&mode=lost_pass">{--SPONSOR_PASSWORD_LOST--}</A>
</TD>
</TR>
<TR>
<TD align="center" height="30">
- --> <A href="{!URL!}/modules.php?module=index&what=sponsor_login&mode=activate">{--SPONSOR_ACTIVATION_LINK_LOST--}</A><br />
+ »» <A href="{!URL!}/modules.php?module=index&what=sponsor_login&mode=activate">{--SPONSOR_ACTIVATION_LINK_LOST--}</A><br />
</TD>
</TR>
</TABLE>
<TABLE border="0" cellspacing="0" cellpadding="0" class="guest_table" width="100%">
<TR>
<TD align="center" height="30">
- --> <A href="{!URL!}/modules.php?module=index&what=sponsor_login">{--SPONSOR_BACK_TO_LOGIN--}</A><br />
+ »» <A href="{!URL!}/modules.php?module=index&what=sponsor_login">{--SPONSOR_BACK_TO_LOGIN--}</A><br />
</TD>
</TR>
</TABLE>
<LI>{--DOUBLER_POINTS_1--} <STRONG>{!__CHARGE_VALUE!}%</STRONG>
{--DOUBLER_POINTS_2--}</LI>
<LI>{--DOUBLER_EXAMPLE_1--} <STRONG>500 {!POINTS!}</STRONG>
- --> {--DOUBLER_EXAMPLE_2--} <STRONG>1000 {!POINTS!}</STRONG>{--DOUBLER_EXAMPLE_3--}</LI>
+ »» {--DOUBLER_EXAMPLE_2--} <STRONG>1000 {!POINTS!}</STRONG>{--DOUBLER_EXAMPLE_3--}</LI>
<LI>{--DOUBLER_REFERRAL_1--} <STRONG>{!__REF_VALUE!}%</STRONG>
{--DOUBLER_REFERRAL_2--} {--DOUBLER_REFERRAL_3--}
{--DOUBLER_REFERRAL_4--}
<div class="member_title2 dashed" style="width:600px;margin-top:10px">
- >> <strong><a href="{!URL!}/surfbar.php">Jetzt die Surfbar starten!</a></strong> <<
+ »» <strong><a href="{!URL!}/surfbar.php">Jetzt die Surfbar starten!</a></strong> ««
</div>
--- /dev/null
+<div class="member_table dashed" style="width:600px">
+ <div class="member_title2 bottom2">
+ <strong>Dynamisch vergütete Surfbar ist aktiv</strong>
+ </div>
+
+ <div style="padding:5px">
+ Bei der dynamischen Vergütung werden Ihnen derzeit mindestens
+ <strong>$content[surfbar_min_reward]</strong> und maximal
+ <strong>$content[surfbar_max_reward] {!POINTS!}</strong> Aufschlag
+ zum Basispreis für jede besuchte Seite vergütet. Diese
+ müssen Sie mindestens <strong>$content[surfbar_min_time]</strong>
+ und maximal <strong>$content[surfbar_max_time]</strong> zusätzlich
+ zur Basiszeit angesehen haben und können die selbe Seite erst nach
+ <strong>$content[surfbar_dynamic_lock]</strong> wieder aufrufen.
+ </div>
+
+ <div style="padding:5px">
+ Einige Hinweise zur Berechnung: Die derzeige Mitgliederanzahl von
+ <strong>$content[surfbar_total_users]</strong>, die derzeit die Surfbar
+ nutzenden <strong>$content[surfbar_total_online]</strong> Mitglieder,
+ die gesamt in der Surfbar gebuchten <strong>$content[surfbar_total_urls]</strong>
+ URLs (ohne von unseren Sponsoren), sowie Ihre gebuchten
+ <strong>$content[surfbar_user_urls]</strong> URLs werden als
+ Berechnungsgrundlage verwendet. Sie erhalten allerdings nur einen
+ reduzierten Anteil von <strong>$content[surfbar_dynamic_percent]%</strong>.
+ </div>
+
+ <div style="padding:5px">
+ Der Basispreis und die Basiszeit sind die Einstellungen aus dem
+ statischen Vergütungsmodell: <strong>$content[surfbar_static_reward]
+ {!POINTS!}</strong> bzw. <strong>$content[surfbar_static_time]</strong>.
+ </div>
+</div>
</div>
<div style="padding:5px">
Bei der statischen Vergütung werden Ihnen derzeit
- $content[surfbar_static_reward] {!POINTS!} für jede besuchte Seite
- vergütet. Diese müssen Sie $content[surfbar_static_time]
- lang angesehen haben und können die selbe Seite erst nach
- $content[surfbar_static_lock] wieder aufrufen.
+ <strong>$content[surfbar_static_reward] {!POINTS!}</strong> für
+ jede besuchte Seite vergütet. Diese müssen Sie
+ <strong>$content[surfbar_static_time]</strong> lang angesehen haben
+ und können die selbe Seite erst nach
+ <strong>$content[surfbar_static_lock]</strong> wieder aufrufen.
</div>
</div>