TCompanies Steamlines Accounts Payable with HighOrbit
Invoice Management Automation Saves Time & Money
Read more...

HighOrbit

Workflow Automation

 
Welcome, Guest
Please Login or Register.    Lost Password?

PHP code to display Document contents
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: PHP code to display Document contents
#9
PHP code to display Document contents 4 Years, 2 Months ago Karma: 0
Do you have any example PHP code that will display the content from a Document type data element?
ukutluoglu
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/03/08 16:22 By ukutluoglu .
The administrator has disabled public write access.
 
#11
Re:PHP code to display Document contents 4 Years, 2 Months ago Karma: 1
Please see attachment.
File Attachment:
File Name: phpCodeSample.txt
File Size: 679
admin
Moderator
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/03/08 16:23 By admin.
The administrator has disabled public write access.
 
#381
Re:PHP code to display Document contents 3 Years, 2 Months ago Karma: 0
That might be a good code for displaying document contents. I should try it on my own later. Anyway, thanks a lot for the code.SEO Services
jennyshred
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/03/24 15:17 By jennyshred.
The administrator has disabled public write access.
 
#382
Re:PHP code to display Document contents 3 Years, 2 Months ago Karma: 0
Seems to be a broken link.. Actual code from attachment:

Code:

<?php
require("database.php");

if(isset($_GET["ciid"])){
$sq_cid=(integer)$_GET["ciid"];
$sq_fid=(integer)$_GET["fid"];

$sql = mysql_result(mysql_query("select COUNT(*) from inst_data_attachment
where CIID=$sq_cid AND DID=$sq_fid"),0);
if ($sql>0){
$sql = "select VALUE,LENGTH,MIMETYPE from inst_data_attachment where
CIID=$sq_cid AND DID=$sq_fid";
$result = mysql_query($sql);
list($content,$size,$type) = mysql_fetch_array($result);
header("Content-length: $size");
header("Content-type: $type");
echo $content;
exit();
} else {
header('Content-Type: image/x-png');
header('Content-Length: ' . filesize("blank.png"));
readfile("blank.png");
}
}
?>

klafata
Moderator
Posts: 27
graph
User Offline Click here to see the profile of this user
Gender: Male Location: St. Louis, MO Birthday: 11/07
The administrator has disabled public write access.
---
Kevin LaFata
HighOrbit Corporation
 
Go to topPage: 1

Support Login