649060468ca0a777acac1a00bd304b1538829919
[mailer.git] / 0.2.1 / inc / modules / admin / what-config_mediadata.php
1 <?php\r
2 /************************************************************************\r
3  * MXChange v0.2.1                                    Start: 09/28/2003 *\r
4  * ================                             Last change: 02/12/2004 *\r
5  *                                                                      *\r
6  * -------------------------------------------------------------------- *\r
7  * File              : what-                                            *\r
8  * -------------------------------------------------------------------- *\r
9  * Short description :                                                  *\r
10  * -------------------------------------------------------------------- *\r
11  * Kurzbeschreibung  :                                                  *\r
12  * -------------------------------------------------------------------- *\r
13  *                                                                      *\r
14  * -------------------------------------------------------------------- *\r
15  * Copyright (c) 2003 - 2007 by Roland Haeder                           *\r
16  * For more information visit: http://www.mxchange.org                  *\r
17  *                                                                      *\r
18  * This program is free software; you can redistribute it and/or modify *\r
19  * it under the terms of the GNU General Public License as published by *\r
20  * the Free Software Foundation; either version 2 of the License, or    *\r
21  * (at your option) any later version.                                  *\r
22  *                                                                      *\r
23  * This program is distributed in the hope that it will be useful,      *\r
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *\r
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *\r
26  * GNU General Public License for more details.                         *\r
27  *                                                                      *\r
28  * You should have received a copy of the GNU General Public License    *\r
29  * along with this program; if not, write to the Free Software          *\r
30  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *\r
31  * MA  02110-1301  USA                                                  *\r
32  ************************************************************************/\r
33 \r
34 // Some security stuff...\r
35 if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))\r
36 {\r
37         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";\r
38         require($INC);\r
39 }\r
40 // Add description as navigation point\r
41 ADD_DESCR("admin", basename(__FILE__));\r
42 \r
43 if (isset($_POST['ok']))\r
44 {\r
45         // Test timestamp\r
46         $STAMP = mktime(0, 0, 0, bigintval($_POST['month']), bigintval($_POST['day']), bigintval($_POST['year']));\r
47         if ($STAMP > time())\r
48         {\r
49                 // Date is in the future!\r
50                 unset($_POST['ok']);\r
51         }\r
52          else\r
53         {\r
54                 // Remove entries\r
55                 unset($_POST['day']);\r
56                 unset($_POST['month']);\r
57                 unset($_POST['year']);\r
58 \r
59                 // Remember timestamp\r
60                 $_POST['mt_start'] = $STAMP;\r
61         }\r
62 \r
63         // Convert some data\r
64         $_POST['mt_stage'] = bigintval($_POST['mt_stage']);\r
65         if ($_POST['mt_stage'] <= GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true))\r
66         {\r
67                 // Not enougth!\r
68                 unset($_POST['ok']);\r
69         }\r
70 }\r
71 \r
72 if (isset($_POST['ok']))\r
73 {\r
74         // Save data\r
75         ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");\r
76 }\r
77  else\r
78 {\r
79         // Start of this exchange\r
80         if ($CONFIG['mt_start'] > 0)\r
81         {\r
82                 // Only show start\r
83                 define('__MT_START', "<STRONG>".MAKE_DATETIME($CONFIG['mt_start'], "3")."</STRONG>");\r
84         }\r
85          else\r
86         {\r
87                 // Make start editable\r
88                 define('__MT_START',\r
89                         ADD_SELECTION("day"  , date("d", time())).\r
90                         ADD_SELECTION("month", date("m", time())).\r
91                         ADD_SELECTION("year",  -1)\r
92                 );\r
93         }\r
94 \r
95         // Next stage of this MT\r
96         define('__MT_STAGE', $CONFIG['mt_stage']);\r
97 \r
98         // Load template\r
99         LOAD_TEMPLATE("admin_config_mediadata");\r
100 }\r
101 \r
102 //\r
103 ?>\r