コード例 #1
0
ファイル: banlist.php プロジェクト: gitye/e107
    $writeBanFile = TRUE;
}
// Update the ban expiry time/date - timed from now (only done on banlist)
if ($action == 'newtime') {
    $end_time = $id ? time() + $id * 60 * 60 : 0;
    e107::getMessage()->addAuto($sql->db_Update('banlist', 'banlist_banexpires=' . intval($end_time) . " WHERE banlist_ip='" . $sub_action . "'"));
    banlist_adminlog('03', $sub_action);
    $action = 'list';
    $writeBanFile = TRUE;
}
if ($writeBanFile) {
    /************************************************
    		update list of banned IPs
    *************************************************/
    $ipAdministrator->writeBanListFiles('ip,htaccess');
    if (!$ipAdministrator->doesMessageFileExist()) {
        $ipAdministrator->writeBanMessageFile();
        // Message file must exist - may not on fresh site
        banlist_adminlog('08', '');
        $mes->addSuccess(LAN_UPDATED);
    }
}
/**
 *	@todo - eliminate extract();
 */
// Edit modes - get existing entry
if ($action == 'edit' || $action == 'whedit') {
    $sql->db_Select('banlist', '*', "banlist_ip='{$sub_action}'");
    $row = $sql->db_Fetch();
    extract($row);
    //FIXME - kill extract()