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

📄 ofstarcode.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
function phpcode($code){
$code=str_replace("\\t","%t%",$code);
$code=str_replace("\\n","%n%",$code);
$code=str_replace("\\r","%r%",$code);
$code=stripslashes($code);
$code=str_replace("%t%","\\t",$code);
$code=str_replace("%n%","\\n",$code);
$code=str_replace("%r%","\\r",$code);
$code_temp=explode("<br>",$code);
$code=str_replace("<br>","\r\n",$code);
$code = str_replace("&nbsp;", " ", $code);
$code=str_replace('%a%','',$code);
$code=str_replace("│","|",$code);
$count_code=count($code_temp)+1;
$code="<br><font color=red>以下是代码:</font><br><TEXTAREA name=textfield rows=10 style='WIDTH:100%;HEIGHT:100%' class=\"code\">$code</textarea><br>[Ctrl+A 全部选择]";
return $code;
}
function htmlcode($code){
$code=str_replace("\\t","%t%",$code);
$code=str_replace("\\n","%n%",$code);
$code=str_replace("\\r","%r%",$code);
$code=stripslashes($code);
$code=str_replace("%t%","\\t",$code);
$code=str_replace("%n%","\\n",$code);
$code=str_replace("%r%","\\r",$code);
$code_temp=explode("<br>",$code);
$code=str_replace("<br>","\r\n",$code);
$code = str_replace("&nbsp;", " ", $code);
$code=str_replace('%a%','',$code);
$code=str_replace("│","|",$code);
$count_code=count($code_temp)+1;
$code="<table width=100% cellspacing=0 border=0 ><tr>
<td>
<SCRIPT>function runEx(){var winEx = window.open('', '', 'resizable,scrollbars'); winEx.document.open('text/html', 'replace');winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));}</SCRIPT>HTML代码如下:<BR><TEXTAREA style='WIDTH:100%;HEIGHT:100%' name=textfield rows=8>$code</TEXTAREA><INPUT onclick=runEx() type=button value=运行此HTML代码>[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]</TD></TR></TABLE>";
return $code;
}
////////////////////////////
function sellit($sellmoney,$code){
global $username,$idpath,$author,$forumid,$filename,$bordercolor,$manager,$login_status,$money_title;
$qqmm=0;
if($sellmoney>100) $sellmoney=100;
if($sellmoney<0) $sellmoney=0;
if ($sellmoney && !ereg("^[0-9]{0,}$",$sellmoney)) $sellmoney=0;
$filelists=file($idpath."forum".$forumid."/".$filename);
$detail=explode('|',$filelists[0]);
$users=explode(',',$detail[9]);
$count=count($users)-1;
$buyers="<select name=buyers><OPTION value=>购买人名单</OPTION><OPTION value=>-----------</OPTION>";
for($i=1;$i<=$count;$i++){$buyers.="<OPTION value=>".$users[$i]."</OPTION>";}
$buyers.="</select>";
if ($users && in_array($username,$users)) $qqmm=1;
if ($username==$manager) $qqmm=1;
if($login_status==1 && $qqmm==1) $code1="<b><font color=red>[此贴售价<font color=blue> ".$sellmoney." </font>".$money_title.",已有<font color=blue> ".$count." </font>人购买]</font></b>".$buyers."<br>
<table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td>
<table width=100% cellpadding=5 cellspacing=1 border=0>
<TR><TD BGCOLOR=#EFF3F9>".$code."</td></tr></table></td></tr></table>";
else $code1="<br><b><font color=red>[此贴售价<font color=blue> ".$sellmoney." </font>".$money_title.",已有<font color=blue> ".$count." </font>人购买]</font></b>".$buyers."<br><br>
<form action=action.php?buyjob=buy method=post>
<input type=hidden name=sellmoney value=$sellmoney>
<input type=hidden name=buyer value=$username>
<input type=hidden name=seller value=$author>
<input type=hidden name=forumid value=$forumid>
<input type=hidden name=filename value=$filename>
<input type=Submit value=算你狠。。我买,我付钱 style='color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1' onMouseOver ='this.style.backgroundColor=\"#ffffff\"' onMouseOut='this.style.backgroundColor=\"#f3f3f3\"'>
<br><br><font color=red><b>若发现会员采用欺骗的方法获取金钱,请立刻举报,我们会对会员处以2-N倍的罚金,严重者封掉ID!</b></font>
</form><br>";
return $code1;
}
//////////////
function post($code){
global $username,$login_status,$author,$check_sup,$forum_admin1,$articlelist,$bordercolor,$manager;
$count=count($articlelist);
for($i=0;$i<$count;$i++){
$tmp=explode("|",$articlelist[$i]);
$temp[]=$tmp[1];
}
if($login_status==1 && ($username==$author || $check_sup==1 || $username==$manager || ($forum_admin1 && in_array($username,$forum_admin1)) || ($temp && in_array($username,$temp)))) $code1="[本部分设定了<font color=red>隐藏</font>,你已回复过了,以下是隐藏的内容]<br><table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#EFF3F9>".$code."</td></tr></table></td></tr></table>";
else $code1="<br><br><table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#EFF3F9>本部分内容设定了<font color=red>隐藏</font>,需要<font color=red>回复</font>后才能看到</table></table><br><br>";

return $code1;
}
function hiden($code,$code3){
$code=stripslashes($code);
$code=intval($code);
$code=trim($code);
global $username,$userpath,$login_status,$author;
if($login_status==1){
$userdetail=get_user_info($username);
$authordetail=get_user_info($author);
$ww=floor($userdetail[16]/10);
$wwauthor=floor($authordetail[16]/10);
if($wwauthor<$code) $code=$wwauthor;
if($ww>=$code) $code="[本部分内容设定了<font color=red>加密</font>,需要{$code}威望,你现在有{$ww}]<br><table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#EFF3F9>$code3</table></table>";
else $code="<font color=red>对不起!这部分被作者加密。你需要<b>{$code}</b>点以上的威望才能够浏览!而你目前的威望只有<b>$ww</b>点。</font>";
}
else{$code="<font color=red>对不起!请先<a href=login.php>登录</a>,这部分被作者加密。你需要<b>{$code}</b>点以上的威望能够浏览!</font>";}
return $code;
}

