2 /************************************************************************
3 * MXChange v0.2.1 Start: 10/10/2008 *
4 * ================ Last change: 10/10/2008 *
6 * -------------------------------------------------------------------- *
7 * File : what-yoomedia.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Setup default statistics mode *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Standart Modus der Statistiken einstellen *
12 * -------------------------------------------------------------------- *
14 * -------------------------------------------------------------------- *
15 * Copyright (c) 2003 - 2008 by Roland Haeder *
16 * For more information visit: http://www.mxchange.org *
18 * This program is free software; you can redistribute it and/or modify *
19 * it under the terms of the GNU General Public License as published by *
20 * the Free Software Foundation; either version 2 of the License, or *
21 * (at your option) any later version. *
23 * This program is distributed in the hope that it will be useful, *
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
26 * GNU General Public License for more details. *
28 * You should have received a copy of the GNU General Public License *
29 * along with this program; if not, write to the Free Software *
30 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
32 ************************************************************************/
34 // Some security stuff...
35 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
36 $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
38 } elseif (!EXT_IS_ACTIVE("yoomedia")) {
39 ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "yoomedia");
43 // Add description as navigation point
44 ADD_DESCR("admin", __FILE__);
46 // Was the form submitted?
47 if (isset($_POST['ok'])) {
48 // Test Yoo!Media config
49 if (YOOMEDIA_TEST_CONFIG($_POST)) {
51 ADMIN_SAVE_SETTINGS($_POST);
54 LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_CONFIG_YOOMEDIA_TEST_FAILED);
59 'yoomedia_id' => bigintval($_CONFIG['yoomedia_id']),
60 'yoomedia_sid' => bigintval($_CONFIG['yoomedia_sid']),
61 'yoomedia_passwd' => $_CONFIG['yoomedia_passwd'],
62 'yoomedia_tm_max_reload' => bigintval($_CONFIG['yoomedia_tm_max_reload']),
63 'yoomedia_tm_min_wait' => bigintval($_CONFIG['yoomedia_tm_min_wait']),
64 'yoomedia_tm_clicks_remain' => bigintval($_CONFIG['yoomedia_tm_clicks_remain']),
65 'yoomedia_tm_min_pay' => bigintval($_CONFIG['yoomedia_tm_min_pay'])
69 switch ($_CONFIG['yoomedia_erotic_allowed']) {
70 case 0: // No erotic at all
71 define('__CFG_YOOMEDIA_EROTIC_NONE' , " selected=\"selected\"");
72 define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
73 define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
76 case 1: // Include erotic
77 define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
78 define('__CFG_YOOMEDIA_EROTIC_INCLUDE', " selected=\"selected\"");
79 define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
82 case 2: // Erotic only
83 define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
84 define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
85 define('__CFG_YOOMEDIA_EROTIC_ONLY' , " selected=\"selected\"");
90 LOAD_TEMPLATE("admin_config_yoomedia", false, $content);