Code: Alles auswählen
#
#-----[ OPEN ]-----
#
search.php
#
#-----[ FIND ]-----
#
if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time']))
{
$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 60 );
$topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']);
}
else
{
$search_time = 0;
$topic_days = 0;
}
#
#-----[ REPLACE WITH ]-----
#
$default_search_timespan = 14; // Change this value to the days you will set as default timespan. Regard the possible values in the array $previous_days()!!!
if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time']))
{
$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 );
$topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']);
$search_time = ((time() - $search_time) <= 0 ) ? 0 : $search_time;
$topic_days = ($topic_days == -1 ) ? 0 : $topic_days;
}
else
{
$search_time = time() - ($default_search_timespan * 86400);
$topic_days = $default_search_timespan;
}
#
#-----[ FIND ]-----
#
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
#
#-----[ REPLACE WITH ]-----
#
$previous_days = array(-1, 1, 7, 14, 30, 90, 180, 364);
#
#-----[ SAVE/CLOSE ALL FILES ]-----
#
# EoM