Results 1 to 6 of 6

Thread: My PHP pages are blocked

  1. #1
    vincentd401 is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    36

    Default My PHP pages are blocked

    Hi,
    I have added a dashboard that is actually a table with informations from the staff. I add a link that should open a PHP file that display the data in the dashboard but in a different way. The Php pages is never diplayed. When I click on the link a new page is openned but it is the main page, in the sugar home module.
    Maybe sugar doesn't allows me to use my own php files and redirect them to the index????????????

  2. #2
    default is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    102

    Default Re: My PHP pages are blocked

    theres is something that we called entry point..

    when calling a php file. you can include it or you can call it using this..

    sugar/index.php?module=yourmodule&action=theaction

    the action can be.. detailview listview editview. or in you case the file that you have created..

    you will need to asses where module you will put that action...

    or you can make your own module.. thats it...
    ________
    Vaporizer benefits
    Last edited by default; 2011-03-17 at 04:48 PM.

  3. #3
    vincentd401 is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    36

    Default Re: My PHP pages are blocked

    Ok thank you very much. The page is not redirected anymore. However I can't use parameters to my php file.
    Is it the right way to give parameters to my php? :
    sugarcrm/index.php?module=Charts&action=printreport.php?dis t_date_start=2004-07-19&dist_date_end=2007-07-25&dist_user_ids=sally_id
    The page display: Bad data passed in; Return to Home
    Thank you

  4. #4
    default is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    102

    Default Re: My PHP pages are blocked

    you dont need to put the .php... and the parameters you can just


    sugarcrm/index.php?module=Charts&action=printreport&dist_da te_start=2004-07-19&dist_date_end=2007-07-25&dist_user_ids=sally_id


    i think you can understand that... you dont need to put another question mark..

    this is the analogy it is like including your file to index.php of sugar.. then you can still access those parameter using the $_POST or $_GET or $_REQUEST...


    its like that.. its okei.. its a pleasure...
    Last edited by default; 2011-03-17 at 04:48 PM.

  5. #5
    vincentd401 is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    36

    Default Re: My PHP pages are blocked

    I did how you told me but I have a blank page. Even with a simple php file that only contain php_info(); it is the same.
    here is my code:
    <a onClick="window.open('index.php?module=Charts&acti on=print2','distanceReport','width=800,height=1024 ,resizable=no,scrollbars=yes');" href="javascript:void(0);" >

    I think it is correct.

    Do I have to write some code in the index.php as well?

    Somebody in my company already do this kind of thing for an older version of Sugar. He didn't use the index.php, his code was:

    <a onClick="window.open('./modules/Charts/code/printreport.php?dist_date_start=<?php echo $date_start;?>&dist_date_end=<?php echo $date_end;?>&dist_user_ids=<?php echo $reportuseridlist;?>','distanceReport','width=800, height=1024,resizable=no,scrollbars=yes');" href="javascript:void(0);" >

    And this is working. Is it due to the different version of Sugar or there is a way to allows me to use my php page without passing through the index?

  6. #6
    default is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    102

    Default Re: My PHP pages are blocked

    so it is a popup .. you dont need to do it like that.. just put the nameof your page.. and use the proper .. hirarchy
    ________
    Vermont dispensary
    Last edited by default; 2011-03-17 at 04:49 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Semi Empty Pages
    By joelstad in forum Installation and Upgrade Help
    Replies: 7
    Last Post: 2006-12-12, 03:29 PM
  2. PHP Warnings after install add-in Module
    By kgeving in forum Help
    Replies: 1
    Last Post: 2006-08-08, 05:54 PM
  3. Errors after upgrade
    By mturany in forum Help
    Replies: 0
    Last Post: 2006-04-24, 04:40 AM
  4. ERROR in 4.01
    By rateck in forum Help
    Replies: 3
    Last Post: 2006-02-02, 10:00 PM
  5. Replies: 7
    Last Post: 2005-05-10, 08:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •