Jump to content

therob1

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by therob1

  1. i did read somewhere that its default location for word was somewhere weird, i maybe wrong, but it might be worth double checking the path, i hard coded my path to avoid any doubt during testing and i used forward slashes instead "c:/mydoc.doc"
  2. nothing wrong with storing the content into a db, but im then going to need to create some kind of interface and toolbar (such as tiny mce) to allow for format/editing. What would you suggest is going to be the best method of doing this and how would i store the text + images within the same DB field? I would also need provide some kind of import facility for existing documents, im guessing cut and paste could be workable, but not ideal
  3. he would need to send letters out as some clients are not allowed to accept instructions electronically, and some others are not internet savvy. he has a bank (maybe around 100 ) of standard letters/documents that he manually has to customise each time he needs to send out a letter, what im trying to do is help him with the efficiency and also try to make it so he can do certain revisions without any input from a developer. so a typical example would be a "letter to client" thanking them and pulling through usual mail merge style name/address then changing certain words/sentences within the body of the letter to make them more intelligent/dynamic ive previously seen some systems where you just keep the bulk of the document and put in 'tags' around where you want the content to change, such as "%TAG% WORDS TO CHANGE %TAG%" I dont know if/what these types of systems are called. however, I would be interested to know how I could build something that wouldnt be dependant on a word processor package but was able to allow me to create my own document templates and code up parts the way I wanted. How would this typically be achieved, maybe a large textarea that would also allow for user to make final amendments then a button to generate into PDF ?
  4. Im creating a mini-system for a friend who has his own business, so im wanting to create/store 'clients' and 'cases' for each client. Every time a letter/document gets drafted I want it to generate/store a copy within the history of each case. so I would guess i want to generate the document first copy it into the 'case history location' then load on screen the word document thats just been stored so the user could check/amend/print the letter to send out - either as fax,email attachment,printer does that make more sense ? one thing i might be thinking about longer term would be to have the option to convert/send out via PDF as its more universal and probably more tamper proof than a DOC file - HOWEVER, it would be a nice to have in the future, but worth mentioning incase you have any further thoughts or ideas for this?
  5. Hi, I've been looking around the net and various forums and found that the code below does appear to work and do what I need at a basic level, but I was wondering if there was a quick and easy way to improve this code OR another alternative that would give me similar/better results. I effectively have certain word documents that I want to use as templates for part of a project. So if i were to write a letter I could pull from the DB usual name/address, but also other intelligent information that might be dependant on different DB fields so it could generate different options, ie if they had children it would produce a different sentence?? Obviously my ideal solution would be that the php coding wouldnt need to be touched, but would allow for 'coded options' within the document to be added/removed without causing any issues, maybe some kind of generic coding so at least some content can be re-used for multiple documents ? However, I did have two initial thoughts on how to do some of this - maybe? (be gentle im still a learner!) 1, create an array of somekind and use generic terms for a set range, say 'bookmark1','bookmark2', etc so a user could just tag the original word document knowing they only had to add a new number to the end if they needed to add something new ? 2,read the document contents out -DO STUFF TO IT- load it back into a doc/save. with this method I will have to admit ive not done before so would welcome any extra detailed input or advisory suggestions, ie. ensuring it goes back into the correct format, say there was an image/logo or complicated series or bulleted paragraghs or tables ?? I have initially choosen MS word as many people out there are familiar with this product and is widely used. However, if it means I am able to create something easily and better within some other format or package that will give me what I want but also be compatible with word then im more than happy to go with any suggestions (ie templates initially created within openoffice and merely saved into .DOC format?) <?php //1. Instanciate Word $word = new COM("word.application") or die("Unable to instantiate Word"); //2. specify the MS Word template document (with Bookmark TODAYDATE inside) $template_file = "C:/t.doc"; //3. open the template document $word->Documents->Open($template_file); //4. get the current date MM/DD/YYYY $current_date = date("m/d/Y"); //5. get the bookmark and create a new MS Word Range (to enable text substitution) $bookmarkname = "mytester"; $objBookmark = $word->ActiveDocument->Bookmarks($bookmarkname); $range = $objBookmark->Range; //6. now substitute the bookmark with actual value $range->Text = $current_date; //7. save the template as a new document (c:/reminder_new.doc) $new_file = "c:/reminder_new.doc"; $word->Documents[1]->SaveAs($new_file); //8. free the object $word->Quit(); //$word->Release(); $word = null; ?>
  6. i used similar coding to, but to add in some extra content to the word document using bookmarks. However, I commented out one line and it appeared to fix the problem for me - maybe it will work for you? $word->Quit(); //$word->Release(); $word = null; when i checked task manager afterwards I could see that word had exited correctly and ive not fully built a solution around what I intend to use this for so i dont know if there are any implications for doing this - maybe someone else will expand upon this?
  7. Hi, ive recently created a gallery website and im happy with the way everything currently works. However the main drawback is the site uploads using a html webfom which is great for remote users or the odd image. However, as i want to mass upload my existing collection i will need the ability to read a selected folder and then to carry out all the same processes that existed from the existing html form upload. Im also using gdlibrary and checking file types to ensure they are within my allowed list, but im wondering if there are any other common security alerts i should be aware of to keep things a little bit safer if/when i publish outside of my LAN. So in a nut shell i need some assistance with changing my upload process to work for more than one file at a time, ideally by reading a folder, or at least reading X amount of files at a time - processing them then moving onto next batch of files in the list. Then the next part i need help with is checking/improving basic security of the system
  8. having had a chance to think about the solution above i now realise ive missed something so obvious and simple - the ability to group certain tags. would i be right in thinking i need to somehow change my check boxes to arrays ? how hard would it be to do this? im also left wondering if this element of the project is best covered by using php or would it just look to clunky and javascript would make things work/look better ?
  9. many many thanks for this Requinix, i can now see where i was going wrong as i was trying to stick both queries in a while loop to get the values. I had previously assumed and disregarded actioning the one array outside of a loop as it would just keep returning one value and not moving onto the next value in the array - guess i need to revisit arrays in more detail! :D
  10. Hi, im new to the forum and also to php, ive had a look through the tutorials and various threads but cant seem to find what im after. im created a simply image gallery that auto creates my thumbnails and allows for editing the image with gdlibrary etc all very good here. I recently decided to start work on the image keyword tagging so i could carry out searches etc on my very large image collection. i created the usual 3 table setup as im going to have a many to many relationship, so i have my "images" table, "keywords" table and a "img_key" table to link them together. As i understand it this would seem like the best setup for what i want to achieve, if not would someone be able to advise what i should be doing to get better results. Ok so the main problem i have now is that i want to show a series of check boxes underneath each image that gets selected so i can start tagging the uploaded images, to do this i used "select * from keywords" which gave me all keywords available - which is what i want...... However, i now want to somehow add to this so that once the page loads it knows which keywords have already been selected and ticks the relevant boxes automatically, as I have an sql update statement linked to the tickboxes/submit button i want to ensure i dont forget to re-tick any boxes So in a nutshell i need help with displaying all keywords each as a tickbox and if they have already been linked in my 'img_key' link table then they will tick the related tick box automatically , depending on what i need to change im guessing i may need to revise my updating of mysql ? ive been struggling with this silly problem now for a few weeks so im desperate for some assistance :'(
  11. Hi, im new to php and got a simple query. i have built a web gallery and i want to add keywords to pictures, ive built the interface and mysql statements so it lists all possible keywords and creates a tick box for the user to use. ive created a table to join the image id's to my keyword id's as its going to be a many to many relationship, ive also built the sql statement below to select the highlighted image, but im not sure how i can join the looping of all keywords to generate the tick boxes and then to loop again to populate the tickboxes that are saved within the DB - if that makes sense?? SELECT * FROM images,img_key,keywords where img_key.img_id=images.id and keywords.id=img_key.key_id and images.id='2'
  12. hi im new here and could do with a helpful nudge in the right direction. ive managed to create a simple photo album site and have 3 tables (category,images, and img-cat) set up to deal with the tagging of items with in each photo using check boxes. the two things i need help with now are: [*]how can i create sub category's for each category using the 'link' table ? ie group 'people' and maybe have a master check box to check/uncheck all people then another box for 'places/locations' etc etc [*]how do i get the MYSQL db to preselect items that have been entered into the DB with a 'tag' already? thanks in advance for your help!
  13. as im new to php i decided to build my own photo gallery system which will also give me a chance to use many fo the features in php and to help me learn. so far ive managed to to build a basic gallery system where i can upload images to the server, make thumbnails and manipulate the images using gd library. the next phase of the project is to create some kind of category tags, which i have managed to do with a multi select box, where i have created an IMAGE table, CATEGORY table and a CAT_IMG table to deal with multiple tags for multiple images... so when the items are selected in the box it submits the the values and (delete all records with selected image first), loops through each value in the array where i INSERT the ids into the CAT_IMG table. this all works for me, although i could probably improve the process where i delete existing items then re-insert the newly selected ones - would love to get some advice on this if this is poor design however the one thing thats got me confused is trying to use a html multi select box to preselect items that have been previously selected, so if i had 50 category tags the user wouldnt have tio reselect all of those again if they just wanted to add 1 item, would anyone be able to point me in the right direction, im sure i've overlooked something really simple
  14. Hi, im new to php and recently ive noticed that code $timeidverified=date('H:i:s'); i wrote last year isnt working now as i had expected due to british summer time. all im using it for is to check some db fields are updated, but at the moment everything appears to be 1 hour behind. I was wondering if there was a quick and easy way that the server would just know and update the time accordingly, like in windows it just does it without telling/worrying you ?
  15. having helped a friend with his website i also decided to help him with a simple intranet - again no problem there. now the question he then asked was , is it possible to a 'system for me' and by that he went into detail as shown below; 1 - can i create a database of clients 2 - everytime they ask me to do work on them can i create a "file" for them as a client 3 - can each "file" contain a record / history of events 4 - can each item in the record/history relate to time spent & costs 5 - is it possible to link to a typed document - either in MS word, open office, etc, but to effectively pull through content, and by that i mean having a document and extracting/populating the database information of a client details (such as address) and for each "file" i can call the same document and it will pull through the relevant information stored for that person. there were a few other points mentioned but i was under the impression points 1-4 are fairly straight forward to implement, it is point 5 that i am having most of my problems with. this is mainly as im still a php newbie and havent noticed any modules or any kind linking to documents before, i have also taken the assumption that php may not also be the best language to achive what i want to, but if that is the case im sure someone will be able to advise me otherwise? i eagerly await replies thanks, R.
×
×
  • 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.