Jump to content

provisioning module generate text file


el_makong

Recommended Posts

If you need to restrict access to these files, you have to save it outside of the website public directory just how you did with WHMCS writable folders (downloads, templates_c, etc).

 

Save filename with the related clientID in database (create new table for that).

 

make new function inside your module or new page in client area, this page will be responsible for the client validation and download, so when your client click on the download link inside "Product Details" page, Email message etc the URL will be that page, it will check if the current client own the right to access/download this TXT file.

 

is that clear enough? :)

Link to comment
Share on other sites

yeah.thats clear and solving my 2nd question.so i just need to create client validation for the download function in my module.

what if the admin need to download it from admin area?same function?or the validation user & admin?

 

still unanswered, how do i create text file with a template. or maybe from module configuration(where the admin can customize it)

Link to comment
Share on other sites

yeah.thats clear and solving my 2nd question.so i just need to create client validation for the download function in my module.

what if the admin need to download it from admin area?same function?or the validation user & admin?

for the admin side, you can only check if admin is logged in then download any file requested by this admin.

 

still unanswered, how do i create text file with a template. or maybe from module configuration(where the admin can customize it)

using fopen function you can read the content from template file, maybe apply some changes to it, and create new file.

Link to comment
Share on other sites

for the admin side, you can only check if admin is logged in then download any file requested by this admin.

by using $_session?

using fopen function you can read the content from template file, maybe apply some changes to it, and create new file.

 

using preg_replace?or can i use smarty?so the template is stored as .tpl file

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated