inc/language/transfer_de.php -text
inc/language/user_de.php -text
inc/language/wernis_de.php -text
+inc/language/yoomedia_de.php -text
inc/libs/.htaccess -text
inc/libs/admins_functions.php -text
inc/libs/autopurge_functions.php -text
inc/libs/transfer_functions.php -text
inc/libs/user_functions.php -text
inc/libs/wernis_functions.php -text
+inc/libs/yoomedia_functions.php -text
inc/load_cache.php -text
inc/load_extensions.php -text
inc/loader/.htaccess -text
inc/modules/admin/what-config_transfer.php -text
inc/modules/admin/what-config_user.php -text
inc/modules/admin/what-config_wernis.php -text
+inc/modules/admin/what-config_yoomedia.php -text
inc/modules/admin/what-del_email.php -text
inc/modules/admin/what-del_holiday.php -text
inc/modules/admin/what-del_sponsor.php -text
inc/modules/admin/what-list_unconfirmed.php -text
inc/modules/admin/what-list_user.php -text
inc/modules/admin/what-list_wernis.php -text
+inc/modules/admin/what-list_yoomedia_tm.php -text
inc/modules/admin/what-lock_sponsor.php -text
inc/modules/admin/what-lock_user.php -text
inc/modules/admin/what-logs.php -text
inc/reset/reset_engine.php -text
inc/reset/reset_holiday.php -text
inc/reset/reset_surfbar.php -text
+inc/reset/reset_yoomedia.php -text
inc/security.php -text
inc/session.php -text
inc/sql_error.php -text
templates/de/html/admin/admin_config_transfer.tpl -text
templates/de/html/admin/admin_config_user.tpl -text
templates/de/html/admin/admin_config_wernis.tpl -text
+templates/de/html/admin/admin_config_yoomedia.tpl -text
templates/de/html/admin/admin_contct_user_form.tpl -text
templates/de/html/admin/admin_data_saved.tpl -text
templates/de/html/admin/admin_del_admins.tpl -text
templates/de/html/admin/admin_list_user_sort_form.tpl -text
templates/de/html/admin/admin_list_wernis_main.tpl -text
templates/de/html/admin/admin_list_wernis_row.tpl -text
+templates/de/html/admin/admin_list_yoomedia_tm.tpl -text
+templates/de/html/admin/admin_list_yoomedia_tm_already.tpl -text
+templates/de/html/admin/admin_list_yoomedia_tm_row.tpl -text
templates/de/html/admin/admin_lock_sponsor.tpl -text
templates/de/html/admin/admin_lock_surfbar_urls.tpl -text
templates/de/html/admin/admin_lock_surfbar_urls_row.tpl -text
templates/de/html/admin/admin_send_bonus_form.tpl -text
templates/de/html/admin/admin_send_bonus_select.tpl -text
templates/de/html/admin/admin_send_reset_link.tpl -text
+templates/de/html/admin/admin_send_yoomedia.tpl -text
templates/de/html/admin/admin_settings_saved.tpl -text
templates/de/html/admin/admin_sponsor_paytypes.tpl -text
templates/de/html/admin/admin_sub_points.tpl -text
templates/de/html/admin/admin_validate_reset_hash_form.tpl -text
templates/de/html/admin/admin_welcome.tpl -text
templates/de/html/admin/admin_welcome_admins.tpl -text
+templates/de/html/admin/admin_yoomedia_error.tpl -text
templates/de/html/agb.tpl -text
templates/de/html/beg/.htaccess -text
templates/de/html/beg/beg_banner.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "485");
+define('CURR_SVN_REVISION', "486");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
// Load CSS file?
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='admins' LIMIT 1";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other themes
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='usr_online' LIMIT 1";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other menu themes
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='usr_online' LIMIT 1";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'";
if (EXT_IS_ACTIVE("bonus"))
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT '0'";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y','', 0)";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT '3600'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_countries (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Doubler table
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_doubler (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Create database
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_holidays (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nickname VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_online";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_online (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_optimize_gain(
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_payouts";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_payouts (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_primera";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_primera (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_data";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_prices";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_refs`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_refs` (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
//
// SQL commands to run
//
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run (surfbar URLs)
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_urls` (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)";
break;
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running
+case "register": // Do stuff when installation is running
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "";
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_wernis (
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_id` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_sid` BIGINT(20) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_erotic_allowed` TINYINT(2) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) NOT NULL DEFAULT ".(24 * 8)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_clicks_remain` INT(7) NOT NULL DEFAULT 1000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_total` SMALLINT(6) NOT NULL DEFAULT 200";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `yoomedia_requests_remain` SMALLINT(6) NOT NULL DEFAULT 200";
+
+ // Admin menu
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)";
+
+ // Reload lock table
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`";
+ $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_yoomedia_reload` (
+`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`type` VARCHAR(255) NOT NULL DEFAULT 'general',
+`y_id` BIGINT(20) NOT NULL DEFAULT 0,
+`y_reload` SMALLINT(6) NOT NULL DEFAULT 0,
+`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`id`),
+UNIQUE `y_type` (`type`,`y_id`)
+) TYPE=MyISAM COMMENT='Reload lock reminder for Yoo!Media campaigns'";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm') LIMIT 2";
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_yoomedia_reload`";
break;
case "activate": // Do stuff when admin activates this extension
break;
default: // Do stuff when extension is loaded
+ // The translation table
+ $yoomediaTranslationTable = array(
+ // Error messages
+ 'error_codes' => array(
+ 1 => 'wrong_pass',
+ 2 => 'wrong_sid',
+ 3 => 'website_locked',
+ 4 => 'api_data_error',
+ 5 => 'requests_depleted',
+ 6 => 'zero_result',
+ 10 => 'incomplete_request'
+ ),
+ // For text mails
+ 'textmail' => array(
+ 0 => 'id',
+ 1 => 'name',
+ 2 => 'reload',
+ 3 => 'wait',
+ 4 => 'remain',
+ 5 => 'pay',
+ 6 => 'text'
+ )
+ );
break;
}
$result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
- // @TODO Merge this data into $content
- list($gender, $surname, $family, $email) = SQL_FETCHROW($result);
+ // Is content an array?
+ if (is_array($content)) {
+ // Merge data
+ $content = array_merge($content, SQL_FETCHARRAY($result));
- // Translate gender
- $gender = TRANSLATE_GENDER($gender);
+ // Translate gender
+ $content['gender'] = TRANSLATE_GENDER($content['gender']);
+ } else {
+ // DEPRECATED: Load data in direct variables
+ list($gender, $surname, $family, $email) = SQL_FETCHROW($result);
- // Insert data if content is an array
- if (is_array($content)) {
- // Please switch to $content[bla] in all your templates! Direct
- // variables are deprecated as of 09/13/2008.
- $content['gender'] = $gender;
- $content['surname'] = $surname;
- $content['family'] = $family;
- $content['email'] = $email;
- } // END - if
+ // Translate gender
+ $gender = TRANSLATE_GENDER($gender);
+ }
// Free result
SQL_FREERESULT($result);
<br /><br />";
}
+ // Remove content and data
+ unset($content);
+ unset($DATA);
+
// Do we have some content to output or return?
if (!empty($ret)) {
// Not empty so let's put it out! ;)
$eval = "\$TO = \"".COMPILE_CODE(addslashes($TO))."\";";
eval($eval);
+ // Compile "MSG"
+ $eval = "\$MSG = \"".COMPILE_CODE(addslashes($MSG))."\";";
+ eval($eval);
+
// Fix HTML parameter (default is no!)
if (empty($HTML)) $HTML = "N";
if (isBooleanConstantAndTrue('DEBUG_MODE')) {
SEND_HTML_EMAIL($TO, $SUBJECT, $MSG, $FROM);
} elseif (!empty($TO)) {
// Send Mail away
- SEND_RAW_EMAIL($TO, COMPILE_CODE($SUBJECT), COMPILE_CODE($MSG), $FROM);
+ SEND_RAW_EMAIL($TO, $SUBJECT, $MSG, $FROM);
} elseif ($HTML == "N") {
// Problem found!
- SEND_RAW_EMAIL(WEBMASTER, COMPILE_CODE($SUBJECT), COMPILE_CODE($MSG), $FROM);
+ SEND_RAW_EMAIL(WEBMASTER, "[PROBLEM:]".$SUBJECT, $MSG, $FROM);
}
}
if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx.";
} // END - if
+ // Remove content and data
+ unset($content);
+ unset($DATA);
+
// Return compiled content
return COMPILE_CODE($newContent);
}
// Return it
return $referer;
}
-//
+
+// Adds a bonus mail to the queue
+// This is a high-level function!
+function ADD_NEW_BONUS_MAIL ($data, $mode="", $output=true) {
+ // Use mode from data if not set and availble ;-)
+ if ((empty($mode)) && (isset($data['mode']))) $mode = $data['mode'];
+
+ // Generate receiver list
+ $RECEIVER = GENERATE_RECEIVER_LIST($data['cat'], $data['receiver'], $mode);
+
+ // Receivers added?
+ if (!empty($RECEIVER)) {
+ // Add bonus mail to queue
+ ADD_BONUS_MAIL_TO_QUEUE(
+ $data['subject'],
+ $data['text'],
+ $RECEIVER,
+ $data['points'],
+ $data['seconds'],
+ $data['url'],
+ $data['cat'],
+ $mode,
+ $data['receiver']
+ );
+
+ // Mail inserted into bonus pool
+ if ($output) LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_SEND);
+ } elseif ($output) {
+ // More entered than can be reached!
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MORE_SELECTED);
+ } else {
+ // Debug log
+ DEBUG_LOG(__FUNCTION__."(".__LINE__."): cat={$data['cat']},receiver={$data['receiver']},data=".base64_encode(serialize($data))." More selected, than available!");
+ }
+}
+
//////////////////////////////////////////////////
// //
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/10/2008 *
+ * =============== Last change: 10/10/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : yoomedia_de.php *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Deutsche Sprachunterstuetzung *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Admin config strings
+define('ADMIN_CONFIG_YOOMEDIA_TITLE', "Einstellungen für Yoo!Media Interface 2.0");
+define('ADMIN_CONFIG_YOOMEDIA_ID', "Ihre User-ID:");
+define('ADMIN_CONFIG_YOOMEDIA_SID', "Seiten-ID:");
+define('ADMIN_CONFIG_YOOMEDIA_PASSWD', "Interface-Passwort:");
+define('ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD', "Maximale Reloadsperre der Kampagnen in Stunden:");
+define('ADMIN_CONFIG_YOOMEDIA_TM_MIN_WAIT', "Mindestaufenthalt in Sekunden:");
+define('ADMIN_CONFIG_YOOMEDIA_TM_CLICKS_REMAIN', "Mindestanzahl der restlichen Klicks:");
+define('ADMIN_CONFIG_YOOMEDIA_TM_MIN_PAY', "Mindestvergütung der Kampagne:");
+define('ADMIN_CONFIG_YOOMEDIA_EROTIC_ALLOWED', "Kampagnen mit erotischen Inhalt anzeigen?");
+define('ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE', "Keine Erotik anzeigen");
+define('ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE', "Auch Erotik anzeigen");
+define('ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY', "Nur Erotik anzeigen");
+define('ADMIN_CONFIG_YOOMEDIA_EROTIC_NOTE', "<strong>Hinweise:</strong> Sollten Sie Erotik in Ihrem {!MT_WORD!} anzeigen wollen, so sollten Sie einen Jugendschutzbeauftragten haben und diesen im Impressum nennen. Das gesamte MXChange-Team weisst darauf hin, dass niemand aus dem Team Ihnen hierzu rechtsberatende Hinweise geben kann. Auch im Community-Forum erfolgt keine Rechtsberatung! Etwaige Postings werden entweder kommentarlos gelöscht oder gesperrt.");
+define('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED', "Konfigurationsdaten stimmen nicht überein. Details entnehmen Sie bitte der Datei <u>inc/cache/debug.log</u>.");
+
+// Generic admin strings
+define('ADMIN_YOOMEDIA_REQUESTS_DEPLETED', "Ihr Abfragekonto der API ist erschöpft. Bitte surfen Sie auf <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.YooMedia.de</a> und loggen Sie sich ein, um manuell Mails zu versenden.");
+define('ADMIN_YOOMEDIA_INVALID_RESULT', "Ungültige Antwort von der API erhalten. Ist <a href=\"http://www.yoomedia.de\" target=\"_blank\">www.yoomedia.de</a> erreichbar?");
+define('ADMIN_YOOMEDIA_PREPARE_MAIL', "Bonusmail vorbereiten");
+define('ADMIN_YOOMEDIA_REMOVE_MAIL', "Mail entfernen");
+define('ADMIN_YOOMEDIA_UNLIST_MAIL', "Aus Ausschlussliste nehmen");
+define('ADMIN_YOOMEDIA_TEXTMAIL_ALREADY_SENT', "Textmail wurde <strong>%s</strong> bereits versendet.");
+define('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', "Textmail kann in <strong>%s</strong> erneut versendet werden.");
+define('ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED', "Textmail wurde manuell gesperrt.");
+define('ADMIN_LIST_YOOMEDIA_TITLE', "Alle Textmails von der Yoo!Media API 2.0 anzeigen");
+define('ADMIN_LIST_YOOMEDIA_NOTE', "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie können eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist!");
+define('ADMIN_YOOMEDIA_SEND_MAIL_TITLE', "Textmail aus Yoo!Media API 2.0 versenden");
+define('ADMIN_YOOMEDIA_RECEIVER_ARE_ALL_NOTE', "Es werden in der jeweiligen Kategorie alle verfügbaren Empfänger ausgewählt.");
+
+// Subject lines
+define('ADMIN_YOOMEDIA_SUBJECT_PREFIX', "Paidmail:");
+define('ADMIN_YOOMEDIA_ENTER_URL_NOTE', "Die URL wird automatisch für Sie konstruiert!");
+
+// Admin header lines
+define('ADMIN_YOOMEDIA_TM_ID', "Id");
+define('ADMIN_YOOMEDIA_TM_NAME', "Betreff");
+define('ADMIN_YOOMEDIA_TM_RELOAD', "Reloadsperre");
+define('ADMIN_YOOMEDIA_TM_WAIT', "Mindestaufenthalt");
+define('ADMIN_YOOMEDIA_TM_REMAIN', "Klicks übrig");
+define('ADMIN_YOOMEDIA_TM_PAY', "Vergütung");
+define('ADMIN_YOOMEDIA_TM_ACTIONS', "Aktionen");
+
+// Error messages for admin
+define('ADMIN_YOOMEDIA_ERROR_FAILED', "Allgemeiner Fehler von API, nicht weiter spezifiziert.");
+define('ADMIN_YOOMEDIA_ERROR_TITLE', "Fehler bei Abfrage der Yoo!Media API 2.0");
+define('ADMIN_YOOMEDIA_ERROR_WRONG_PASS', "Falsches Interfacepasswort angegeben.");
+define('ADMIN_YOOMEDIA_ERROR_WRONG_SID', "Falsche Seiten-ID verwendet.");
+define('ADMIN_YOOMEDIA_ERROR_WEBSITE_LOCKED', "Ihre Webseite (Werbefläche) wurde bei Yoo!Media gesperrt.");
+define('ADMIN_YOOMEDIA_ERROR_API_DATA_ERROR', "Fehler in API-Daten erkannt.");
+define('ADMIN_YOOMEDIA_ERROR_REQUESTS_DEPLETED', "Abfrageguthaben erschöpft.");
+define('ADMIN_YOOMEDIA_ERROR_ZERO_RESULT', "Keine Buchungenz zur Auswahl gefunden.");
+define('ADMIN_YOOMEDIA_ERROR_INCOMPLETE_REQUEST', "Abfragedaten sind nicht komplett.");
+
+//
+?>
$line = "";
// String or non-string? ;-)
- if (is_string($value)) {
+ if ((is_string($value)) || (is_null($value))) {
// String...
$line = "\$data['".$key."'][] = \"".$value."\";\n";
} else {
//
function REPAIR_OPTIMIZE_DB()
{
- global $MySQL;
$ret = array();
$tot_data = 0; $tabs = 0; $opts = 0;
$tot_idx = 0; $total_gain = 0;
$tot_all = 0;
- $result = @SQL_QUERY("SHOW TABLE STATUS FROM ".$MySQL['dbase'], __FILE__, __LINE__);
+ $result = @SQL_QUERY("SHOW TABLE STATUS FROM ".__DB_NAME, __FILE__, __LINE__);
$tabs = @SQL_NUMROWS($result);
$ret['total_size'] = 0;
$ret['total_tabs'] = $tabs;
+ $ret['tables'] = array();
if ($tabs > 0)
{
while ($row = SQL_FETCHARRAY($result))
}
}
- if (($TOTAL < $min_prices) || ($TOTAL == 0))
- {
+ if (($TOTAL < $min_prices) || ($TOTAL == 0)) {
// Do not end this rallye!
+ unset($DATA);
return;
}
}
// Send mail to admin
+ die("OK!");
SEND_ADMIN_NOTIFICATION(RALLYE_ADMIN_EXPIRED.": ".$title, $templ, $cnt, 0);
// Add task
function RALLYE_DELETE_EXPIRED_RALLYES()
{
global $DATA, $_CONFIG;
+
// Check for expired rallyes
$EXPIRE = $_CONFIG['one_day'] * 3; // @TODO The hard-coded value...
$result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/10/2008 *
+ * =============== Last change: 10/10/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : yoomedia_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Special functions for yoomedia extension *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Spezielle Funktion fuer Yoo!Media-Erweiterung *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Test if the extension settings did work
+function YOOMEDIDA_TEST_CONFIG ($data) {
+ global $_CONFIG;
+
+ // Is this admin?
+ if (!IS_ADMIN()) {
+ // No admin!
+ return false;
+ } // END - if
+
+ // Transfer config data
+ $_CONFIG = array_merge($_CONFIG, $data);
+
+ // Temporary allow maximum
+ $_CONFIG['yoomedia_tm_max_reload'] = 1000;
+ $_CONFIG['yoomedia_tm_min_wait'] = 0;
+ $_CONFIG['yoomedia_tm_clicks_remain'] = 10;
+ $_CONFIG['yoomedia_tm_min_pay'] = 0;
+ $_CONFIG['yoomedia_erotic_allowed'] = 1;
+
+ // Query the API with a test request without couting it
+ // If zero reply comes back the data is invalid!
+ $response = YOOMEDIA_QUERY_API("out_textmail.php", true); // TODO Ask Yoo!Media for test script
+
+ // Log the response if failed
+ if (count($response) == 0) {
+ // Queries depleted (as we count here!)
+ DEBUG_LOG(__FUNCTION__."(".__LINE__."): Requested depleted. Maxmimum was: ".$_CONFIG['yoomedia_requests_total']);
+ } elseif (count($response) <= 10) {
+ // Log serialized raw response
+ DEBUG_LOG(__FUNCTION__."(".__LINE__."): Raw response=".base64_encode(serialize($response)));
+ } // END - if
+
+ // Do we have some data there?
+ return (count($response) > 10);
+}
+
+// Queries the given Yoo!Media API 2.0 script
+function YOOMEDIA_QUERY_API ($script, $countQuery = true) {
+ global $_CONFIG;
+
+ // Init response array
+ $response = array();
+
+ // Enougth queries left?
+ if (($_CONFIG['yoomedia_requests_remain'] > 0) || (!$countQuery)) {
+ // Prepare the low-level request
+ $requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s",
+ $script,
+ bigintval($_CONFIG['yoomedia_id']),
+ bigintval($_CONFIG['yoomedia_sid']),
+ $_CONFIG['yoomedia_passwd'],
+ bigintval($_CONFIG['yoomedia_tm_max_reload']),
+ bigintval($_CONFIG['yoomedia_tm_min_wait']),
+ bigintval($_CONFIG['yoomedia_tm_clicks_remain']),
+ bigintval($_CONFIG['yoomedia_tm_min_pay']),
+ bigintval($_CONFIG['yoomedia_erotic_allowed'])
+ );
+
+ // Run the query
+ $response = GET_URL($requestString);
+
+ // Shall we count the query as used?
+ if ($countQuery) {
+ // Then update the config!
+ UPDATE_CONFIG("yoomedia_requests_remain", 1, "-");
+ } // END - if
+ } // END - if
+
+ // Return the data
+ return $response;
+}
+
+// "Getter" for a parsed result for all text mails. This means an array without
+// the header lines will be returned
+function YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS () {
+ // Get the raw response
+ $response = YOOMEDIA_QUERY_API("out_textmail.php");
+
+ // Parse the response
+ $result = YOOMEDIA_PARSE_RESPONSE($response, "textmail");
+
+ // Return result
+ return $result;
+}
+
+// Parser function for Yoo!Media API responses
+function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
+ // Init result
+ $result = array();
+
+ // Cut off the header
+ $dummy = $response;
+ foreach ($response as $line) {
+ // Remove line
+ array_shift($dummy);
+
+ // Is this line empty?
+ if (empty($line)) {
+ // Then stop here
+ break;
+ } // END - if
+ } // END - foreach
+
+ // The result is now still raw, so we must split it up and trim spaces away
+ $responseLine = trim(implode("\n", $dummy));
+
+ // Last line should never be a pipe!
+ if (substr($responseLine, -1, 1) == "|") $responseLine = substr($responseLine, 0, -1);
+
+ // Now, explode all in one array
+ $dataArray = explode("|", $responseLine);
+
+ // Now make the result array with two dimensions
+ $cnt = 0; $entry = 0;
+ foreach ($dataArray as $line) {
+ // Add the line
+ $result[$entry][YOOMEDIA_TRANSLATE_INDEX($type, $cnt)] = $line;
+
+ // End of data of first entry reached?
+ if ($cnt == 6) {
+ // Then advance to next entry and reset counter
+ $entry++;
+ $cnt = 0;
+ } else {
+ // Count up
+ $cnt++;
+ }
+ } // END - foreach
+
+ // Return it
+ return $result;
+}
+
+// Prepares a bonus mail for delivery. Works only if extension "bonus" is active
+function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) {
+ global $_CONFIG;
+
+ // Is this an admin?
+ if (!IS_ADMIN()) {
+ // Abort here
+ return false;
+ } elseif (!EXT_IS_ACTIVE("bonus")) {
+ // Abort here
+ return false;
+ }
+
+ // Is the waiting time below one second? Then fix it to one (zero seconds are not yet supported!)
+ if ($data['wait'] < 1) $data['wait'] = 1;
+
+ // Half of waiting time is a good reward!
+ $data['reward'] = round($data['wait'] / 2 + 0.4);
+
+ // Is the reward below one?
+ if ($data['reward'] < 1) $data['reward'] = 1;
+
+ // Add website id
+ $data['sid'] = $_CONFIG['yoomedia_sid'];
+
+ // Add total receivers
+ $data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS());
+
+ // Add categories
+ $data['categories'] = ADD_CATEGORY_OPTIONS("normal");
+
+ // Load template
+ LOAD_TEMPLATE("admin_send_yoomedia", false, $data);
+}
+
+// Adds the mail to the bonus mail pool
+function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) {
+ global $_CONFIG;
+
+ // Is this an admin?
+ if (!IS_ADMIN()) {
+ // Abort here
+ return false;
+ } elseif (!EXT_IS_ACTIVE("bonus")) {
+ // Abort here
+ return false;
+ }
+
+ // Add dummy receiver to avoid notice
+ $data['receiver'] = 0;
+
+ // HTML or normal? (normal is default...)
+ $type = "t";
+ if (($mode == "html") && (EXT_IS_ACTIVE("html"))) $type = "h";
+
+ // Auto-generate URL
+ $data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s",
+ $type,
+ $data['id'],
+ $data['sid']
+ );
+
+ // Lock this mail for new delivery
+ YOOMEDIA_RELOAD_LOCK($data, $mode);
+
+ // Call the lower function
+ ADD_NEW_BONUS_MAIL($data, $mode);
+}
+
+// Lockdown given id
+function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) {
+ // Search for the entry
+ if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) {
+ // Convert mode for mails
+ $mode = YOOMEDIA_CONVERT_MODE($mode);
+
+ // Add the entry
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES('%s',%s,%s,'0000-00-00 00:00')",
+ array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
+ } // END - if
+}
+
+// Remove lock of given mail
+function YOOMEDIA_UNLIST_MAIL ($data, $mode) {
+ // Convert mode for mails
+ $mode = YOOMEDIA_CONVERT_MODE($mode);
+
+ // Add the entry
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
+ array($mode, bigintval($data['id'])), __FILE__, __LINE__);
+}
+
+// "Translates" the index number into an assosiative value
+function YOOMEDIA_TRANSLATE_INDEX ($type, $index) {
+ global $yoomediaTranslationTable;
+
+ // Default is the index
+ $return = $index;
+
+ // Is the element there?
+ if (isset($yoomediaTranslationTable[$type][$index])) {
+ // Use this element
+ $return = $yoomediaTranslationTable[$type][$index];
+ } else {
+ // Not found!
+ DEBUG_LOG(__FUNCTION__."(".__LINE__."): type={$type},index={$index} not found.");
+ }
+
+ // Return value
+ return $return;
+}
+
+// "Translate" error code
+function YOOMEDIA_TRANSLATE_ERROR ($errorCode) {
+ global $yoomediaTranslationTable;
+
+ // Default is "failed"
+ $return = "failed";
+
+ // Is the entry there?
+ if (isset($yoomediaTranslationTable['error_codes'][$errorCode])) {
+ // Entry found!
+ $return = $yoomediaTranslationTable['error_codes'][$errorCode];
+ } else {
+ // Log missing entries
+ DEBUG_LOG(__FUNCTION__."(".__LINE__."): errorCode={$errorCode}");
+ }
+
+ // Return value
+ return $return;
+}
+
+// Checks if the mail id is in reload lock
+function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
+ // Default is not in reload lock
+ $reloaded = false;
+
+ // Query database
+ $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `"._MYSQL_PREFIX."_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
+ array($type, bigintval($id)), __FILE__, __LINE__);
+
+ // Entry found?
+ if (SQL_NUMROWS($result) == 1) {
+ // Load time
+ list($id, $time) = SQL_FETCHROW($result);
+
+ // Are we ready to sent again?
+ if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
+ // Remove entry
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_yoomedia_reload WHERE id=%s LIMIT 1",
+ array($id), __FILE__, __LINE__);
+ } else {
+ // Dont' sent again this mail
+ $reloaded = $time;
+ }
+ } // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $reloaded;
+}
+
+// Lock given mail down for reload lock
+function YOOMEDIA_RELOAD_LOCK ($data, $mode) {
+ // Search for the entry
+ if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mode) === false) {
+ // Convert mode for mails
+ $mode = YOOMEDIA_CONVERT_MODE($mode);
+
+ // Add the entry
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES('%s',%s,%s)",
+ array($mode, bigintval($data['id']), bigintval($data['reload'])), __FILE__, __LINE__);
+ } // END - if
+}
+
+// Convert mode for mails
+function YOOMEDIA_CONVERT_MODE ($mode) {
+ // Convert mode for normal/html
+ switch ($mode) {
+ case "normal":
+ $mode = "textmail";
+ break;
+
+ case "html":
+ $mode = "htmlmail";
+ break;
+ } // END - switch
+
+ // Return result
+ return $mode;
+}
+
+//
+?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf(."%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_POST['no'])) {
// Do not logout now
} elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) {
// Redirect to logout link
LOAD_URL("modules.php?module=admin&logout=1");
-} else {
- // Load logout form template
- LOAD_TEMPLATE("admin_logout_form");
}
+
+// Load logout form template
+LOAD_TEMPLATE("admin_logout_form");
+
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/admin/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Is the formular sent?
if (isset($_POST['ok'])) {
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Fix a notice
if (!isset($_GET['u_id'])) $_GET['u_id'] = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save sponsor in database
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Was an URL added?
if ((isset($_POST['add'])) && (!empty($_POST['url']))) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check if the admin has entered title and what-php file name...
if (((empty($_POST['title'])) || (empty($_POST['menu'])) || (empty($_POST['descr']))) && (isset($_POST['ok']))) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Do we edit/delete/change main menus or sub menus?
$AND = "(what = '' OR what IS NULL)"; $SUB = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
global $cacheInstance;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ((isset($_POST['ok'])) && (!empty($_GET['admin']))) {
// Send mail or message
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Instance for the cache extension
global $cacheInstance;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['edit']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Data was submitted so we store it
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Calculate total hits
$totalHits = ($_CONFIG['db_hits'] + $_CONFIG['cache_hits']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save data
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save configuration
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$SEL = 0;
if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Data was submitted so we store it
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Translate german decimal commas to computer decimal dots
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save configuration
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Replace german decimal commas to computer decimal dots
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Cache path has been not changed by default so don't test it again
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Init variable to avoid a notice
$CATS = "";
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Replace commata with decimal dot
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Remove empty array index
if (empty($_POST['max'])) unset($_POST['add_max']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save configuration
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$sub = "";
if (!empty($_GET['sub'])) $sub = $_GET['sub'];
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$SEL = 0;
if (isset($_POST['edit']))
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save data
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save data
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Stop saving data if one input field is !isset
if (isset($_POST['ok'])) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_POST['rate'])) $_POST['rate'] = REVERT_COMMA($_POST['rate']);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['sub'])) {
switch ($_GET['sub'])
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// First merge temporarily the new API data into the current config
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Test proxy settings
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['rallye']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save data
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ((isset($_POST['ok'])) && (function_exists('CREATE_TIME_SELECTIONS')))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Do we want to save changes?
if (isset($_POST['ok'])) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Calculate timestamp from selections...
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save configuration
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Generate string
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Test Path
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Allow only direct points (non-floating)
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Was the form submitted?
if (isset($_POST['ok'])) {
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Was the form submitted?
if (isset($_POST['ok'])) {
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// Save settings...
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok'])) {
// First merge temporarily the new API data into the current config
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/10/2008 *
+ * ================ Last change: 10/10/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-yoomedia.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Setup default statistics mode *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Standart Modus der Statistiken einstellen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif ((!EXT_IS_ACTIVE("yoomedia")) && (!IS_ADMIN())) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
+ return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Was the form submitted?
+if (isset($_POST['ok'])) {
+ // Test Yoo!Media config
+ if (YOOMEDIDA_TEST_CONFIG($_POST)) {
+ // Save settings
+ ADMIN_SAVE_SETTINGS($_POST);
+ } else {
+ // Config not saved
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_CONFIG_YOOMEDIA_TEST_FAILED);
+ }
+} else {
+ // Prepare content
+ $content = array(
+ 'yoomedia_id' => bigintval($_CONFIG['yoomedia_id']),
+ 'yoomedia_sid' => bigintval($_CONFIG['yoomedia_sid']),
+ 'yoomedia_passwd' => $_CONFIG['yoomedia_passwd'],
+ 'yoomedia_tm_max_reload' => bigintval($_CONFIG['yoomedia_tm_max_reload']),
+ 'yoomedia_tm_min_wait' => bigintval($_CONFIG['yoomedia_tm_min_wait']),
+ 'yoomedia_tm_clicks_remain' => bigintval($_CONFIG['yoomedia_tm_clicks_remain']),
+ 'yoomedia_tm_min_pay' => bigintval($_CONFIG['yoomedia_tm_min_pay'])
+ );
+
+ // Erotic?
+ switch ($_CONFIG['yoomedia_erotic_allowed']) {
+ case 0: // No erotic at all
+ define('__CFG_YOOMEDIA_EROTIC_NONE' , " selected=\"selected\"");
+ define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
+ define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
+ break;
+
+ case 1: // Include erotic
+ define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
+ define('__CFG_YOOMEDIA_EROTIC_INCLUDE', " selected=\"selected\"");
+ define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
+ break;
+
+ case 2: // Erotic only
+ define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
+ define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
+ define('__CFG_YOOMEDIA_EROTIC_ONLY' , " selected=\"selected\"");
+ break;
+ }
+
+ // Load template
+ LOAD_TEMPLATE("admin_config_yoomedia", false, $content);
+}
+
+//
+?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['mid'])) {
// Load email data
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check for selected holidays
$SUM = 0;
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['id']))) {
// Check for selected sponsor
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!EXT_IS_ACTIVE("task")) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['del']))
{
}
// Display only title when no form was submitted
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// User exists..
if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ((isset($_POST['ok'])) && (empty($_POST['id']))) {
unset($_POST['ok']);
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ((!empty($_GET['id'])) && (!empty($_GET['mode']))) {
// Check for selected sponsor
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Fix a notice
$result_main = false;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// 0 1 2 3 4 5 6 7 8 9 10
$SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Normal mails ordered by your members
// 0 1 2 3 4 5 6 7 8 9 10
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
global $cacheInstance, $cacheArray, $cacheMode;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check if the admin has entered title and what-php file name...
if (((empty($_POST['title'])) || (empty($_POST['menu']))) && (isset($_POST['ok'])))
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Do we edit/delete/change main menus or sub menus?
$AND = "what = ''"; $SUB = "";
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Exclude default referal id if set
$EXCLUDE_LIST = "";
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check if there is enougth selected
$show = true;
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ($_CONFIG['beg_rallye'] == "Y")
{
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ($_CONFIG['bonus_active'] == "Y") {
// Shall I withdraw now?
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['u_id'])) {
// Check if the user already exists
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Add new code?
if ((isset($_POST['add'])) && (!empty($_POST['code'])) && (!empty($_POST['descr'])))
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (empty($_GET['mode'])) {
// Chosse the overview page as default
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Start listing holiday requests
$result = SQL_QUERY("SELECT h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online FROM "._MYSQL_PREFIX."_user_holidays AS h, "._MYSQL_PREFIX."_user_data AS d WHERE h.userid=d.userid ORDER BY h.userid", __FILE__, __LINE__);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (empty($_GET['del'])) $_GET['del'] = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if ((!empty($_POST['uid'])) && (!empty($_POST['id'])))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$MORE = ", userid"; $colspan = "4"; // 27
if (EXT_IS_ACTIVE("nickname")) { $MORE = ", nickname"; }
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Init variables
$WHO = _ALL;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['pid']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check for entries
$result = SQL_QUERY("SELECT id, userid, primera_account, primera_amount, primera_timestamp, primera_type, primera_api_message, primera_api_status FROM "._MYSQL_PREFIX."_user_primera ORDER BY primera_timestamp DESC, id DESC",
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (empty($_GET['sub'])) $_GET['sub'] = "";
$MSG = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['u_id'])) {
// Secure userid
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['id'])) {
// Show detailed informations to a sponsor
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
+
$MSG = "";
if (isset($_POST['add'])) {
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['id'])) {
// Check for selected sponsor
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// By default show the list...
$show = true;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$whereStatement = "";
if (empty($_GET['type'])) $_GET['type'] = "your";
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN()))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// We only need outgoing transfers
$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out ORDER BY trans_id", __FILE__, __LINE__);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Don't load the admin_list_unconfirmed template by default
$listed = false;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Init title with "all accounts"
$listHeader = ADMIN_ALL_ACCOUNTS;
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check for entries
$result = SQL_QUERY("SELECT id, userid, wernis_account, wernis_amount, wernis_timestamp, wernis_type, wernis_api_message, wernis_api_status FROM "._MYSQL_PREFIX."_user_wernis ORDER BY wernis_timestamp DESC, id DESC",
--- /dev/null
+<?php
+/************************************************************************
+ * M-XChange v0.2.1 Start: 10/10/2008 *
+ * ================ Last change: 10/10/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-list_yoomedia_tm.php *
+ * -------------------------------------------------------------------- *
+ * Short description : List Yoo!Media text mails *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auflisten von Yoo!Media Textmails *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software. You can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
+ require($INC);
+} elseif (!EXT_IS_ACTIVE("yoomedia")) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
+ return;
+} elseif (!EXT_IS_ACTIVE("bonus")) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "bonus");
+ return;
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
+
+// Do actions here
+if (isset($_POST['ok'])) {
+ // Prepare mail for delivery
+ YOOMEDIA_PREPARE_MAIL_DELIVERY($_POST);
+ return;
+} elseif (isset($_POST['sent'])) {
+ // Sent mail
+ YOOMEDIA_SEND_BONUS_MAIL($_POST, "normal");
+} elseif (isset($_POST['remove'])) {
+ // Add mail to exclude list
+ YOOMEDIA_EXCLUDE_MAIL($_POST, "normal");
+} elseif (isset($_POST['unlist'])) {
+ // Remove mail from exclude list
+ YOOMEDIA_UNLIST_MAIL($_POST, "normal");
+}
+
+// Enougth queries left?
+if ($_CONFIG['yoomedia_requests_remain'] == 0) {
+ // Output message
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_YOOMEDIA_REQUESTS_DEPLETED);
+
+ // Abort here!
+ //return false;
+} // END - if
+
+// Get parsed array back
+$result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS();
+
+// Sanity-check on result array
+if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
+ // Invalid result
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_YOOMEDIA_INVALID_RESULT);
+ return false;
+} elseif (count($result[0]) < 7) {
+ // Error received so prepare error code
+ $code = explode(" ", $result[0]['id']);
+ $code = $code[0];
+ $code = explode("<br>", $code);
+ $code = $code[0];
+
+ // Output message
+ LOAD_TEMPLATE("admin_yoomedia_error", false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(YOOMEDIA_TRANSLATE_ERROR($code))));
+ return false;
+}
+
+// Temporary set max comma
+$_CONFIG['max_comma'] = 5;
+
+// Prepare all entries
+$OUT = ""; $SW = 2;
+foreach ($result as $entry) {
+ // Translate some data
+ $entry['pay'] = TRANSLATE_COMMA($entry['pay']);
+ $entry['remain'] = TRANSLATE_COMMA($entry['remain']);
+ $entry['sw'] = $SW;
+
+ // Check reload lock
+ $reload = YOOMEDIA_CHECK_RELOAD($entry['id'], $entry['reload'], "textmail");
+
+ // Is this mail already sent?
+ if ($reload !== false) {
+ // Init countdown
+ $countdown = 0;
+
+ // Not manually locked?
+ if ($reload > 0) {
+ // Calculate countdown
+ $countdown = $reload + ($entry['reload'] * 60*60) - time();
+
+ // Countdown < 60 seconds and bigger zero?
+ if (($countdown < 60) && ($countdown > 0)) {
+ // Fix to one minute
+ $countdown = 60;
+ } // END - if
+
+ // Add reload lock
+ $entry['already'] = sprintf(ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN, CREATE_FANCY_TIME($countdown));
+ } else {
+ // Never resentable unless manual removal
+ $entry['already'] = ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED;
+ }
+
+ // Load row template for displaying
+ $OUT .= LOAD_TEMPLATE("admin_list_yoomedia_tm_already", true, $entry);
+ } else {
+ // Load row template with buttons
+ $OUT .= LOAD_TEMPLATE("admin_list_yoomedia_tm_row", true, $entry);
+ }
+
+ // Switch color
+ $SW = 3 - $SW;
+} // END - if
+
+// Load main template
+LOAD_TEMPLATE("admin_list_yoomedia_tm", false, $OUT);
+
+//
+?>
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$MSG = "";
if (!empty($_GET['id'])) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['u_id']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (!empty($_GET['access'])) {
// Secure input and construct FQFN
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add desciption as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check if the admin has entered title and what-php file name...
if ((empty($_POST['title'])) && (isset($_POST['ok'])))
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Do we edit/delete/change main menus or sub menus?
$AND = "what = ''"; $SUB = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Optimize and repair database and return the result as a multi-dimensional array
$DATA = REPAIR_OPTIMIZE_DB();
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Otherwise load include file 'overview-inc' (old standard overview page)
require_once(PATH."inc/modules/admin/overview-inc.php");
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (empty($_GET['do'])) unset($_GET['do']);
if (((empty($_POST['t_wait'])) || (empty($_POST['payment']))) && (!empty($_GET['do'])) && ($_GET['do'] == "add"))
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$SEL = 0;
if ((empty($_POST['url'])) || (empty($_POST['alternate'])))
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$ACTIONS = array();
// First fix all main menus (what="")...
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_cats ORDER BY userid", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$ACTIONS = array();
// First fix all main menus (what="")...
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
$ACTIONS = array();
// First fix all main menus (what="")...
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
-$whereStatement = " WHERE visible='Y'";
-if (is_admin()) $whereStatement = "";
-$EXT_HTML = EXT_IS_ACTIVE("html_mail");
+// Set empty mode to "select"
if (empty($_GET['mode'])) $_GET['mode'] = "select";
-if (isset($_POST['ok']))
-{
- // Check if category and number of receivers is okay
- $CAT_TABS = "%s"; $CAT_WHERE = ""; $cat = "";
- if ($_POST['cat'] > 0)
- {
- // Select category
- $CAT_TABS = "LEFT JOIN "._MYSQL_PREFIX."_user_cats AS c ON d.userid=c.userid";
- $cat = bigintval($_POST['cat']);
- $CAT_WHERE = " AND c.cat_id=%s";
- }
- if (GET_EXT_VERSION("holiday") >= "0.1.3")
- {
- // Add something for the holiday extension
- $CAT_WHERE .= " AND d.holiday_active='N'";
- }
-
- if (($EXT_HTML) && ($_GET['mode'] == "html"))
- {
- // Only include HTML receivers
- $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
- array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__);
- }
- else
- {
- // Include all
- $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
- array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__);
- }
- if ((SQL_NUMROWS($result) == $_POST['receiver']) && ($_POST['receiver'] > 0))
- {
- $RECEIVER = "";
- while (list($REC) = SQL_FETCHROW($result))
- {
- // Add receiver when not empty
- if (!empty($REC)) $RECEIVER .= ";".$REC;
- }
-
- // Free memory
- SQL_FREERESULT($result);
- $RECEIVER = substr($RECEIVER, 1);
-
- // Gettings points is oka, so we can add $USED later from
- if ($EXT_HTML)
- {
- $HTML = "N";
- if ($_GET['mode'] == "html") $HTML = "Y";
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
-(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg)
-VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
- array(
- $_POST['subject'],
- addslashes($_POST['text']),
- $RECEIVER,
- $_POST['points'],
- $_POST['seconds'],
- $_POST['url'],
- $cat,
- SELECTION_COUNT(explode(";", $RECEIVER)),
- bigintval($_POST['receiver']),
- $HTML
-), __FILE__, __LINE__);
- }
- else
- {
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
-(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent)
-VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
- array(
- $_POST['subject'],
- addslashes($_POST['text']),
- $RECEIVER,
- $_POST['points'],
- $_POST['seconds'],
- $_POST['url'],
- $cat,
- SELECTION_COUNT(explode(";", $RECEIVER)),
- bigintval($_POST['receiver']),
-), __FILE__, __LINE__);
- }
-
- // Mail inserted into bonus pool
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_SEND);
- }
- else
- {
- // More entered than can be reached!
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MORE_SELECTED);
- }
- if (!empty($URL))
- {
- // Redirect to requested URL
- LOAD_URL($URL);
- }
+if (isset($_POST['ok'])) {
+ // Deliver bonus mail
+ ADD_NEW_BONUS_MAIL($_POST, $_GET['mode']);
} else {
- $result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
- $MORE = "";
- if ($_GET['mode'] == "html") $MORE = " AND html='Y'";
- if (GET_EXT_VERSION("holiday") >= "0.1.3")
- {
- // Add something for the holiday extension
- $MORE .= " AND holiday_active='N'";
- }
-
- $result_all = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND receive_mails > 0".$MORE, __FILE__, __LINE__);
- define('__ALL_VALUE', SQL_NUMROWS($result_all));
- // Initialize array...
- $CATS = array(
- 'id' => array(),
- 'name' => array(),
- 'uids' => array()
- );
- // ... and begin loading stuff
- while (list($id, $cat) = SQL_FETCHROW($result))
- {
- $CATS['id'][] = $id;
- $CATS['name'][] = $cat;
- $result_uids = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
- array(bigintval($id)), __FILE__, __LINE__);
- $uid_cnt = 0;
- while (list($ucat) = SQL_FETCHROW($result_uids))
- {
- $result_ver = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data
-WHERE userid=%s AND status='CONFIRMED' AND receive_mails > 0".$MORE." LIMIT 1",
- array(bigintval($ucat)), __FILE__, __LINE__);
- $uid_cnt += SQL_NUMROWS($result_ver);
-
- // Free memory
- SQL_FREERESULT($result_ver);
- }
-
- // Free memory
- SQL_FREERESULT($result_uids);
- $CATS['uids'][] = $uid_cnt;
- }
-
- // Free memory
- SQL_FREERESULT($result);
+ // Get all available users
+ define('__ALL_VALUE', TRANSLATE_COMMA(GET_TOTAL_RECEIVERS($_GET['mode'])));
- if (!empty($MSG))
- {
- // We got system message so we drop it out to the user
- LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
- }
- if ($EXT_HTML)
- {
- // If HTML extension is active
- define('__HTML_SELECT', LOAD_TEMPLATE("admin_send_bonus_html", true));
- }
- else
- {
- // And if not
- define('__HTML_SELECT', "");
- }
+ // Prepare option lines
+ define('__OPTION_LINES', ADD_CATEGORY_OPTIONS($_GET['mode']));
- // Generate options
- $OUT = "";
- foreach ($CATS['id'] as $key => $value)
- {
- if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
- $OUT .= " <OPTION value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</OPTION>\n";
- }
- define('__OPTION_LINES', $OUT);
+ // Store send mode
+ define('__MODE', SQL_ESCAPE($_GET['mode']));
- // Store send mode
- define('__MODE', $_GET['mode']);
+ if (EXT_IS_ACTIVE("html_mail")) {
+ // If HTML extension is active
+ define('__HTML_SELECT', LOAD_TEMPLATE("admin_send_bonus_html", true));
+ } else {
+ // And if not
+ define('__HTML_SELECT', "");
+ }
- // Select template
- switch($_GET['mode'])
- {
+ // Select template
+ switch($_GET['mode']) {
case "html": // HTML mails
case "normal": // Normal mails
$template = "admin_send_bonus_form";
case "select": // Selection
$template = "admin_send_bonus_select";
break;
- }
-
- // Load template
- LOAD_TEMPLATE($template);
- }
- else
- {
- // No cateogries are defined yet
- OUTPUT_HTML("<STRONG><SPAN class=\"member_failed\">".MEMBER_NO_CATS."</SPAN></STRONG>");
}
+
+ // Load template
+ LOAD_TEMPLATE($template);
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (isset($_POST['ok']))
{
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// If var is empty set it to empty
if (empty($_GET['mod'])) $_GET['mod'] = "";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Fix a notice
if (!isset($_GET['u_id'])) $_GET['u_id'] = "";
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
global $cacheInstance, $cacheArray, $cacheMode;
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check for selected themes
$SEL = 0;
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Switch to testing mode
$THEME_MODE = "test";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Define some variables
global $DATA;
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check if admin has submitted form
if (isset($_POST['ok'])) {
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Is the form sent?
if ((isset($_POST['unlock'])) && (is_array($_POST['id'])) && (count($_POST['id']) > 0)) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Init array
$ONLINE['code'] = "???";
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Base directory (should be moved to database)
$usage = "usage/";
************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Is a user id given?
if ((isset($_GET['u_id'])) && (bigintval($_GET['u_id']) > 0)) {
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Count guests, members and admins
$result_guests = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
if (EXT_IS_ACTIVE("online", true))
{
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load the include file
$INC = sprintf(PATH."inc/modules/guest/what-%s.php", $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load the include file
$INC = sprintf("%sinc/modules/guest/what-%s.php", PATH, $GLOBALS['what']);
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyleft (c) 2003, 2004, 2005 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
- * This program is free software. You can redistribute it and/or modify *
+ * This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License. *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
************************************************************************/
// Some security stuff...
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load default template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// The day normally starts on 00:00:00, so let's subtract current hours/minutes/seconds from current time stamp!
$START = time() - date("H", time())*60*60 - date("m", time())*60 - date("s", time());
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Prepare constants
define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points']));
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
if (!empty($_GET['hash'])) {
// Initialize the user ID
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Percent values etc.
define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100));
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load template template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Load default template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
global $DATA, $FATAL;
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
define('value', "value");
define('lang', "lang");
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
OUTPUT_HTML("<DIV align=\"center\">");
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
global $_CONFIG, $DATA;
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Remove result_act
unset($result_act);
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
$MODE = "";
if (!empty($_GET['mode']))
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Create array for form errors (= missing data)
$FORM_ERRORS = array();
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Derterminate which stats we want and set mode and title for the link below stats block
if (!isset($_GET['mode'])) $_GET['mode'] = strtolower($_CONFIG['guest_stats']);
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
//// TOP logins
$ADD = "userid";
}
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
// Count referal levels
$result = SQL_QUERY("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_refdepths WHERE level>0", __FILE__, __LINE__);
require_once (PATH."inc/rdf.class.php");
// Add description as navigation point
-ADD_DESCR("guest", basename(__FILE__));
+ADD_DESCR("guest", __FILE__);
OUTPUT_HTML("<DIV style=\"padding-left: 10px; padding-right: 10px\">");
$rdf = new fase4_rdf;
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load the include file
$INC_WHAT = sprintf("%sinc/modules/member/what-%s.php", PATH, $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$uid = $GLOBALS['userid'];
if (EXT_IS_ACTIVE("nickname"))
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Autopurge installed?
$LAST = "%s"; $ONLINE = "";
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
if (GET_EXT_VERSION("bonus") >= "0.6.9")
{
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$UID = $GLOBALS['userid'];
$whereStatement = " WHERE visible='Y'";
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Percent values etc.
define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Simply redirect...
LOAD_URL (URL."/modules.php?module=index");
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Check for running mail orders in pool
$result1 = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_pool
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Class was found and loaded
if (isset($_POST['ok']))
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
define('UID_VALUE', $GLOBALS['userid']); $URL = "";
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load status
$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$VALID = false;
if (isset($_POST['ok']))
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$URL = ""; $id = 0;
$whereStatement = " WHERE visible='Y'";
if (empty($_POST['zip'])) $_POST['zip'] = "";
if (empty($_POST['html'])) $_POST['html'] = "";
if (empty($_POST['receiver'])) $_POST['receiver'] = "";
-if (is_admin()) $whereStatement = "";
+if (IS_ADMIN()) $whereStatement = "";
// Add slashes to every value
foreach($_POST as $key => $value)
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__);
$TPTS = 0;
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
$result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__);
$depths = SQL_NUMROWS($result_depths);
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Check if the admin has entered the data
if ((empty($_CONFIG['primera_api_name'])) || (empty($_CONFIG['primera_api_md5']))) {
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
OUTPUT_HTML("<DIV align=\"center\">");
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Was the form submitted?
if ((isset($_POST['edit'])) && (isset($_POST['id']))) {
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load current referal clicks
$result = SQL_QUERY_ESC("SELECT ref_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Init output
$main_content = array();
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
if ((!isset($_POST['ok'])) || (empty($_POST['qsummary'])))
{
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Still allowed to book more URLs?
if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load user URLs
$URLs = SURFBAR_GET_USER_URLS();
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Prepare content for output
$content = array(
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
if (!empty($_POST['member_theme'])) {
// Save theme to member's profile
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Load data
$result = SQL_QUERY_ESC("SELECT opt_in FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
if (EXT_IS_ACTIVE("bonus")) {
// Load bonus ID
}
// Add description as navigation point
-ADD_DESCR("member", basename(__FILE__));
+ADD_DESCR("member", __FILE__);
// Check if the admin has entered the data
if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) {
// Is it a valid resource?
if ($db === true) {
// Remove MySQL array from namespace
+ define('__DB_NAME', $MySQL['dbase']);
unset($MySQL);
// Load configuration stuff
// Add menu description pending on given file name (without path!)
function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) {
global $DEPTH, $_CONFIG;
+ // Use only filename of the file ;)
+ $file = basename($file);
+
+ // Init variables
$LINK_ADD = ""; $OUT = ""; $AND = "";
+
// First we have to do some analysis...
if (ereg("action-", $file)) {
// This is an action file!
// Free memory
SQL_FREERESULT($result);
}
+
+// Prepares an SQL statement part for HTML mail and/or holiday depency
+function PREPARE_SQL_HTML_HOLIDAY ($mode) {
+ // Exclude no users by default
+ $MORE = "";
+
+ // HTML mail?
+ if ($mode == "html") $MORE = " AND html='Y'";
+ if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ // Add something for the holiday extension
+ $MORE .= " AND holiday_active='N'";
+ } // END - if
+
+ // Return result
+ return $MORE;
+}
+
+// "Getter" for total available receivers
+function GET_TOTAL_RECEIVERS ($mode="normal") {
+ // Query database
+ $result_all = SQL_QUERY("SELECT userid
+FROM "._MYSQL_PREFIX."_user_data
+WHERE status='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode),
+ __FILE__, __LINE__);
+
+ // Get num rows
+ $numRows = SQL_NUMROWS($result_all);
+
+ // Free result
+ SQL_FREERESULT($result_all);
+
+ // Return value
+ return $numRows;
+}
+
+// Returns HTML code with an "<option> list" of all categories
+function ADD_CATEGORY_OPTIONS ($mode) {
+ // Prepare WHERE statement
+ $whereStatement = " WHERE visible='Y'";
+ if (IS_ADMIN()) $whereStatement = "";
+
+ // Initialize array...
+ $CATS = array(
+ 'id' => array(),
+ 'name' => array(),
+ 'uids' => array()
+ );
+
+ // Get categories
+ $result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) > 0) {
+ // ... and begin loading stuff
+ while (list($id, $cat) = SQL_FETCHROW($result)) {
+ // Transfer some data
+ $CATS['id'][] = $id;
+ $CATS['name'][] = $cat;
+
+ // Check which users are in this category
+ $result_uids = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
+ array(bigintval($id)), __FILE__, __LINE__);
+
+ // Start adding all
+ $uid_cnt = 0;
+ while (list($ucat) = SQL_FETCHROW($result_uids)) {
+ $result_ver = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data
+WHERE userid=%s AND status='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." LIMIT 1",
+ array(bigintval($ucat)), __FILE__, __LINE__);
+ $uid_cnt += SQL_NUMROWS($result_ver);
+
+ // Free memory
+ SQL_FREERESULT($result_ver);
+ } // END - while
+
+ // Free memory
+ SQL_FREERESULT($result_uids);
+
+ // Add counter
+ $CATS['uids'][] = $uid_cnt;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Generate options
+ $OUT = "";
+ foreach ($CATS['id'] as $key => $value) {
+ if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
+ $OUT .= " <OPTION value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</OPTION>\n";
+ }
+ } else {
+ // No cateogries are defined yet
+ $OUT = "<option class=\"member_failed\">".MEMBER_NO_CATS."</option>\n";
+ }
+
+ // Return HTML code
+ return $OUT;
+}
+
+// Add bonus mail to queue
+function ADD_BONUS_MAIL_TO_QUEUE ($subject, $text, $receiverList, $points, $seconds, $url, $cat, $mode="normal", $receiver=0) {
+ // Is admin or bonus extension there?
+ if (!IS_ADMIN()) {
+ // Abort here
+ return false;
+ } elseif (!EXT_IS_ACTIVE("bonus")) {
+ // Abort here
+ return false;
+ }
+
+ // Calculcate target sent
+ $target = SELECTION_COUNT(explode(";", $receiverList));
+
+ // Receiver is zero?
+ if ($receiver == 0) {
+ // Then auto-fix it
+ $receiver = $target;
+ } // END - if
+
+ // HTML extension active?
+ if (EXT_IS_ACTIVE("html")) {
+ // No HTML by default
+ $HTML = "N";
+
+ // HTML mode?
+ if ($mode == "html") $HTML = "Y";
+
+ // Add HTML mail
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
+(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg)
+VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
+ array(
+ $subject,
+ addslashes($text),
+ $receiverList,
+ $points,
+ $seconds,
+ $url,
+ $cat,
+ $target,
+ bigintval($receiver),
+ $HTML
+), __FILE__, __LINE__);
+ } else {
+ // Add regular mail
+ $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus
+(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent)
+VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
+ array(
+ $subject,
+ addslashes($text),
+ $receiverList,
+ $points,
+ $seconds,
+ $url,
+ $cat,
+ $target,
+ bigintval($receiver),
+), __FILE__, __LINE__);
+ }
+}
+
+// Generate a receiver list for given category and maximum receivers
+function GENERATE_RECEIVER_LIST ($cat, $receiver, $mode="") {
+ global $_CONFIG;
+
+ // Init variables
+ $CAT_TABS = "%s";
+ $CAT_WHERE = "";
+ $receiverList = "";
+
+ // Secure data
+ $cat = bigintval($cat);
+ $receiver = bigintval($receiver);
+
+ // Is the receiver zero and mode set?
+ if (($receiver == 0) && (!empty($mode))) {
+ // Auto-fix receiver maximum
+ $receiver = GET_TOTAL_RECEIVERS($mode);
+ } // END - if
+
+ // Category given?
+ if ($cat > 0) {
+ // Select category
+ $CAT_TABS = "LEFT JOIN "._MYSQL_PREFIX."_user_cats AS c ON d.userid=c.userid";
+ $CAT_WHERE = " AND c.cat_id=%s";
+ } // END - if
+
+ // Exclude users in holiday?
+ if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ // Add something for the holiday extension
+ $CAT_WHERE .= " AND d.holiday_active='N'";
+ } // END - if
+
+ if ((EXT_IS_ACTIVE("html_mail")) && ($_GET['mode'] == "html")) {
+ // Only include HTML receivers
+ $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
+ array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], $receiver), __FILE__, __LINE__);
+ } else {
+ // Include all
+ $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
+ array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], $receiver), __FILE__, __LINE__);
+ }
+
+ // Entries found?
+ if ((SQL_NUMROWS($result) >= $receiver) && ($receiver > 0)) {
+ // Load all entries
+ while (list($REC) = SQL_FETCHROW($result)) {
+ // Add receiver when not empty
+ if (!empty($REC)) $receiverList .= $REC.";";
+ } // END - while
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Remove trailing semicolon
+ $receiverList = substr($receiverList, 0, -1);
+ } // END - if
+
+ // Return list
+ return $receiverList;
+}
+
//
?>
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 10/10/2008 *
+ * =============== Last change: 10/10/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : reset_yoomedia.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif (!EXT_IS_ACTIVE("yoomedia")) {
+ return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+
+// Simply reset the requests here
+UPDATE_CONFIG("yoomedia_requests_remain", $_CONFIG['yoomedia_requests_total']);
+
+//
+?>
--- /dev/null
+<form action="{!URL!}/modules.php?module=admin&what=config_yoomedia" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="500">
+<tr>
+ <td colspan="2" align="center" class="admin_title bottom2" height="30">
+ <strong>{--ADMIN_CONFIG_YOOMEDIA_TITLE--}</strong>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_ID--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_id" value="$content[yoomedia_id]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_SID--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_sid" value="$content[yoomedia_sid]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_PASSWD--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="20" maxlength="255" name="yoomedia_passwd" value="$content[yoomedia_passwd]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_TM_MAX_RELOAD--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_max_reload" value="$content[yoomedia_tm_max_reload]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_TM_MIN_WAIT--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_wait" value="$content[yoomedia_tm_min_wait]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_TM_CLICKS_REMAIN--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="5" maxlength="20" name="yoomedia_tm_clicks_remain" value="$content[yoomedia_tm_clicks_remain]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_TM_MIN_PAY--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <input type="text" class="admin_normal" size="3" maxlength="6" name="yoomedia_tm_min_pay" value="$content[yoomedia_tm_min_pay]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" width="300" height="30">
+ {--ADMIN_CONFIG_YOOMEDIA_EROTIC_ALLOWED--}
+ </td>
+ <td width="200" style="padding-left: 10px">
+ <select name="yoomedia_erotic_allowed" class="admin_select" size="1">
+ <option value="0"{!__CFG_YOOMEDIA_EROTIC_NONE!}>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_NONE--}</option>
+ <option value="1"{!__CFG_YOOMEDIA_EROTIC_INCLUDE!}>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_INCLUDE--}</option>
+ <option value="2"{!__CFG_YOOMEDIA_EROTIC_ONLY!}>{--ADMIN_CONFIG_YOOMEDIA_EROTIC_ONLY--}</option>
+ </select>
+ </td>
+</tr>
+<tr><td colspan="2" class="bottom2 seperator" height="5"> </td></tr>
+<tr>
+ <td colspan="2" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" name="ok" class="admin_submit" value="{--SAVE_SETTINGS--}" />
+ </td>
+</tr>
+</table>
+</form>
+
+<div class="admin_note">
+ {--ADMIN_CONFIG_YOOMEDIA_EROTIC_NOTE--}
+</div>
--- /dev/null
+<table border="0" cellspacing="0" cellpadding="0" width="99%" class="admin_table dashed">
+<tr>
+ <td colspan="7" class="admin_title" height="30">
+ <strong>{--ADMIN_LIST_YOOMEDIA_TITLE--}</strong>
+ </td>
+</tr>
+<tr>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_ID--}</strong></td>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_NAME--}</strong></td>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_RELOAD--}</strong></td>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_WAIT--}</strong></td>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_REMAIN--}</strong></td>
+ <td class="admin_title bottom2 right2"><strong>{--ADMIN_YOOMEDIA_TM_PAY--}</strong></td>
+ <td class="admin_title bottom2" width="280"><strong>{--ADMIN_YOOMEDIA_TM_ACTIONS--}</strong></td>
+</tr>
+$content
+<tr>
+ <td colspan="7" class="admin_footer">
+ <span class="admin_note">{--ADMIN_LIST_YOOMEDIA_NOTE--}</span>
+ </td>
+</tr>
+</table>
--- /dev/null
+<tr>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+ <td class="switch_sw$content[sw] bottom2 right2"> $content[name]</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] €</td>
+ <td class="switch_sw$content[sw] bottom2" style="padding:2px">
+ <table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td align="center">
+ $content[already]
+ <form action="{!URL!}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px">
+ <input type="hidden" name="id" value="$content[id]" />
+ <input type="hidden" name="reload" value="$content[reload]" />
+ <input type="submit" class="admin_delete" name="unlist" value="{--ADMIN_YOOMEDIA_UNLIST_MAIL--}" />
+ </form>
+ </td>
+ </tr>
+ </table>
+ </td>
+</tr>
--- /dev/null
+<tr>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[id]</td>
+ <td class="switch_sw$content[sw] bottom2 right2"> $content[name]</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[reload] {--_HOURS--}</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[wait] {--_SECONDS--}</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[remain]</td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">$content[pay] €</td>
+ <td class="switch_sw$content[sw] bottom2" align="center" style="padding-left:1px;padding-right:1px;padding-top:2px;padding-bottom:2px">
+ <form action="{!URL!}/modules.php?module=admin&what=list_yoomedia_tm" method="post" style="padding-bottom:0px">
+ <input type="hidden" name="id" value="$content[id]" />
+ <input type="hidden" name="name" value="$content[name]" />
+ <input type="hidden" name="wait" value="$content[wait]" />
+ <input type="hidden" name="text" value="$content[text]" />
+ <input type="hidden" name="reload" value="$content[reload]" />
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td><input type="submit" class="admin_submit" name="ok" value="{--ADMIN_YOOMEDIA_PREPARE_MAIL--}" /></td>
+ <td><input type="submit" class="admin_delete" name="remove" value="{--ADMIN_YOOMEDIA_REMOVE_MAIL--}" /></td>
+ </tr>
+ </table>
+ </form>
+ </td>
+</tr>
--- /dev/null
+<form action="{!URL!}/modules.php?module=admin&what=list_yoomedia_tm" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed" align="center">
+<tr>
+ <td colspan="2" class="admin_title bottom2" height="30">
+ <strong>{--ADMIN_YOOMEDIA_SEND_MAIL_TITLE--}</strong>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px">{--SELECT_CATEGORY--}:</td>
+ <td>
+ <select name="cat" size="1" class="admin_select">
+ <option value="" disabled>{--PLEASE_SELECT--}</option>
+ <option value="0">{--ALL_MEMBERS--} ($content[all])</option>
+ $content[categories]
+ </select>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td width="150" align="right" style="padding-right:5px" valign="top">{--ENTER_RECEIVER--}:</td>
+ <td width="530">
+ <span class="admin_note"><em>{--ADMIN_YOOMEDIA_RECEIVER_ARE_ALL_NOTE--}</em></span>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px">{--ENTER_POINTS--}:</td>
+ <td>
+ <input type="text" name="points" class="admin_normal" size="4" maxlength="5" value="$content[reward]" /> {!POINTS!}
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px">{--ENTER_SECONDS--}:</td>
+ <td>
+ <input type="text" name="seconds" class="admin_normal" size="4" maxlength="5" value="$content[wait]" /> {--_SECONDS--}
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px">{--ENTER_SUBJECT--}:</td>
+ <td>
+ <input type="text" name="subject" class="admin_normal" size="30" maxlength="150" value="{--ADMIN_YOOMEDIA_SUBJECT_PREFIX--} $content[name]" />
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="5"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px" valign="top">{--ENTER_TEXT--}:</td>
+ <td>
+ <textarea name="text" class="admin_normal" rows="8" cols="60">$content[text]</textarea>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator" height="10"> </td></tr>
+<tr>
+ <td align="right" style="padding-right:5px">{--MEMBER_ENTER_URL--}:</td>
+ <td>
+ http://www.yoomedia.de/code/t-mail.php?id=$content[id]&sid=$content[sid]
+ <input type="hidden" name="id" value="$content[id]" />
+ <input type="hidden" name="sid" value="$content[sid]" />
+ <input type="hidden" name="reload" value="$content[reload]" />
+ </td>
+</tr>
+<tr>
+ <td colspan="2" align="center">
+ <span class="admin_note"><em>{--ADMIN_YOOMEDIA_ENTER_URL_NOTE--}</em></span>
+ </td>
+</tr>
+<tr><td colspan="2" class="seperator bottom2" height="10"> </td></tr>
+<tr>
+ <td colspan="2" align="center" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" name="sent" class="admin_submit" value="{--ADMIN_SEND_MAIL--}" />
+ </td>
+</tr>
+</table>
+</form>
--- /dev/null
+<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="400">
+ <TR>
+ <TD class="admin_title bottom2">{--ADMIN_YOOMEDIA_ERROR_TITLE--}</TD>
+ </TR>
+ <TR>
+ <TD align="center"><STRONG>$content</STRONG></TD>
+ </TR>
+</TABLE>
border : solid 1px #000000;
background-color : #000000;
color : #FFFFFF;
+ cursor : pointer;
}
.guest_stats {
border : solid 1px #00AA00;
background-color : #AA0044;
color : #DDEEDD;
+ cursor : pointer;
}
.guest_stats {
.admin_delete, .admin_yes {
border-style : groove;
- border : solid 1px #880000;
+ border : solid 1px #880000;
background-color : #880000;
- color : #FFFFCC;
+ color : #FFFFCC;
+ cursor : pointer;
}
.guest_stats {