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

📄 util.pm

📁 Insipid 是一款基于Web书签仓库。很方面的记录下各种输入输出信息。
💻 PM
字号:
#!/usr/bin/perl -w## Copyright (C) 2005 Luke Reeves## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307# USA#package Insipid::Util;use strict;use vars qw(@ISA @EXPORT @EXPORT_OK);use Insipid::Config;require Exporter;@ISA = qw(Exporter);@EXPORT = qw(ims_timesanitize_htmlcheck_access);@EXPORT_OK = qw();my @DoW = qw(Sun Mon Tue Wed Thu Fri Sat);my @MoY = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);# TODO: If content is already sent, add the error to @errors instead of dyingsub check_access {	if($logged_in ne 1) {		print "Content-Type: text/plain\r\n\r\n";		print "You have to be logged in to perform that operation.";		exit;	}}sub sanitize_html {	my ($orig) = (@_);	$orig =~ s/</&lt;/gi;	$orig =~ s/>/&gt;/gi;	$orig =~ s/&amp;/&/gi;	$orig =~ s/&/&amp;/gi;	return $orig;}# From http::datesub ims_time {    my ($time) = (@_);    my ($sec, $min, $hour, $mday, $mon, $year, $wday) = gmtime($time);    return sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",            $DoW[$wday],            $mday, $MoY[$mon], $year+1900,            $hour, $min, $sec);}1;__END__

⌨️ 快捷键说明

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