Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips-library/IRview/graph-extract.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Mon Nov 6 01:29:26 2006 UTC (17 years, 5 months ago) by yamaji
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: application/x-httpd-php
initial import into CVS

1 <?php
2 // $Revision: 1.2 $ //
3 // ------------------------------------------------------------------------ //
4 // //
5 // OAI-PMH based Institutional Repository Introduction Module //
6 // Copyright (C) 2005 Kazutsuna YAMAJI. All rights reserved. //
7 // //
8 // ------------------------------------------------------------------------ //
9 // This program is free software; you can redistribute it and/or modify //
10 // it under the terms of the GNU General Public License as published by //
11 // the Free Software Foundation; either version 2 of the License, or //
12 // (at your option) any later version. //
13 // //
14 // You may not change or alter any portion of this comment or credits //
15 // of supporting developers from this source code or any supporting //
16 // source code which is considered copyrighted (c) material of the //
17 // original comment or credit authors. //
18 // //
19 // This program is distributed in the hope that it will be useful, //
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
22 // GNU General Public License for more details. //
23 // //
24 // You should have received a copy of the GNU General Public License //
25 // along with this program; if not, write to the Free Software //
26 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
27 // ------------------------------------------------------------------------ //
28 include 'header.php';
29
30 $table_repo = $xoopsDB->prefix( 'irview_repositories' );
31
32 if (empty($_GET['repo_id'])){
33 header("HTTP/1.0 404 Not Found");
34 exit;
35 }
36 $repo_id = (int)$_GET['repo_id'];
37 //
38 // Count the active repository from the irview_repositories table
39 $sql = "SELECT repo.record_graph FROM ${table_repo} AS repo WHERE repo.repository_id=${repo_id}";
40 $result = $xoopsDB->query( $sql );
41 if ($result == false || $xoopsDB->getRowsNum($result) == 0){
42 header("HTTP/1.0 404 Not Found");
43 exit;
44 }
45
46 $row = $xoopsDB->fetchRow( $result );
47 $graph_image = base64_decode( $row[0] );
48 $graph_size = sizeof($graph_image);
49 header( "Content-Type: image/png" );
50 header( "Content-Length: $graph_size" );
51 echo $graph_image;
52
53 ?>

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26