function fonttext($font,$text){
$font=explode(" ",$font);
$text="<font face=$font[0] $font[1] $font[2]>$text</font>";
return $text;
}
function picture($src){
$code="<IMG ";
$src=str_replace("\\\"","\"",$src);
$src=explode(" ",$src);
$count=count($src);
for($i=0;$i<$count;$i++) $code.=$src[$i]." ";
$code.="onload=\"javascript:if(this.width>screen.width-400) this.width=screen.width-400\">";
return $code;
}

function table($style,$table){
global $bordercolor;
$table_head="<table ";
if($style=="") $table_head.="border=1 ";
$style=str_replace("\\\"","\"",$style);
$table=str_replace("\\\"","\"",$table);
$style=explode(" ",$style);
$count=count($style);
for($i=0;$i<$count;$i++) $table_head.=$style[$i]." ";
$table_head.="bordercolor=$bordercolor>";
$table=str_replace("[TD]","<TD>",$table);
$table=str_replace("[/TD]","</TD>",$table);
$table=str_replace("<TD></TD>","<TD>&nbsp;</TD>",$table);
$table=str_replace("[TR]","<TR>",$table);
$table=str_replace("[/TR]","</TR>",$table);
$table=str_replace("[TBODY]","<TBODY>",$table);
$table=str_replace("[/TBODY]","</TBODY>",$table);
$table=str_replace("<br>","",$table);
$table_end="</table>";
$table=$table_head.$table.$table_end;
return $table;
}
function block($post){
$post=str_replace(" ","&nbsp;",$post);
$post=str_replace("│","|",$post);
$post=str_replace("\\\\","\\",$post);
return $post;
}
function convert($post,$allow=array('pic'=>1,'flash'=>1,'fontsize'=>1)) {
global $keyword,$forum_post,$forum_hide,$forum_sell,$admin;
$post=str_replace("))","<img src='images/z7.gif'>)",$post);
$post=str_replace("	","   ",$post);
if (strpos($post,"[block]") !== false && strpos($post,"[/block]") !== false){ 
$post=preg_replace("/\[block\](.+?)\[\/block\]/eis","block('\\1')",$post);
}
if (strpos($post,"[code]") !== false && strpos($post,"[/code]") !== false){ 

$post=preg_replace("/\[code\](.+?)\[\/code\]/eis","phpcode('\\1')",$post);
return $post;
}
if ($forum_sell && strpos($post,"[sell") !== false && strpos($post,"[/sell]") !== false){ 
$post=preg_replace("/\[sell=(.+?)\](.+?)\[\/sell\]/eis","sellit('\\1','\\2')",$post);
}
if ($forum_post && strpos($post,"[post]") !== false && strpos($post,"[/post]") !== false){ 
$post=preg_replace("/\[post\](.+?)\[\/post\]/eis","post('\\1')",$post);
}
if ($forum_hide && strpos($post,"[hide") !== false && strpos($post,"[/hide]") !== false){ 
$post=preg_replace("/\[hide=(.+?)\](.+?)\[\/hide\]/eis","hiden('\\1','\\2')",$post);
}

$posttemp=strtolower($post);
if (strpos($posttemp,"[font=") !== false && strpos($posttemp,"[/font]") !== false){ 
$post=str_replace("[FONT","[font",$post);
$post=str_replace("[/FONT]","[/font]",$post);
$post=preg_replace("/\[font=(.+?)\](.+?)\[\/font\]/eis","fonttext('\\1','\\2')",$post);
}

if (strpos($posttemp,"[img") !== false && strpos($posttemp,"]") !== false){ 
$post=str_replace("[IMG","[img",$post);
$post=preg_replace("/\[img (.+?)\]/eis","picture('\\1')",$post);
}

if (strpos($posttemp,"[table") !== false && strpos($posttemp,"[/table]") !== false){

$post=preg_replace("/\[table\](.+?)\[\/table\]/eis","table('','\\1')",$post);
$post=preg_replace("/\[table (.+?)\](.+?)\[\/table\]/eis","table('\\1','\\2')",$post);

}
if (strpos($post,"[html]") !== false && strpos($post,"[/html]") !== false){ 

$post=preg_replace("/\[html\](.+?)\[\/html\]/eis","htmlcode('\\1')",$post);

}
$keywords=explode(",",$keyword);
$kwcount=count($keywords);
for($kw=0;$kw<$kwcount;$kw++){
$post =str_replace($keywords[$kw],"<font color=red>".$keywords[$kw]."</font>",$post);
}
  $post =str_replace("<p>","<br><br>",$post);
  //$post =str_replace("[[","{{",$post);
  //$post =str_replace("]]","}}",$post);
  $post =str_replace("<br>"," <br>",$post);
  $post =str_replace("[u]","<u>",$post);
  $post =str_replace("[/u]","</u>",$post);
  $post =str_replace("[b]","<b>",$post);
  $post =str_replace("[/b]","</b>",$post);
  $post =str_replace("[i]","<i>",$post);
  $post =str_replace("[/i]","</i>",$post);
  $post =str_replace("[br]","<br>",$post);
  $post =str_replace("[list]","<ul>",$post);
  $post =str_replace("[/list]","</ul>",$post);
  $post =str_replace("[olist]","<ol>",$post);
  $post =str_replace("[/olist]","</ol>",$post);
  $post =str_replace("[*]","<li>",$post);
  //$post =str_replace("{{", "[", $post);
  $post =str_replace("[hr]", "<hr>", $post);
  $post =str_replace("[HR]", "<HR>", $post);
  $post =str_replace("[H1]", "<H1>", $post);
  $post =str_replace("[H2]", "<H2>", $post);
  $post =str_replace("[H3]", "<H3>", $post);
  $post =str_replace("[H4]", "<H4>", $post);
  $post =str_replace("[H5]", "<H5>", $post);
  $post =str_replace("[H6]", "<H6>", $post);
  $post =str_replace("[H7]", "<H7>", $post);
  $post =str_replace("[/H1]", "</H1>", $post);
  $post =str_replace("[/H2]", "</H2>", $post);
  $post =str_replace("[/H3]", "</H3>", $post);
  $post =str_replace("[/H4]", "</H4>", $post);
  $post =str_replace("[/H5]", "</H5>", $post);
  $post =str_replace("[/H6]", "</H6>", $post);
  $post =str_replace("[/H7]", "</H7>", $post);
  $post = eregi_replace("\\[hr=([^\\[]*)\\]","<hr width=\\1 align=left>",$post);
  $post =str_replace("[sup]","<sup>",$post);
  $post =str_replace("[/sup]","</sup>",$post);
  $post =str_replace('[url=&quot;','[url="',$post);
  $post =str_replace('&quot;]','"]',$post);

$pattern = array(
  "/\[font=([^\[]*)\](.+?)\[\/font\]/is",
  "/\[color=([#0-9a-z]{1,10})\](.+?)\[\/color\]/is",
  "/\[email=([^\[]*)\](.+?)\[\/email\]/is",
//  "/\[email=\"([^\[]*)\"\](.+?)\[\/email\]/is",

⌨️ 快捷键说明

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