This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

View Entries without logging in


  1. raj000
    Member

    I want to allow users to view entries of forms without giving out the admin user name and password.

    We use the form to share sales information between 2 branches, so i want to allow the remote branch to see entries of a specific form.

    Posted 15 years ago #
  2. redityo

    Hi,

    To do so you should edit "view-entry.php" and "manage_entries.php", search for this code :

    require('includes/check-session.php');

    and add comment on it

    //require('includes/check-session.php');

    but you still should mention the form id to access the data, for example you want to access form 4 data then the URL will be like this :

    http://www.yourdomain.com/machform/manage_entries.php?id=4


    MachForm Support

    Posted 15 years ago #
  3. raj000
    Member

    Thanks for the response.

    Lets say i only want the user to be able to view the entries and print them etc. , but not be able to modify them. I am assuming that only modifying view-entry.php should be good enough.. right?

    Posted 15 years ago #
  4. Anonymous
    Unregistered

    Can be done this also to access upload file (download it without login)?

    Posted 15 years ago #
  5. yuniar

    raj000 -- yes, that would allow them to view specific entry only.

    alfonso -- yes, remove it from download.php file.


    MachForm Founder

    Posted 15 years ago #
  6. raj000
    Member

    ok. i ran some tests after making changes to both files and here is what i found -:

    1. When i view a specific entry and click on "Edit" , it does not allow editing of the transaction.... works great and exactly what i want...users can view all or specific transactions without being able to edit them.

    2.) however, when i click on the delete button, the transaction gets deleted, without the user being logged in. This is a problem. Can I include the session statement somewhere to make sure that only logged in users can delete transactions, even though they are viewing a specific transaction.

    Posted 15 years ago #
  7. redityo

    I see, you need to edit "view_entry.php" and "manage_entries.php" then, try to following this steps :

    1. In "manage_entries.php", around line 25 and 40 you will see this code :

    if(!empty($_POST['submit_del_selected'])){

    and

    }elseif (!empty($_POST['submit_del_all'])){

    replace those code with

    if(!empty($_POST['submit_del_selected']) && !empty($_SESSION['logged_in'])){

    and

    }elseif (!empty($_POST['submit_del_all']) && !empty($_SESSION['logged_in'])){

    2. In "view_entry.php" on line 20 you will see this code

    if(!empty($_GET['delete'])){

    replace with

    if(!empty($_GET['delete']) && !empty($_SESSION['logged_in']) ){

    MachForm Support

    Posted 15 years ago #
  8. raj000
    Member

    worked like a charm! thanks

    Posted 15 years ago #
  9. derrickonline
    Member

    Ok, I was able to get this to work. But here's the issue. How can I make the email show the correct link like...

    http://www.WEBSITE.com/machform/view_entry.php?form_id=1&id=2

    Because although I can access the URL directly without logging in that way. The generated email uses something like...

    http://www.WEBSITE.om/machform/download.php?q=Zm9ybV9pZD0xJmlkPTImZWw9ZWxlbWVudF8z

    Posted 15 years ago #
  10. redityo

    Those 2 link's have different purpose :

    - http://www.WEBSITE.com/machform/view_entry.php?form_id=1&id=2

    To view your entries

    - http://www.WEBSITE.om/machform/download.php?q=Zm9ybV9pZD0xJmlkPTImZWw9ZWxlbWVudF8z

    To get uploaded file

    Do you mean, you want to send "view entry" url along with mail notification ? If so you can edit "email content" from email menu. In there you will see this :

    {entry_data}

    Change to be something like this

    {entry_data}
    
    To view your entry, click this url :
    
    http://www.website.com/machform/view_entry.php?form_id={form_id}&id={entry_no}

    MachForm Support

    Posted 15 years ago #
  11. derrickonline
    Member

    I follow you, that works great but is there a way to replace the actual link in my email that says FILE UPLOAD/DOWNLOAD LINK with VIEW ENTRY LINK instead?

    Posted 15 years ago #
  12. derrickonline
    Member

    DISREGARD:

    I see that I can select the appropriate fields to show instead of entire entry, that way I can remove the FILE UPLOAD portion. Thank you.

    Posted 15 years ago #
  13. usvi4me
    Member

    How can I hide the log out button from those people that are not logged in ?

    Posted 14 years ago #
  14. redityo

    Hi,

    Try to edit "header.php" and go to line 30 for this code

    <li class="lgo"><a href="logout.php" class="lbOn" title="Logout!"><img src="images/logout.gif" alt=""></a></li>

    then change it to

    <?php if (!empty($_SESSION['logged_in'])) { ?><li class="lgo"><a href="logout.php" class="lbOn" title="Logout!"><img src="images/logout.gif" alt=""></a></li><?php } ?>

    MachForm Support

    Posted 14 years ago #
  15. usvi4me
    Member

    redityo - Thank you - exactly what I wanted.

    Posted 14 years ago #

RSS feed for this topic

Reply