⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipbanlist.pm

📁 1. 记录每个帖子的访问人情况
💻 PM
字号:
# Copyright 2001-2005 Six Apart.# SCRiPTMAFiA 2005 - THE DiRTY HANDS ON YOUR SCRiPTS## $Id: IPBanList.pm 10197 2005-03-09 00:27:57Z ezra $package MT::IPBanList;use strict;use MT::Object;@MT::IPBanList::ISA = qw( MT::Object );__PACKAGE__->install_properties({    columns => [        'id', 'blog_id', 'ip',    ],    indexes => {        blog_id => 1,        ip => 1,    },    audit => 1,    datasource => 'ipbanlist',    primary_key => 'id',});sub ban_ip {    my $class = shift;    my ($ip, $blog_id) = @_;    $class->set_by_key({ip => $ip, blog_id => $blog_id});}1;__END__=head1 NAMEMT::IPBanList - Movable Type IP comment banning record=head1 SYNOPSIS    use MT::IPBanList;    my $ban = MT::IPBanList->new;    $ban->blog_id($blog->id);    $ban->ip($ip_address);    $ban->save        or die $ban->errstr;=head1 DESCRIPTIONAn I<MT::IPBanList> object represents a single IP address that is banned fromcommenting on one of your blogs.=head1 USAGEAs a subclass of I<MT::Object>, I<MT::IPBanList> inherits all of thedata-management and -storage methods from that class; thus you should lookat the I<MT::Object> documentation for details about creating a new object,loading an existing object, saving an object, etc.=head1 DATA ACCESS METHODSThe I<MT::BanList> object holds the following pieces of data. These fields canbe accessed and set using the standard data access methods described in theI<MT::Object> documentation.=over 4=item * idThe numeric ID of the banlist record.=item * blog_idThe numeric ID of the blog for which the IP address is banned.=item * ipThe IP address. This can be a partial IP address--for example, a partialaddress of C<10.100> will block the IP addresses C<10.100.2.1>,C<10.100.100.3>, etc.=back=head1 DATA LOOKUPIn addition to numeric ID lookup, you can look up or sort records by anycombination of the following fields. See the I<load> documentation inI<MT::Object> for more information.=over 4=item * blog_id=item * ip=back=head1 AUTHOR & COPYRIGHTSPlease see the I<MT> manpage for author, copyright, and license information.=cut

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -