Thread: calibre2php
View Single Post
Old 10-09-2009, 09:44 AM   #5
RhysMcW
Junior Member
RhysMcW began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2009
Location: Cape Town, South Africa
Device: Sony PRS-505sc
Quote:
Originally Posted by FragFrog View Post
On the other hand, this only works if said webserver has direct access to the datastore file, which is somewhat less easily accomplished.
What I've done is actually moved my ebook library store onto my web server and access have a shared drive mapped to it from the PC and I've set Calibre to use that path directly thereby any changes I make in Calibre are immediately available on my web interface.

Quote:
Originally Posted by FragFrog View Post
Then, as for the code itself: you store almost all global information in the session which, if anything, lacks elegance.
Being very new to PHP I appreciate your comments.
I store the variables in the session to have them available to each .PHP without having to pass them in the URL to keep them from the user browsing, seems like a good idea unless there's a better way (still keeping them invisible to the browser).

Quote:
Originally Posted by FragFrog View Post
There is also a lot of mixing of PHP and HTML, while usually limited within functions it is not something I enjoy seeing - the MVC architecture has many benefits, and will save you a lot of trouble later on if the project grows.
Not sure what the "MVC architecture" is yet , I was trying to make this be dependent on as little as possible as some people were talking of wanting a PHP interface for use on their NAS box and I figured there probably won't be too many nice modules etc available.

Quote:
Originally Posted by FragFrog View Post
It has made me cautious, and using parametrized queries would be a simple way to prevent any possible hacks since you're already using PDO
Do you perhaps have an example of using "parametrized queries"? Again, not sure what you mean yet

Thanks again for your comments. There's still a lot to be done and part of that I'll probably be moving some of the code in the main .php into functions in calibre2php.inc.php.
RhysMcW is offline   Reply With Quote