function getMPDResetTimeFromConfig() { $itemhash = getMPDCRONSettings(); $cronitem = $itemhash['ITEM']; if (isset($cronitem)) { return "{$cronitem['minute']} {$cronitem['hour']} {$cronitem['mday']} {$cronitem['month']} {$cronitem['wday']}"; } else { return NULL; } }
$pconfig['ppp_password'] = base64_decode($a_ppps[$pppid]['password']); $pconfig['phone'] = $a_ppps[$pppid]['phone']; $pconfig['apn'] = $a_ppps[$pppid]['apn']; } else { if ($a_ppps[$pppid]['type'] == "pppoe") { $pconfig['pppoe_username'] = $a_ppps[$pppid]['username']; $pconfig['pppoe_password'] = base64_decode($a_ppps[$pppid]['password']); $pconfig['provider'] = $a_ppps[$pppid]['provider']; $pconfig['pppoe_dialondemand'] = isset($a_ppps[$pppid]['ondemand']); $pconfig['pppoe_idletimeout'] = $a_ppps[$pppid]['idletimeout']; /* ================================================ */ /* = force a connection reset at a specific time? = */ /* ================================================ */ if (isset($a_ppps[$pppid]['pppoe-reset-type'])) { $pconfig['pppoe-reset-type'] = $a_ppps[$pppid]['pppoe-reset-type']; $itemhash = getMPDCRONSettings($a_ppps[$pppid]['if']); if ($itemhash) { $cronitem = $itemhash['ITEM']; } if (isset($cronitem)) { $resetTime = "{$cronitem['minute']} {$cronitem['hour']} {$cronitem['mday']} {$cronitem['month']} {$cronitem['wday']}"; } else { $resetTime = NULL; } //log_error("ResetTime:".$resetTime); if ($a_ppps[$pppid]['pppoe-reset-type'] == "custom") { if ($cronitem) { $pconfig['pppoe_pr_custom'] = true; $pconfig['pppoe_resetminute'] = $cronitem['minute']; $pconfig['pppoe_resethour'] = $cronitem['hour']; if ($cronitem['mday'] != "*" && $cronitem['month'] != "*") {