DEBUG_LOG(__FUNCTION__, __LINE__, " num={$num},ret={$ret}");
} // END - if
DEBUG_LOG(__FUNCTION__, __LINE__, " num={$num},ret={$ret}");
} // END - if
// Converts timestamp selections into a timestamp
function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
// Init test variable
// Converts timestamp selections into a timestamp
function CONVERT_SELECTIONS_TO_TIMESTAMP(&$POST, &$DATA, &$id, &$skip) {
// Init test variable
- if (in_array($TEST, array("_ye", "_mo", "_we", "_da", "_ho", "_mi", "_se"))) {
+ if (in_array($test, array("_ye", "_mo", "_we", "_da", "_ho", "_mi", "_se"))) {
- $TEST = substr($id, 0, -3);
- if ((isset($POST[$TEST."_ye"])) && (isset($POST[$TEST."_mo"])) && (isset($POST[$TEST."_we"])) && (isset($POST[$TEST."_da"])) && (isset($POST[$TEST."_ho"])) && (isset($POST[$TEST."_mi"])) && (isset($POST[$TEST."_se"])) && ($TEST != $TEST2)) {
+ $test = substr($id, 0, -3);
+ if ((isset($POST[$test."_ye"])) && (isset($POST[$test."_mo"])) && (isset($POST[$test."_we"])) && (isset($POST[$test."_da"])) && (isset($POST[$test."_ho"])) && (isset($POST[$test."_mi"])) && (isset($POST[$test."_se"])) && ($test != $test2)) {
- $POST[$TEST] = CREATE_TIMESTAMP_FROM_SELECTIONS($TEST, $POST);
- $DATA[] = "$TEST='".$POST[$TEST]."'";
+ $POST[$test] = CREATE_TIMESTAMP_FROM_SELECTIONS($test, $POST);
+ $DATA[] = sprintf("%s='%s'", $test, $POST[$test]);
// Remove data from array
foreach (array("ye", "mo", "we", "da", "ho", "mi", "se") as $rem) {
// Remove data from array
foreach (array("ye", "mo", "we", "da", "ho", "mi", "se") as $rem) {