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

📄 fun.php

📁 一个简单的人才信息交流版
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php
####<读入每行文本功能>####
function getline($file){
  $data=Chop(fgets($file,5000));
  return $data;
}
####<读入系统时间功能>####
function nowtime(){
  $date=date("Y-m-d.G:i:s");
  return $date;
}
####<生成索引ID功能>####
function getid(){
  $date=date("YmdGis");
  return $date;
}
####<UBB功能>####
function ubb($Text) {
  $Text=htmlspecialchars($Text);
  $Text=ereg_replace("\r\n","<br>",$Text);
  $Text=ereg_replace("\r","<br>",$Text);
  $Text=nl2br($Text);
  $Text=preg_replace("/\\t/is","  ",$Text);
  $Text=preg_replace("/\[h1\](.+?)\[\/h1\]/is","<h1>\\1</h1>",$Text);
  $Text=preg_replace("/\[h2\](.+?)\[\/h2\]/is","<h2>\\1</h2>",$Text);
  $Text=preg_replace("/\[h3\](.+?)\[\/h3\]/is","<h3>\\1</h3>",$Text);
  $Text=preg_replace("/\[h4\](.+?)\[\/h4\]/is","<h4>\\1</h4>",$Text);
  $Text=preg_replace("/\[h5\](.+?)\[\/h5\]/is","<h5>\\1</h5>",$Text);
  $Text=preg_replace("/\[h6\](.+?)\[\/h6\]/is","<h6>\\1</h6>",$Text);
  $Text=preg_replace("/\[url\](http:\/\/.+?)\[\/url\]/is","<a href=\\1>\\1</a>",$Text);
  $Text=preg_replace("/\[url\](.+?)\[\/url\]/is","<a href=\"http://\\1\">http://\\1</a>",$Text);
  $Text=preg_replace("/\[url=(http:\/\/.+?)\](.*)\[\/url\]/is","<a href=\\1>\\2</a>",$Text);
  $Text=preg_replace("/\[url=(.+?)\](.*)\[\/url\]/is","<a href=http://\\1>\\2</a>",$Text);
  $Text=preg_replace("/\[img\](.+?)\[\/img\]/is","<img src=\\1>",$Text);
  $Text=preg_replace("/\[color=(.+?)\](.+?)\[\/color\]/is","<font color=\\1>\\2</font>",$Text);
  $Text=preg_replace("/\[size=(.+?)\](.+?)\[\/size\]/is","<font size=\\1>\\2</font>",$Text);
  $Text=preg_replace("/\[sup\](.+?)\[\/sup\]/is","<sup>\\1</sup>",$Text);
  $Text=preg_replace("/\[sub\](.+?)\[\/sub\]/is","<sub>\\1</sub>",$Text);
  $Text=preg_replace("/\[pre\](.+?)\[\/pre\]/is","<pre>\\1</pre>",$Text);
  $Text=preg_replace("/\[email\](.+?)\[\/email\]/is","<a href=mailto:\\1>\\1</a>",$Text);
  $Text=preg_replace("/\[i\](.+?)\[\/i\]/is","<i>\\1</i>",$Text);
  $Text=preg_replace("/\[b\](.+?)\[\/b\]/is","<b>\\1</b>",$Text);
  $Text=preg_replace("/\[quote\](.+?)\[\/quote\]/is","<blockquote><font size='1' face='Courier New'>quote:</font><hr>\\1<hr></blockquote>", $Text);
  $Text=preg_replace("/\[code\](.+?)\[\/code\]/is","<blockquote><font size='1' face='Times New Roman'>code:</font><hr color='lightblue'><i>\\1</i><hr color='lightblue'></blockquote>", $Text);
  $Text=preg_replace("/\[sig\](.+?)\[\/sig\]/is","<div style='text-align: left; color: darkgreen; margin-left: 5%'><br><br>--------------------------<br>\\1<br>--------------------------</div>", $Text);
return $Text;
}
####<处理UBB功能>####
function str($msg){
  global $admin;
  if(!$admin[html]) $msg=htmlspecialchars($msg);
  if($admin[ubb]) $msg=ubb($msg);

  $msg= str_replace("\n","",$msg); #处理message
  $msg= str_replace("\r","",$msg); #处理message
  return $msg;
}

