I changed the file dn_settings.php :
#!/usr/bin/php /** * @version $Id: dn_settings.php,v 1.1.2.9.2.4 2008/12/01 05:56:21 jason Exp $ * @author Wiley Li <wileyli@wistron.com.tw> * @copyright Copyright (c) 2004 Wistron Corporation. */ $tabidx = 2; require_once('guiconfig.inc'); require_once('ctcsconfig.inc'); require_once('dn_settings.inc'); require_once('dn_extra.inc'); require_once('dn_sq_ctrl.inc'); redirect_error_page(); // checking is_btadmin(); $help_anchor = $htmlObj->Help('downloader', 'settings'); //----------------------------------------------------------------------- $weeks = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); $hours = array('00:00 - 01:00', '01:00 - 02:00', '02:00 - 03:00', '03:00 - 04:00', '04:00 - 05:00', '05:00 - 06:00', '06:00 - 07:00', '07:00 - 08:00', '08:00 - 09:00', '09:00 - 10:00', '10:00 - 11:00', '11:00 - 12:00', '12:00 - 13:00', '13:00 - 14:00', '14:00 - 15:00', '15:00 - 16:00', '16:00 - 17:00', '17:00 - 18:00', '18:00 - 19:00', '19:00 - 20:00', '20:00 - 21:00', '21:00 - 22:00', '22:00 - 23:00', '23:00 - 00:00'); $len_weeks = count($weeks); $len_hours = count($hours); $odd_row_color = '4A7CB3'; $even_row_color = '336699'; //-----------------------------------------------------------------------
and the file dn_sq_ctrl.inc
/** * @version $Id: dn_sq_ctrl.inc,v 1.1.2.10.2.5 2009/03/12 08:59:27 jason Exp $ * @author Wiley Li <wiley_li@wistron.com.tw> * @copyright Copyright (c) 2004 Wistron Corporation. */ require_once('ctcsconfig.inc'); require_once('dn_extra.inc'); require_once('dn_podcast_extra.inc'); require_once('xml.inc'); require_once('wget.inc'); // ---------------------------------------------------------------- define('__debug__', false); define('__debug_s__', false); // accelerate testing efficency by reduce the range of period time define('__debug_tformat__', 'Y/m/d H:i:s'); define('_SELF_RESTART_FFLAG_', '/etc/.sc_restart_yourself'); // ---------------------------------------------------------------- $quiet = false; // ---------------------------------------------------------------- function _d($msg){ global $quiet; if(__debug__&&$msg&&!$quiet){ echo '['.date(__debug_tformat__).'] '.$msg."\n"; } } // ---------------------------------------------------------------- function do_quiet($q){ global $quiet; $quiet = $q; } // ---------------------------------------------------------------- // numeric representation of the day of the week // 0 (for Sunday) through 6 (for Saturday) function curr_week_i() { if(!__debug_s__){ return date('w'); } else { // __debug_s__ is TRUE, it will do as following below // accelerate testing efficency by reduce the range of period time // Sunday: 00,07,14,21 // Monday: 01,08,15,22 // Tuesday: 02,09,16,23 // Wednesday: 03,10,17 // Thursday: 04,11,18 // Friday: 05,12,19 // Saturday: 06,13,20 return (date('H')%7); } } // ---------------------------------------------------------------- // the hours section // 0: '00:00 - 00:59', 1: '01:00 - 01:59', 2: '02:00 - 02:59', // 3: '03:00 - 03:59', 4: '04:00 - 04:59', 5: '05:00 - 05:59', // 6: '06:00 - 06:59', 7: '07:00 - 07:59', // 8: '08:00 - 08:59', 9: '09:00 - 09:59', 10: '10:00 - 10:59', // 11: '11:00 - 11:59', 12: '12:00 - 12:59', 13: '13:00 - 13:59', // 14: '14:00 - 14:59', 15: '15:00 - 15:59', // 16: '16:00 - 16:59', 17: '17:00 - 17:59', 18: '18:00 - 18:59', // 19: '19:00 - 19:59', 20: '20:00 - 20:59', 21: '21:00 - 21:59', // 22: '22:00 - 22:59', 23: '23:00 - 23:59' function curr_hours_section_i(){ if(!__debug_s__){ switch (date('H')){ case '00': return 0; case '01': return 1; case '02': return 2; case '03': return 3; case '04': return 4; case '05': return 5; case '06': return 6; case '07': return 7; case '08': return 8; case '09': return 9; case '10': return 10; case '11': return 11; case '12': return 12; case '13': return 13; case '14': return 14; case '15': return 15; case '16': return 16; case '17': return 17; case '18': return 18; case '19': return 19; case '20': return 20; case '21': return 21; case '22': return 22; case '23': return 23; } } else { // __debug_s__ is TRUE, it will do as following below // accelerate testing efficency by reduce the range of period time $_debug_v=date('i'); // by minute for index if($_debug_v>=0 && $_debug_v<=7) { return 0; } if($_debug_v>=8 && $_debug_v<=15){ return 1; } if($_debug_v>=16 && $_debug_v<=23){ return 2; } if($_debug_v>=24 && $_debug_v<=31){ return 3; } if($_debug_v>=32 && $_debug_v<=39){ return 4; } if($_debug_v>=40 && $_debug_v<=47){ return 5; } if($_debug_v>=48 && $_debug_v<=55){ return 6; } if($_debug_v>=56 && $_debug_v<=59){ return 7; } } return false; } // ---------------------------------------------------------------- function curr_time_in_schedule($schedule_table){ if(__debug_s__){ $week_str = array('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); $hour_str = array('00:00 - 00:59', '01:00 - 01:59', '02:00 - 02:59', '03:00 - 03:59', '04:00 - 04:59', '05:00 - 05:59', '06:00 - 06:59', '07:00 - 07:59', '08:00 - 08:59', '09:00 - 09:59', '10:00 - 10:59', '11:00 - 11:59', '12:00 - 12:59', '13:00 - 13:59', '14:00 - 14:59', '15:00 - 15:59', '16:00 - 16:59', '17:00 - 17:59', '18:00 - 18:59', '19:00 - 19:59', '20:00 - 20:59', '21:00 - 21:59', '22:00 - 22:59', '23:00 - 23:59'); _d('================================================='); _d('================== debug is ON =================='); _d('(current time simulate to '.$hour_str[curr_hours_section_i()].', '. $week_str[curr_week_i()]).')'; _d('================================================='); } return $schedule_table[curr_week_i()][curr_hours_section_i()]; }
the matrix created it correctly, viewing the table in the scheduler page is correct but the scheduler not work and the downloads not start in automatic.




















