Jump to content

BliarOut

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

BliarOut's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you for that, it makes complete sense Is there a way to achieve the objective above? The other issues are that the content is dynamically pulled from a MySQL database that only allows access from localhost, the *main* server and I've also got a lot of variables, some of which are stored in sessions to contend with too. I did think of having the script that generates the PDF from TCPDF on the remote server too but I'm not sure how to share variables across more than one physical server.
  2. What I'm *trying* to do at the moment is test running TCPDF on a server we have inhouse with the rest of the code on our public webserver. session_start(); include('http://ourremoteurl.co.uk/tcpdf/config/lang/eng.php'); include('http://ourremoteurl.co.uk/tcpdf/tcpdf.php'); /* require_once('./tcpdf/config/lang/eng.php'); require_once('./tcpdf/tcpdf.php'); */ I can see the request coming in in our IIS logs, but I get the error from TCPDF Fatal: class TCPDF not found. TCPDF is working on our inhouse server and can serve up it's own examples without error. So I suppose my first question is what is the fundamental thing I don't understand about code running on two separate servers?
  3. Gah, can anyone help. We've written a web app, it was all tested and doing what it should and at the eleventh hour I've hit a snag. We use TCDPF to create printed reports from a MySQL database. It does what it should when accessed over the 'net however I've just been informed that their firewall won't allow Activ X content through and they won't (as opposed to can't) create an exception to trust our site. So, I need a workaround. Option 1) Host a complete copy on their internal network (exceptionally undesirable as it becomes unmanageable). Option 2) Split the printing components out and host that on a web server on their internal network. Option 3) Find another way of producing PDF output from a MySQL web app that can traverse a strict firewall. My preference is for option 2, but I'd like some opinions/thoughts on the best way to proceed before I code myself into a corner once more Thus far I've tried using an include to a different server but it is spitting it's dummy at the moment. Does anyone have any opinions on the *easiest* way to work around the problem? Thanks, Rob
  4. Well it did work despite my explanation :-) Thanks very much for your help!
  5. I know I'm just a full stop, a bracket or an apostrophe away from the answer to this but I can't see it. I have the following code which checks that a user has selected a radio button then opens a pop up window and passes a few variables to it. It works perfectly as pasted below: //============================================================+ //Used to open 'popup' windows to display print documents. //Takes the parameters url, name of the submitting form, the //radio button name, the width, the height and the discipline ID //============================================================+ function popup(url, frmName, ctrlName, hw, hh, typeID) { //============================================================+ //Check if the radio button has been selected and get it's value. //============================================================+ clickedOn=''; for (var i=0; i < document.PTWSelect.UniqueID.length; i++) { if (document.PTWSelect.UniqueID[i].checked) { clickedOn='document.PTWSelect.UniqueID[i].value'; var uniqueID = document.PTWSelect.UniqueID[i].value; } } if (clickedOn == ""){ alert("Please make a selection.") return false; } //============================================================+ //Set some variables for the popup. //============================================================+ var width = hw; var height = hh; var left = (screen.width - width)/2; var top = (screen.height - height)/2; var params = 'width='+width+', height='+height; params += ', top='+top+', left='+left; params += ', directories=no'; params += ', location=no'; params += ', menubar=no'; params += ', resizable=yes'; params += ', scrollbars=yes'; params += ', status=no'; params += ', toolbar=no'; newwin=window.open(url+'?TypeID='+typeID+'&UniqueID='+uniqueID,'formWindow', params); if (window.focus) {newwin.focus()} return false; } //============================================================+ //End function. //============================================================+ The problem is if I try to use a passed variable in this line it fails: if (document.PTWSelect.UniqueID[i].checked) What is the correct syntax, I thought this would work? if (document.frmName.ctrlName.UniqueID[i].checked) But it doesn't. If I test it by doing an alert(frmName +" "+ctrlName) the variables come through just as I expected. What am I missing? Thanks, Rob
  6. I should have just tried it, it works! :-) If anyone wants to audit prints sent from a browser window into a MySQL database this will do the trick. Only works in IE as FF doesn't support the onbeforeprint() function.
  7. I'm building an app in PHP and I need to audit whenever anyone prints. IE 6 & 7 support the onbeforeprint() and onafterprint() function so I can trap whenever anyone prints even if it's not from a button that I've attached code to. The code below fires exactly when I want but I'd like to replace the alert with a MySQL insert that puts an entry in my log table. <script language="javascript" type="text/javascript"> function window.onbeforeprint() { alert('This fires before printing!'); } </script> Should the following work in theory (assuming all my variables are already declared etc)? <script language="javascript" type="text/javascript"> function window.onbeforeprint() { <!--Replace this alert('This fires before printing!'); --> <!--With This --> <?php mysql_query("INSERT INTO log (UserID, EventType, IPAddress) VALUES ('$_SESSION[FullName]', 'Permit no " ."$NewPermitID". " Printed', '$_SESSION[iP]')") or die(mysql_error()); ?> } </script>
  8. Still no further with this.... Surely there's an easy way to log when someone prints a record? I can't be the only person who wants to audit what my users are doing on my system.
  9. Yup, I probably didn't explain it very well! When someone prints I want to run a MySQL insert query and dump the IP address, time and user ID etc into my log table.
  10. I have an application which I've written primarily in PHP. There are a few snippets of JS here and there, but the guts of it is PHP. What I would like/need to do is to log whenever someone prints off a report in my application. I am aware that IE has a JS onbeforeprint() and an onafterprint() function but I believe FF is lacking in support for this. I know I could put my own print button on the app but I'm concerned that someone could just press <CTRL> P and bypass my code. So, can anyone suggest a way I can put an entry in my log table whenever someone prints from the application? (Print screen isn't an issue)
  11. Err, I don't know how to create a code library mainly Thing is, I need to integrate into an existing site and they use a different syntax. The syntax is perfectly valid and works. They won't be happy if I suddenly want to change everything because of a limitation in the software I want to use. If that lets me achieve my objective then I'll do it, otherwise, it's just an expensive text editor
  12. I have a perfectly good binding in my PHP, but DW MX 2004 seems to ignore it because it wants to use it's own syntax! Is there any way that I can tell DW to use my existing bindings? At the moment, I have to go back and edit/replace a shedful of text, which kind of defeats the object of the product!! As I am evaluting, it gives me time to decide if it's worth the money! If I can't do this then I don't think I will bother with DW. (I'm not being precious, but I don't have control over the entire site, and I can't edit the include file, as it will break other parts of the site!)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.