Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007
    Posts
    6
    Plugin Contributions
    0

    Default Ignore Java Script during secure session

    I am sorry if I missed this somewhere, but I searched and cannot find the answer to my question. I am using a Java Script in my languages/mytemplate/english.php file that makes a call to another one of my websites as a non secure session for real time display of the user on the page.

    I have it in english.php like this:

    define('FOOTER_TEXT_BODY', 'Copyright &copy; ' . date('Y') . ' <a href="http://www.mywebsite.com" target="_blank">D.F.C.O.A. Inc</a><script language="JavaScript1.3" type="text/javascript"
    src="http://www.myotherwebsite.com/wmserver/tag.php?action=get_code"
    ></script>');

    It works fine in both secure and non secure modes, however, it does cause the secure warning to pop up during secure sessions. I'd like to not use it at all when in a secure session, something like the thread at:

    http://www.zen-cart.com/forum/showthread.php?t=53809 (PHP to Sniff Secure Session)

    I messed with it a bit based on the info in the above thread, but couldn't come to anything that worked. Can someone steer me the right way on how to do this?

    Thanks
    Dave

  2. #2
    Join Date
    Aug 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: Ignore Java Script during secure session

    I guess I was looking too hard to see the short answer for the exception, as soon as entered the thread, it jumped at me and I got something going:

    if ($request_type == 'NONSSL') {
    define('FOOTER_TEXT_BODY', 'Copyright &copy; ' . date('Y') . ' <a href="http://www.mywebsite.com" target="_blank">D.F.C.O.A. Inc</a><script language="JavaScript1.3" type="text/javascript"
    src="http://www.myotherwebsite.com/wmserver/tag.php?action=get_code"
    ></script>');
    } else {
    define('FOOTER_TEXT_BODY', 'Copyright &copy; ' . date('Y') . ' <a href="http://www.mywebsite.com" target="_blank">D.F.C.O.A. Inc</a>');
    }

    Dave

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Ignore Java Script during secure session

    Thanks for taking the time to post back the solution.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

 

 

Similar Threads

  1. Java Script problem..
    By fatum112 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 May 2006, 06:21 AM

Posting Permissions

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