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

📄 common.lib

📁 这个社区是虚拟社区使用的程序
💻 LIB
📖 第 1 页 / 共 3 页
字号:
		$_ =~ s/\:\-\(/<img src=\"$URLImages\/Sad.gif\" border=\"0\" align=\"middle\">/isg;		$_ =~ s/\:\-\D/<img src=\"$URLImages\/TooHappy.gif\" border=\"0\" align=\"middle\">/isg;        $_ =~ s/\:\)/$imgEmotion_1<!--e1-->/isg     if ($imgEmotion_1);        $_ =~ s/\:\(/$imgEmotion_2<!--e2-->/isg     if ($imgEmotion_2);        $_ =~ s/\;\)/$imgEmotion_3<!--e3-->/isg     if ($imgEmotion_3);        $_ =~ s/\:\P/$imgEmotion_4<!--e4-->/isg     if ($imgEmotion_4);        $_ =~ s/\;\P/$imgEmotion_5<!--e5-->/isg     if ($imgEmotion_5);        $_ =~ s/\:\*/$imgEmotion_7<!--e7-->/isg   if ($imgEmotion_7);        $_ =~ s/\:\o/$imgEmotion_6<!--e6-->/isg     if ($imgEmotion_6);        $_ =~ s/\;\(/$imgEmotion_8<!--e8-->/isg   if ($imgEmotion_8);        $_ =~ s/\^\^\;/$imgEmotion_9<!--e9-->/isg   if ($imgEmotion_9);        $_ =~ s/\^\^/$imgEmotion_10<!--e10-->/isg   if ($imgEmotion_10);        $_ =~ s/8\-\)/$imgEmotion_11<!--e11-->/isg if ($imgEmotion_11);        $_ =~ s/8\)/$imgEmotion_12<!--e12-->/isg   if ($imgEmotion_12);        $_ =~ s/\:\D/$imgEmotion_13<!--e13-->/isg   if ($imgEmotion_13);        $_ =~ s/\>\:\-\(/$imgEmotion_14<!--e14-->/isg                                                    if ($imgEmotion_14);        $_ =~ s/\>\:\(/$imgEmotion_15<!--e15-->/isg if ($imgEmotion_15);		$_ =~ s/\\c/\&copy\;<!--char-->/g;		$_ =~ s/\\r/\&reg\;<!--char-->/g;		$_ =~ s/\\tm/\&\#153\;<!--char-->/g;	}	$_ =~ s/\n\n/\<p\>\\n\\n/g;	$_ =~ s/\n/\<br\>\\n/g;	if ($UBCodes eq "on") {		$_ =~ s/\[quote\]<br>(.+?)<br>\[\/quote\]/<blockquote><hr>$1<hr><\/blockquote>/isg;		$_ =~ s/\[quote\]<br>(.+?)\[\/quote\]/<blockquote><hr>$1<hr><\/blockquote>/isg;		$_ =~ s/\[quote\](.+?)<br>\[\/quote\]/<blockquote><hr>$1<hr><\/blockquote>/isg;		$_ =~ s/\[quote\](.+?)\[\/quote\]/<blockquote><hr>$1<hr><\/blockquote>/isg;		if ($_=~/\[code\](.+?)\[\/code\]/) {			$tmp=$1;			$tmp=~s/\<br\>//isg;			$tmp=~s/\<p\>//isg;		}		$_=~s/\[code\](.+?)\[\/code\]/<blockquote><pre><font size=\"1\" face=\"$FontFace\">code:<\/font><hr><font face=\"Courier New\" size=\"$TextSize\">$tmp<\/font><hr><\/pre><\/blockquote>/isg;		if ($_=~/\[pre\](.+?)\[\/pre\]/) {			$tmp=$1;			$tmp=~s/\<br\>//isg;			$tmp=~s/\<p\>//isg;		}		#$_=~s/\[pre\](.+?)\[\/pre\]/<pre>$tmp<\/pre>/isg;	}	$_ =~ s/\"/\&quot\;/g;	$_ =~ s/\'/\|APO\|/g;	$_ =~ s/\+/\|PLS\|/g;	$_ =~ s/\=/\|EQU\|/g;	$_ =~ s/\s/\+/g;	$_ =~ s/\&/\&amp\;/g;	return $_;}################################################################################ DecodeUBCodes                                                               ################################################################################sub DecodeUBCodes {	$_ = shift;	$_ =~ s/\&copy\;<!--char-->/\\c/g;	$_ =~ s/\&reg\;<!--char-->/\\r/g;	$_ =~ s/\&\#153\;<!--char-->/\\tm/g;    $_ =~ s/$imgEmotion_15<!--e15-->/\>\:\(/isg     if ($imgEmotion_15);    $_ =~ s/$imgEmotion_14<!--e14-->/\>\:\-\(/isg   if ($imgEmotion_14);    $_ =~ s/$imgEmotion_13<!--e13-->/\:\D/isg       if ($imgEmotion_13);    $_ =~ s/$imgEmotion_12<!--e12-->/\8\)/isg       if ($imgEmotion_12);    $_ =~ s/$imgEmotion_11<!--e11-->/\8\-\)/isg     if ($imgEmotion_11);    $_ =~ s/$imgEmotion_10<!--e10-->/\^\^/isg       if ($imgEmotion_10);    $_ =~ s/$imgEmotion_9<!--e9-->/\^\^\;/isg       if ($imgEmotion_9);    $_ =~ s/$imgEmotion_8<!--e8-->/\^\_\^/isg       if ($imgEmotion_8);    $_ =~ s/$imgEmotion_6<!--e6-->/\:\o/isg         if ($imgEmotion_6);    $_ =~ s/$imgEmotion_7<!--e7-->/\:\o\)/isg       if ($imgEmotion_7);    $_ =~ s/$imgEmotion_5<!--e5-->/\;\P/isg         if ($imgEmotion_5);    $_ =~ s/$imgEmotion_4<!--e4-->/\:\P/isg         if ($imgEmotion_4);    $_ =~ s/$imgEmotion_3<!--e3-->/\;\)/isg         if ($imgEmotion_3);    $_ =~ s/$imgEmotion_2<!--e2-->/\:\(/isg         if ($imgEmotion_2);    $_ =~ s/$imgEmotion_1<!--e1-->/\:\)/isg         if ($imgEmotion_1);	$_ =~ s/<img src=\"$URLImages\/TooHappy.gif\" border=\"0\" align=\"middle\">/\:\-\D/isg;	$_ =~ s/<img src=\"$URLImages\/Sad.gif\" border=\"0\" align=\"middle\">/\:\-\(/isg;	$_ =~ s/<img src=\"$URLImages\/Wilk.gif\" border=\"0\" align=\"middle\">/\;\-\)/isg;	$_ =~ s/<img src=\"$URLImages\/Happy.gif\" border=\"0\" align=\"middle\">/\:\-\)/isg;	$_ =~ s/<blockquote><hr>(.+?)<hr><\/blockquote>/\[quote\]$1\[\/quote\]/isg;	$_ =~ s/<blockquote><pre><font size=\"1\" face=\"$FontFace\">code:<\/font><hr><font face=\"Courier New\" size=\"\S+\">(.+?)<\/font><hr><\/pre><\/blockquote>/\[code\]$1\[\/code\]/isg;		$_ =~ s/<\/pre>/\[\/pre\]/isg;	$_ =~ s/<pre>/\[pre\]/isg;	$_ =~ s/<li>/\[list\]/isg;	$_ =~ s/<\/font><!--color-->/\[\/color\]/isg;	$_ =~ s/<font color=\"(\S+?)\">/\[color=$1\]/isg;	$_ =~ s/<\/center>/\[\/center\]/isg;	$_ =~ s/<center>/\[center\]/isg;		$_ =~ s/<\/sub>/\[\/sub\]/isg;	$_ =~ s/<sub>/\[sub\]/isg;	$_ =~ s/<\/sup>/\[\/sup\]/isg;	$_ =~ s/<sup>/\[sup\]/isg;	$_ =~ s/<\/font><!--fixed-->/\[\/fixed\]/isg;	$_ =~ s/<font face=\"Courier New\">/\[fixed\]/isg;	$_ =~ s/<\/font><!--4-->/\[\/4\]/isg;	$_ =~ s/<font size=\"4\">/\[4\]/isg;	$_ =~ s/<\/font><!--3-->/\[\/3\]/isg;	$_ =~ s/<font size=\"3\">/\[3\]/isg;	$_ =~ s/<\/font><!--2-->/\[\/2\]/isg;	$_ =~ s/<font size=\"2\">/\[2\]/isg;	$_ =~ s/<\/font><!--1-->/\[\/1\]/isg;	$_ =~ s/<font size=\"1\">/\[1\]/isg;	$_ =~ s/<\/u>/\[\/u\]/isg;	$_ =~ s/<u>/\[u\]/isg;	$_ =~ s/<\/i>/\[\/i\]/isg;	$_ =~ s/<i>/\[i\]/isg;	$_ =~ s/<\/b>/\[\/b\]/isg;	$_ =~ s/<b>/\[b\]/isg;	$_ =~ s/<a href=\"mailto:(\S+?)\"><!--autoemail-->\S+<\/a><!--autoemail-->/\\$1/isg;			$_ =~ s/<a href=\"ftp:\/\/(\S+?)\" target=\"_blank\"><!--autoftp-->\S+<\/a><!--autoftp-->/\\$1/isg;	$_ =~ s/<a href=\"(ftp:\/\/\S+?)\" target=\"_blank\"><!--auto-->\S+<\/a><!--auto-->/\\$1/isg;			$_ =~ s/<a href=\"http:\/\/(\S+?)\" target=\"_blank\"><!--autohttp-->\S+<\/a><!--autohttp-->/\\$1/isg;	$_ =~ s/<a href=\"(http:\/\/\S+?)\" target=\"_blank\"><!--auto-->\S+<\/a><!--auto-->/\\$1/isg;		$_ =~ s/<\/a><!--email-->/\[\/email\]/isg;	$_ =~ s/<a href=\"mailto:(\S+?)\">/\[email=$1\]/isg;	$_ =~ s/<\/a><!--url-->/\[\/url\]/isg;	$_ =~ s/<!--nohttp--><a href=\"http:\/\/(\S+?)\" target=\"_blank\">/\[url=$1\]/isg;	$_ =~ s/<!--http--><a href=\"(http:\/\/\S+?)\" target=\"_blank\">/\[url=$1\]/isg;	$_ =~ s/<img src=\"(\S+?)\" border=\"0\">/\[img=$1\]/isg;    $_ =~ s/\;<!--no-->/\\\^/isg;	$_ =~ s/\;<!--no-->/\\\;/isg;	$_ =~ s/\:<!--no-->/\\\:/isg;	$_ =~ s/<!--no-->\]/\\\]/isg;	$_ =~ s/\[<!--no-->/\\\[/isg;	$_ =~ s/\\<!--no-->/\\\\/isg;		$_ =~ s/\<p\>//isg;	$_ =~ s/\<br\>//isg;	$_ =~ s/\&lt\;/\</isg;	$_ =~ s/\&gt\;/\>/isg;	return $_;}################################################################################ RemoveUBCodes                                                               ################################################################################sub RemoveUBCodes {	$_ = shift;	$_ =~ s/\&copy\;<!--char-->/\(c\)/g;	$_ =~ s/\&reg\;<!--char-->/(r)/g;	$_ =~ s/\&\#153\;<!--char-->/(tm)/g;    $_ =~ s/$imgEmotion_15<!--e15-->/\>\:\(/isg     if ($imgEmotion_15);    $_ =~ s/$imgEmotion_14<!--e14-->/\>\:\-\(/isg   if ($imgEmotion_14);    $_ =~ s/$imgEmotion_13<!--e13-->/\:\D/isg       if ($imgEmotion_13);    $_ =~ s/$imgEmotion_12<!--e12-->/\8\)/isg       if ($imgEmotion_12);    $_ =~ s/$imgEmotion_11<!--e11-->/\8\-\)/isg     if ($imgEmotion_11);    $_ =~ s/$imgEmotion_10<!--e10-->/\^\^/isg       if ($imgEmotion_10);    $_ =~ s/$imgEmotion_9<!--e9-->/\^\^\;/isg       if ($imgEmotion_9);    $_ =~ s/$imgEmotion_8<!--e8-->/\;\(/isg       if ($imgEmotion_8);    $_ =~ s/$imgEmotion_6<!--e6-->/\:\o/isg         if ($imgEmotion_6);    $_ =~ s/$imgEmotion_7<!--e7-->/\:\*/isg       if ($imgEmotion_7);    $_ =~ s/$imgEmotion_5<!--e5-->/\;\P/isg         if ($imgEmotion_5);    $_ =~ s/$imgEmotion_4<!--e4-->/\:\P/isg         if ($imgEmotion_4);    $_ =~ s/$imgEmotion_3<!--e3-->/\;\)/isg         if ($imgEmotion_3);    $_ =~ s/$imgEmotion_2<!--e2-->/\:\(/isg         if ($imgEmotion_2);    $_ =~ s/$imgEmotion_1<!--e1-->/\:\)/isg         if ($imgEmotion_1);	$_ =~ s/<img src=\"$URLImages\/TooHappy.gif\" border=\"0\" align=\"middle\">/\:\-\D/isg;	$_ =~ s/<img src=\"$URLImages\/Sad.gif\" border=\"0\" align=\"middle\">/\:\-\(/isg;	$_ =~ s/<img src=\"$URLImages\/Wilk.gif\" border=\"0\" align=\"middle\">/\;\-\)/isg;	$_ =~ s/<img src=\"$URLImages\/Happy.gif\" border=\"0\" align=\"middle\">/\:\-\)/isg;	$_ =~ s/<blockquote><hr>(.+?)<hr><\/blockquote>/\n\{\n$1\n}\n/isg;	$_ =~ s/<blockquote><pre><font size=\"1\" face=\"$FontFace\">code:<\/font><hr><font face=\"Courier New\" size=\"\S+\">(.+?)<\/font><hr><\/pre><\/blockquote>/\ncode\:\{\n$1\n}\n/isg;		$_ =~ s/<\/pre>//isg;	$_ =~ s/<pre>//isg;	$_ =~ s/<li>/- /isg;	$_ =~ s/<\/font><!--color-->//isg;	$_ =~ s/<font color=\"(\S+?)\">//isg;	$_ =~ s/<\/center>//isg;	$_ =~ s/<center>//isg;		$_ =~ s/<\/sub>//isg;	$_ =~ s/<sub>//isg;	$_ =~ s/<\/sup>//isg;	$_ =~ s/<sup>//isg;	$_ =~ s/<\/font><!--fixed-->//isg;	$_ =~ s/<font face=\"Courier New\">//isg;	$_ =~ s/<\/font><!--4-->//isg;	$_ =~ s/<font size=\"4\">//isg;	$_ =~ s/<\/font><!--3-->//isg;	$_ =~ s/<font size=\"3\">//isg;	$_ =~ s/<\/font><!--2-->//isg;	$_ =~ s/<font size=\"2\">//isg;	$_ =~ s/<\/font><!--1-->//isg;	$_ =~ s/<font size=\"1\">//isg;	$_ =~ s/<\/u>//isg;	$_ =~ s/<u>//isg;	$_ =~ s/<\/i>//isg;	$_ =~ s/<i>//isg;	$_ =~ s/<\/b>//isg;	$_ =~ s/<b>//isg;	$_ =~ s/<a href=\"mailto:(\S+?)\"><!--autoemail-->\S+<\/a><!--autoemail-->/$1/isg;			$_ =~ s/<a href=\"ftp:\/\/(\S+?)\" target=\"_blank\"><!--autoftp-->\S+<\/a><!--autoftp-->/$1/isg;	$_ =~ s/<a href=\"(ftp:\/\/\S+?)\" target=\"_blank\"><!--auto-->\S+<\/a><!--auto-->/$1/isg;			$_ =~ s/<a href=\"http:\/\/(\S+?)\" target=\"_blank\"><!--autohttp-->\S+<\/a><!--autohttp-->/$1/isg;	$_ =~ s/<a href=\"(http:\/\/\S+?)\" target=\"_blank\"><!--auto-->\S+<\/a><!--auto-->/$1/isg;		$_ =~ s/<\/a><!--email-->//isg;	$_ =~ s/<a href=\"mailto:(\S+?)\">//isg;	$_ =~ s/<\/a><!--url-->//isg;	$_ =~ s/<!--nohttp--><a href=\"http:\/\/(\S+?)\" target=\"_blank\">//isg;	$_ =~ s/<!--http--><a href=\"(http:\/\/\S+?)\" target=\"_blank\">//isg;	$_ =~ s/<img src=\"(\S+?)\" border=\"0\">/[image]/isg;    $_ =~ s/\;<!--no-->/\\\^/isg;	$_ =~ s/\;<!--no-->/\\\;/isg;	$_ =~ s/\:<!--no-->/\\\:/isg;	$_ =~ s/<!--no-->\]/\\\]/isg;	$_ =~ s/\[<!--no-->/\\\[/isg;	$_ =~ s/\\<!--no-->/\\\\/isg;	$_ =~ s/\<p\>//isg;	$_ =~ s/\<br\>//isg;	$_ =~ s/\&lt\;/\</isg;	$_ =~ s/\&gt\;/\>/isg;	return $_;}################################################################################ EncodeDBInput                                                               ################################################################################sub EncodeDBInput {	my (@Input) = @_;	my ($Temp, $Return);	@Input=&EncodeHTML(@Input);	for (@Input) {		$Temp = $_;		$Temp =~ s/\Q$Spliter\E/\|\&\^\&\|/g;		$Temp =~ s/\r//g;		$Return .= $Temp.$Spliter;	}	$Return =~ s/\Q$Spliter\E$//g;	$Return .= "\n";	return $Return;}################################################################################ DecodeDBOutput                                                              ################################################################################sub DecodeDBOutput {	my ($Output) = @_;	my (@Outputs);	chomp ($Output);	@Outputs=split(/\Q$Spliter\E/, $Output);	for (my($i)=0;$i<=$#Outputs;$i++){		$Outputs[$i]=~s/\|\&\^\&\|/$Spliter/g;	}	@Outputs=&DecodeHTML(@Outputs);	return wantarray ? @Outputs : $Outputs[0];}################################################################################ RandomPassword                                                              ################################################################################sub RandomPassword {	my @Chars = (		"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",		"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",		"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", 		"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",		"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"	);	my $Password;	srand(time);	for (my ($i)=0;$i<6;$i++) {		$Password.=$Chars[rand(@Chars)];	}	return $Password; }################################################################################ RemoveCensorWords                                                           ################################################################################sub RemoveCensorWords {	my ($Input) = @_;	my ($TempWord);	if ($CensorWords) {		@CensorWords=split(/ /,$CensorWords);		for (@CensorWords) {			if ($Input =~/$_/i) {				$TempWord="#" x length($_);				$Input=~s/$_/$TempWord/ig;			}		}	}	return $Input;}################################################################################ GetDate                                                                     ################################################################################sub GetDate {	@Months = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Des");	if (@_[0] eq "N/A" or @_[0] eq "") {		return @_[0];	}

⌨️ 快捷键说明

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