function safe_cover($s) {
$s=str_replace("|","│",$s);
$s=str_replace("<","&lt",$s);
$s=str_replace(">","&gt",$s);
$s=str_replace("\t","",$s);
$s=str_replace("\n","<br>",$s);
$s=str_replace("\r","",$s);
//----------------aiaiyi-------------------如有需要在下面添加屏蔽词语---------------------------//
$bad="他妈的|妈的|他爸的|操你妈|狗娘的|狗日的|shit|日你娘|日你妈|娘的|日你姐|fuck|龟儿子|龟孙子|兔崽子";
$bad_array=explode("|",$bad);
$co=count($bad_array)-1;
for ($i=0;$i<=$co;$i++) {
    $s=str_replace($bad_array[$i],"xxx",$s);
    }
return $s; }


function code_cover($s) {
$s=str_replace("│","|",$s);
$s=str_replace("&lt","<",$s);
$s=str_replace("&gt",">",$s);
$s=str_replace("","\t",$s);
$s=str_replace("<br>","\n",$s);
$s=str_replace("","\r",$s);
return $s; }

####<显示错误功能>####
function error($msg){

global $admin;

echo "<HTML><HEAD>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<meta name='description' content='$admin[title]'>
<title>发生错误</title><link rel='stylesheet' href='./images/style.css'><script language='JavaScript1.2'>
window.status='$admin[head] ';
</script></head>
<body>
<div align='center'>
  <center>
  <table border='0' width='600' height='100%' cellspacing='0' cellpadding='0'>
    <tr>
      <td width='100%' align='center'><table border='0' width='400' cellspacing='0' cellpadding='0' bgcolor='#000000'>
    <tr>
      <td width='100%'>
        <table border='0' width='100%' cellspacing='1' cellpadding='0'>
          <tr>
            <td width='100%' align='center' height='30' bgcolor='$admin[bgcolor2]'><font size='4' color='#000000'><b>发生错误</b></font></td>
          </tr>
          <tr>
            <td width='100%' align='center' bgcolor='$admin[bgcolor1]' height='120'>出错原因:<font color='#FF0000'>$msg</font>
              <p><a href='javascript:history.go(-1);'>请点这里返回上一页检查你的输入是否有误</a>
              <p>[ <a href='javascript:history.go(-1);'>返回上一页</a> ]</td>
          </tr>
        </table>
      </td>
    </tr>
  </table></td></tr></table></center></div></body></html>";
}

