]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Some internal TODOs fixed, rewrites to script inclusion
[mailer.git] / inc / libs / sponsor_functions.php
index 85ba1734272c851b1840bb3e1dde549126b9026b..f5774c69e541f6f765e4c2d02416402b2f816928 100644 (file)
@@ -103,32 +103,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_S
 
                        default:
                                // Test if there is are time selections
-                               $TEST = substr($k, -3);
-                               if ((($TEST == "_ye") || ($TEST == "_mo") || ($TEST == "_we") || ($TEST == "_da") || ($TEST == "_ho") || ($TEST == "_mi") || ($TEST == "_se")) && (!empty($v))) {
-                                       // Found a multi-selection for timings?
-                                       $TEST = substr($k, 0, -3);
-                                       if ((!empty($POST[$TEST."_ye"])) && (!empty($POST[$TEST."_mo"])) && (!empty($POST[$TEST."_we"])) && (!empty($POST[$TEST."_da"])) && (!empty($POST[$TEST."_ho"])) && (!empty($POST[$TEST."_mi"])) && (!empty($POST[$TEST."_se"])) && ($TEST != $TEST2)) {
-                                               // Generate timestamp
-                                               $POST[$TEST] = CREATE_TIMESTAMP_FROM_SELECTIONS($TEST, $POST);
-                                               $DATA['keys'][] = $TEST;
-                                               $DATA['values'][] = $POST[$TEST];
-
-                                               // Remove data from array
-                                               // @TODO Do we still need this all?
-                                               unset($POST[$TEST."_ye"]);
-                                               unset($POST[$TEST."_mo"]);
-                                               unset($POST[$TEST."_we"]);
-                                               unset($POST[$TEST."_da"]);
-                                               unset($POST[$TEST."_ho"]);
-                                               unset($POST[$TEST."_mi"]);
-                                               unset($POST[$TEST."_se"]);
-
-                                               // Skip adding
-                                               $k = ""; $skip = true; $TEST2 = $TEST;
-                                       }
-                               } else {
-                                       $skip = false; $TEST2 = "";
-                               }
+                               CONVERT_SELECTIONS_TO_TIMESTAMP($POST, $DATA, $k, $skip);
                                break;
                        }
 
@@ -331,7 +306,7 @@ ORDER BY sort", array($action), __FILE__, __LINE__);
                                while(list($what, $title_sub) = SQL_FETCHROW($result_sub))
                                {
                                        // Check if current selected menu is matching the loaded one
-                                       if ($current == $what) $title_sub = "<STRONG>".$title_sub."</STRONG>";
+                                       if ($current == $what) $title_sub = "<strong>".$title_sub."</strong>";
 
                                        // Prepare data for the sub template
                                        $content = array(