首页 > 开发 > PHP > 正文

人大复印资料处理程序_补充篇

2024-05-04 23:01:17
字体:
来源:转载
供稿:网友
说明:
1、人大复印资料的处理是本人自己使用的一套程序,因为看到论坛上有关于全文检索的讨论所以就不顾编程水平的菜鸟级差,也将其公布于公。
2、人大复印全文光盘资料在各大学图书馆应该可以取得。
######config.php3
<?
$hostname = "localhost";
$dbusername = "";
$dbname='';
$dbpassword = "";

function indexfile($index_file,$index_title,$index_describe=""){
  global $added;
if($index_file==""){
    $index_file="/index/temp.html";
    }
elseif(file_exists($index_file)){
    $added=1;
    copy($index_file,$index_file.".bak");
   }
$fp_i=fopen($index_file,'w+');
fputs($fp_i, "<html><head><title>$index_title</title></head><body>rn");
  
fputs($fp_i, "<h5>$index_title</h5>rn");
//$dte_created=date('y-m-d h:i:s');
fputs($fp_i, "<font color='maroon' face='楷体' size=1>$index_describe");
//查询日期:$dte_created</font><hr>rn");
//fputs($fp_i,"<table>rn");
  return $fp_i;
}

function mysql_error_exit($msg) {
      $errno = mysql_errno();
      $error = mysql_error();
      echo '<html><head><title>数据库错误</title></head><body>';
      echo $msg;
      echo "<br>错误: ($errno) $error<br>";
      echo '</body></html>';
        exit();
         
  }
function xueroom_error_exit($msg,$page) {
    echo "<html><head><title>严重错误 </title></head>";
    echo "<body><table align=center cellpadding=3 cellspacing=0 width=420 >";
    echo "<th colspan=2 bgcolor=726cc5>";
    echo"<font color=white face=arial,helvetica size=2><center>";
          echo $msg."<br>";
          echo "<tr><td align=center>请致信[email protected],与管理员联系。";
          echo"<br><tr><td align=center><a href = ".$page.">返回 </a>";
          echo '</body></html>';
      exit -1;
}
function xueroom_message($msg) {
    echo '<table>';
    echo '<tr><td>';
    echo "$msg";
    echo '</td></tr>';
    echo '</table>';
  }

?>

#################### 数据库结构:
create table artical (
   artical_id int(6) not null auto_increment,
   resource_id varchar(10) not null,
   origin_periodical varchar(60) binary not null,
   date_pub datetime default '0000-00-00 00:00:00' not null,
   artical_author varchar(50) binary not null,
   artical_title varchar(100) binary not null,
   artical_data longblob not null,
   artical_type varchar(6),
   artical__size varchar(10),
   date_reprinted datetime default '0000-00-00 00:00:00' not null,
   read_count int(10) default '0' not null,
   catalog tinyint(4) unsigned default '0' not null,
   primary key (artical_id),
   key artical_title (artical_title),
   key artical_author (artical_author),
   key origin_periodical (origin_periodical),
   key catalog (catalog),
   key resource_id (resource_id)
);
注册会员,创建你的web开发资料库,
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表