freshJet Posted June 14, 2011 Report Posted June 14, 2011 ---This might be better as a module--- I have been working all night on a code that will do the following: - Display the pilot's name and ID - Ask the pilot for a start date - Ask the pilot for an end date - Ask for a reason - Send an email with the details to my address upon clicking submit Also, I was wondering id fit could be added in the Admin panel to display who is on leave and how long it is until they return, as well as displaying the same info on the pilot's profile. May be a bit complex I know... So: Quote Letter of Absence Page --Terms and conditions of leave go here-- Pilot: FRX0123 John Smith (determined by php echo because they are logged in) Absence Begins: DD/MM/YYYY Absence Ends: DD/MM/YYY [submit] Admin Panel The following people are on leave: FRX0123 John Doe | Returns in 6 days (20/06/2011) Email Subject: LOA Filed Pilot: FRX0123 John Smith Absence Begins: 10/06/2011 Absence Ends: 20/06/2011 Absence Length: 10 day(s) 1 Quote
freshJet Posted June 14, 2011 Author Report Posted June 14, 2011 I've given up. Any help would be grateful. I tried making a standard contact form, but the phpVMS Admin Panel Page Editor (PAPPE lol) does not support the php echos. Quote
Moderators Kyle Posted June 15, 2011 Moderators Report Posted June 15, 2011 First of all, let me give you a clear idea..... You would need to create a Module, with all the functions, then you would need to create a Data.Class to do the SQL functions work, and then as always, template files. Quote
stuartpb Posted June 15, 2011 Report Posted June 15, 2011 On 6/14/2011 at 8:54 PM, itrobb said: I've given up. Any help would be grateful. I tried making a standard contact form, but the phpVMS Admin Panel Page Editor (PAPPE lol) does not support the php echos. Go to core/pages/ and then find the page you were editing through the phpVMS page editor. Use a WYSIWYG editor, or even notepad to edit the page. Then upload to the server. That way you can use php in the page, and the html editor in the phpVMS page editor won't strip it out. EDIT: Just remember though, if you do this, that if you view the page in phpvms admin editor, it will strip out the php as soon as you do, so you need to remember when it comes to editing the page, to edit the page using another editor like notepad or dreamweaver or whatever editor you're using. Quote
stuartpb Posted June 15, 2011 Report Posted June 15, 2011 On 6/15/2011 at 3:16 PM, itrobb said: Yeah stuart I tried that... And did it work? Quote
Tom Posted June 15, 2011 Report Posted June 15, 2011 On 6/15/2011 at 11:44 AM, Vansers said: First of all, let me give you a clear idea..... You would need to create a Module, with all the functions, then you would need to create a Data.Class to do the SQL functions work, and then as always, template files. This. You can't create this functionality using standard phpVMS pages (which it sounds like you're trying/is being suggested). You need: - Module in core/modules (the form) basically needs two functions, one for displaying the form and one for submitting. - Module in admin/modules (this is the admin page you talk about) just needs the one function - Templates for each of the above modules in their respective locations - Class in core/common to handle database functions - Table in the database to store: loaid (A/I: for unique records), pilotid, startdate, enddate, reason (Number of days can be calculated from those providing you can convert how you've stored the dates etc) Quote
shaun105 Posted June 16, 2011 Report Posted June 16, 2011 Hi Iain, good idea, I have found an easier way of doing this, it took 10 minutes.I set this up at http://www.jotform.com/ I set up a new page then once I finished the design placed the source code in. Saves a lot of hassle. It will also send email to your address. 2 Quote
stuartpb Posted June 17, 2011 Report Posted June 17, 2011 On 6/15/2011 at 5:33 PM, Tom said: This. You can't create this functionality using standard phpVMS pages (which it sounds like you're trying/is being suggested). You need: - Module in core/modules (the form) basically needs two functions, one for displaying the form and one for submitting. - Module in admin/modules (this is the admin page you talk about) just needs the one function - Templates for each of the above modules in their respective locations - Class in core/common to handle database functions - Table in the database to store: loaid (A/I: for unique records), pilotid, startdate, enddate, reason (Number of days can be calculated from those providing you can convert how you've stored the dates etc) That's massive overkill for what the op essentially described was a html form, that would be emailed to him on completion. You can insert your own html form into the phpvms generated pages as I mentioned in my last post, and use then js and/or php validation/handling much easier that creating a whole new series of files for a new module. Quote
freshJet Posted June 17, 2011 Author Report Posted June 17, 2011 Thanks Shaun, that looks great! Quote
Tom Posted June 17, 2011 Report Posted June 17, 2011 On 6/17/2011 at 3:09 PM, stuartpb said: That's massive overkill for what the op essentially described was a html form, that would be emailed to him on completion. You can insert your own html form into the phpvms generated pages as I mentioned in my last post, and use then js and/or php validation/handling much easier that creating a whole new series of files for a new module. Sure, but jotform etc just send you an email. There's no link to a logged in user, there's no integration with phpVMS and there's nothing in the admin panel - it's a below satisfactory solution IMO. It looks like there's a lot to do but it's only a 20 minute job really... Quote
shaun105 Posted June 18, 2011 Report Posted June 18, 2011 I agree Tom however people have different levels of knowledge, what you may find easy others may find difficult. I am no expert when it comes to coding ect... Ideally a module that is intergrated with VMS would be ideal. Once admin select an option to recognise leave of absence it auto changes the pilots status and displays it in the admin. So until something like that has been written I will make do with what I have got and be gratful to the guys that have made all the other modules I use at the moment....Well done guys and thanks. 1 Quote
James142 Posted June 19, 2011 Report Posted June 19, 2011 I have made a basic module of this which shows the information in admin panel etc.. When I sort out one or two problems I have with it, I can share it. James 1 Quote
Moderators Kyle Posted June 19, 2011 Moderators Report Posted June 19, 2011 Cool James! I'll give it a test for you whenever it's done. Quote
James142 Posted June 19, 2011 Report Posted June 19, 2011 Sorry if this is taking a while, This is the first time I have attempted something like this. Quote
James142 Posted June 21, 2011 Report Posted June 21, 2011 Unfortunately I will be unable to finish this project. I have managed to make the form and make it send the information to the MySQL database. But I am unable to make the MySQL database to delete the row after the absence dates has passed and make the information show in the admin panel and some other stuff. Hopefully someone else who has a much greater knowledge of php and MySQL might have a go at making this module as it is too complicated for me. I would love to have being able to have completed this but it was just too complicated, sorry guys Regards, James This is what I got completely done: Module in core/modules: one for displaying the form and one for submitting. Table in the database to store: loaid (A/I: for unique records), pilotid, startdate, enddate, reason .tpl files for the form and error messages (I think it would be really good if someone could take the time out to make a file showing how to make modules for phpvms as the original documentation for making a module on the document page is too basic) Quote
James142 Posted June 21, 2011 Report Posted June 21, 2011 ACTUALLY, I might have cracked it! Give me 2 days Quote
TAV1702 Posted June 21, 2011 Report Posted June 21, 2011 Sometimes all it takes is a break for a day or three so wonderful things can happen when you get back. Kind of like working on a car. Ever have trouble starting a bolt for 20 minutes then take a break and come back 30 minutes later and the bolt goes right in? Quote
James142 Posted June 21, 2011 Report Posted June 21, 2011 On 6/21/2011 at 8:44 PM, TAV1702 said: Sometimes all it takes is a break for a day or three so wonderful things can happen when you get back. Kind of like working on a car. Ever have trouble starting a bolt for 20 minutes then take a break and come back 30 minutes later and the bolt goes right in? Thats 100% true Quote
Ahmad Posted June 24, 2011 Report Posted June 24, 2011 @James 142 have you got any success BRO............ Awaiting you on this Regards Ahamd 1 Quote
James142 Posted June 24, 2011 Report Posted June 24, 2011 On 6/24/2011 at 3:12 PM, Ahmad said: @James 142 have you got any success BRO............ Awaiting you on this Regards Ahamd I have got most of it finished. I am sorry that it is taking a while, but I am working as fast as I can with it. 1 Quote
Ahmad Posted July 21, 2011 Report Posted July 21, 2011 hey this not fair i was asking for an update from you james which was pending now from long ago and you are marking my comments negative or mr bird is doing it who so ever is it please stop doing that and if someone has water in him reply with the reason who is doing it...... 2 Quote
fsxsimulation Posted July 21, 2011 Report Posted July 21, 2011 exactly! give a reason for marking negetive to our comments . What is the problem. WE are just asking for any update and u are constantly marking them negative what is ur problem? :angry: 2 Quote
stuartpb Posted July 21, 2011 Report Posted July 21, 2011 Maybe it's because you have both been impatient before when asking stuff, and other people don't like it? Just a guess though. I'm sure James will update here if he does have any news, and I'm also sure he has a lot of other stuff on his plate at the moment, like real world stuff and managing his VA. And to make you guys feel better, I've given you both a thumbs up EDIT: Also, instead of relying on others, why not have a go at learning some basic php and try and see if you can get anywhere with this yourselves? I'm not saying that to be arrogant or funny, but you could do it if you put some effort in, and you would probably find more people willing to help if you got stuck too. I didn't have a clue the first time I downloaded and installed phpVMS, but I'm slowly getting to grips with it, and it's great being able to figure stuff out myself. 2 Quote
James142 Posted July 21, 2011 Report Posted July 21, 2011 I have being busy lately and I had not found the time to give it another shot. Sorry it is taking so long Quote
Cor Posted July 21, 2011 Report Posted July 21, 2011 James, No need to say sorry. It is ready when it is ready. Some people don´t have any patience. Real life comes always first. Regards, Cor 1 Quote
Ahmad Posted July 23, 2011 Report Posted July 23, 2011 i am not impatience my dear forum members i was just replying to the post and making it alive thought maybe james forgot to clear this up and i don't know why Mr Bird is replying after my reply always maybe many people are thinking i have some connection with him so let me clear this here NO Mr Bird or Waleed has asked me for partnership with his VA which first i accepted but after that i rejected when i saw his reputation in the forums i am very sincere member of this forum so it was bit odd for just asking an update regarding announced Module getting Negative Marks maybe someone is doing it intentionally otherwise i don't think so we cannot ask for an update well never mind i wont ask it again thanks. Stuart Thanks for your suggestions mate i have tried this many times and failed no one is brilliant like you who learned Phpvms in such a short time. Regards Ahmad Al Shiekh Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.