function checkmail($add){
if(ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+",$add)) $ttt=true;
      else $ttt=false;
return $ttt;
}
####<显示每页上部功能>####
function pagetop(){
global $admin;
?>
<HTML>
<HEAD>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<meta name='keywords' content='<?echo "$admin[keyword]"?>'>
<meta name='description' content='<?echo "$admin[description]"?>'>
<title><?echo "$admin[title] Powered by IIYI ! "?></title><link rel='stylesheet' href='./images/style.css'>
<script language='JavaScript1.2'>
function openScript(url, width, height) {
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
window.status='<?echo "$admin[head]"?>';
</script>

<script language="JavaScript1.2">
NS4=(document.layers) ? true : false;
IE4=(document.all) ? true : false;
ver4=(NS4 || IE4) ? true : false;

if (ver4){
  with (document){
    write("<STYLE TYPE='text/css'>");
    if (NS4){
      write(".parent {position:absolute; visibility:visible}");
      write(".child {position:absolute; visibility:visible}");
    }
    else {
      write(".child {display:none}")
    }
    write("</STYLE>");
  }
}

function getIndex(el){
  ind = null;
  for (i=0; i<document.layers.length; i++){
    whichEl = document.layers[i];
    if (whichEl.id == el){
      ind = i;
      break;
    }
  }
  return ind;
}

function arrange(){
  nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
  for (i=firstInd+1; i<document.layers.length; i++){
    whichEl = document.layers[i];
    if (whichEl.visibility != "hide") {
      whichEl.pageY = nextY;
      nextY += whichEl.document.height;
    }
  }
}

function initIt(){
  if (!ver4) return;
  if (NS4) {
    for (i=0; i<document.layers.length; i++) {
      whichEl = document.layers[i];
      if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
    }
    arrange();
  }
  else {
    divColl = document.all.tags("DIV");
    for (i=0; i<divColl.length; i++) {
      whichEl = divColl(i);
      if (whichEl.className == "Child") whichEl.style.display = "none";
    }
  }
}

function expandIt(el){
  if (!ver4) return;
  if (IE4) {
    var imgObj = document.all("I_" + el);
    whichEl = eval(el + "Child");
    if (whichEl.style.display == "none") {
      whichEl.style.display = "block";
      imgObj.src = '<?echo$admin[img];?>/shut.gif';
    }
  else {
    whichEl.style.display = "none";
    imgObj.src = '<?echo$admin[img];?>/expand.gif';
    }
  }
  else {
    whichEl = eval("document." + el + "Child");
    if (whichEl.visibility == "hide"){
      whichEl.visibility = "show";
    }
    else {
      whichEl.visibility = "hide";
    }
    arrange();
  }
}
onload =initIt;
</script>

<script language="JavaScript">
<!--
   function mouseOver(src,colorOver)
   {
   src.style.cursor = 'hand'; src.bgColor = colorOver;
   }
   function mouseOut(src,colorIn)
   {
   src.style.cursor = 'default';
   src.bgColor = colorIn;
   }
// -->
</script>
<style type=text/css><!--
a:link    {color:004080;text-decoration:none}
a:visited {color:004080;text-decoration:none}
a:hover   {color:red;text-decoration:none}
input.radio {background: ; color:#000000}
font {  font-size: 9pt; line-height: 13pt; FONT-FAMILY:tahoma}
td {  font-size: 9pt; line-height: 13pt; FONT-FAMILY:tahoma}
textarea { BACKGROUND-COLOR: #e8e8e8; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000;; font-size: 9pt ;FONT-FAMILY:}
input { BACKGROUND-COLOR: #e8e8e8; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP:1px double; COLOR: #000000;; font-size: 9pt; FONT-FAMILY:tahoma}
--></style>
</head>

<body>
<br>
<p align=center><IMG src="<?echo$admin[img];?>/yplogo.gif"><br><br>

<table width=718 cellpadding=0 cellspacing=0><tr><td class=dh>>>>> <a href="./index.php"><b>职业广场</b></a> > </td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width=720 bgcolor="" height=20>
<tr bgcolor="#2f6fbf"><td align="left" valign=top  WIDTH="7" ></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?"><font class=d>最新信息</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=search&keyword=招聘"><font class=d>显示招聘</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=search&keyword=求职"><font class=d>显示应聘</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=add"><font class=d color=red><b>发布信息</b></font></a></td>



<td align="right" WIDTH="7" valign=top></td> 
</tr><tr>
<td align="left" WIDTH="7" valign=bottom></td>
<td align="right" WIDTH="7" valign=bottom></td></tr>
</table>
<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><?echo search();?></td>
          </tr>
</table>



<br>


<div align="center">
  <center>
  <table border="0" width="720" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td width="160" valign="top" align="center" bgcolor="#ffffff">
        <table border="0" width="100%" cellspacing="2" cellpadding="1">
          <tr>
            <td width="100%" align="center" bgColor=#2f6fbf height="20"><font color=#ffffff>信息类别</font></td>
          </tr>
        <table border="0" width="100%" cellpadding="0">
          <tr>
            <td width="100%" align="center"><?echo menu();?><br><?echo newjoin();?><br><?echo top();?></td>
          </tr>
        </table>
      </td>
      <td valign="top">

<?
}


####<显示增加页上部功能>####
function pagetopadd(){
global $admin;
?>
<HTML>
<HEAD>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<meta name='keywords' content='<?echo "$admin[keyword]"?>'>
<meta name='description' content='<?echo "$admin[description]"?>'>
<title><?echo "$admin[title] Powered by IIYI ! "?></title><link rel='stylesheet' href='./images/style.css'>
<script language='JavaScript1.2'>
window.status='<?echo "$admin[head]"?>';
</script>
<script language="JavaScript">
<!--
   function mouseOver(src,colorOver)
   {
   src.style.cursor = 'hand'; src.bgColor = colorOver;
   }
   function mouseOut(src,colorIn)
   {
   src.style.cursor = 'default';
   src.bgColor = colorIn;
   }
// -->
</script>
</head>

<body>
<br>
<p align=center><IMG src="<?echo$admin[img];?>/yplogo.gif"><br><br>

<table width=718 cellpadding=0 cellspacing=0><tr><td class=dh>>>>> <a href="./index.php"><b>职业广场</b></a> > </td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" width=720 bgcolor="" height=20>
<tr bgcolor="#2f6fbf"><td align="left" valign=top  WIDTH="7" ></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?"><font class=d>最新信息</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=search&keyword=招聘"><font class=d>显示招聘</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=search&keyword=求职"><font class=d>显示应聘</font></a></td>
<td rowspan=2 bgcolor="#2f6fbf" align=center onmouseover="mouseOver(this,'#0000ff');" onmouseout="mouseOut(this,'#2f6fbf');"><a style="color: #ffffff; text-decoration: none" href="<?echo$admin[downphp];?>?action=add"><font class=d color=red><b>发布信息</b></font></a></td>


<td align="right" valign=top WIDTH="7"></td>
</tr><tr>

⌨️ 快捷键说明

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