Announcement

Collapse
No announcement yet.

Inserting php code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inserting php code

    I`ve purchased an automembership signup with Paypal/login software package.
    It asks me to add the below code at the very top of the page "before the html part"
    Then I have to add the html code and postion the login box where I want on the page. The last bit should be OK as I will use the inser html function in BV

    But how do I insert this code?

    <?php $LgnUniv=1; ?><?php $WebKey='Nr92NU53hvgio165'; ?><?php $FormView=1; ?><?php $Sentry_ID

    Thanks

  • #2
    Re: Inserting php code

    I would assume it means add this part to the pages html area under the "Between the head tag"
    I might be wrong? But it looks like it is incomplete & needs a closing tag ">"
    Regards Chris.

    Collectables, Collecting, collectors-info.com

    www.chrismorris.co.uk

    House build project

    Comment


    • #3
      Re: Inserting php code

      Chris
      Here is the full code & instructions (my copy/paste error)

      STEP 1
      PHP Login Form Topcode: Working with the original page, Copy and then Paste the following snippet at the extreme top of the login page, above the <html> tag and any other tags. Be sure to select the entire contents of this code window. Keep it all in one line when you paste it. It is VERY IMPORTANT that there be no spaces, characters, lines, empty lines, or anything else before the topcode. Also, if you have more than one subscription definition, do not place more than one login form on a page or conflicts will occur. Place each login form on a separate page.

      <?php $LgnUniv=1; ?><?php $WebKey='Nr92NU53hvgio165'; ?><?php $FormView=1; ?><?php $Sentry_ID=5428; ?><?php $Frm='FRM_5428_XIKy6syy26ojl'; ?><?php include('Sentry_keyfile.php'); ?>


      STEP 2

      Copy the snippet in the code window below and Paste where you want the login form to appear on that same page. While you can modify the look and feel of the form to suit you, be careful not to change any of the scripting code or the form may not work. Important Note: Don't test it yet! After you paste the login form, you MUST complete all the way through Step 6 below before testing your form.

      PHP Login Form Code Window:

      <!-- BEGIN SENTRY PHP UNIVERSAL LOGIN FORM - version 2.75 (Build E)
      Password Protection Code Copyright © Sentrylogin.com, Shawn, Co. http://www.sentrylogin.com-->
      <script language="JavaScript" type="text/JavaScript">
      function SentryTrim(s){
      // Remove leading spaces
      while (s.substring(0,1) == ' '){
      s = s.substring(1,s.length);
      }
      // Remove trailing spaces
      while (s.substring(s.length-1,s.length) == ' '){
      s = s.substring(0,s.length-1);
      }
      return s;
      }
      function SentryValidate(){
      var un=document.Sentry_ext_module.Sentry_USERNAME.valu e;
      un=SentryTrim(un);
      var pw=document.Sentry_ext_module.Sentry_PASSWORD.valu e;
      pw=SentryTrim(pw);
      if((un == "") || (pw == "")){
      // one or more field left blank
      document.Sentry_ext_module.Sentry_submit.disabled= false;
      alert('E-mail and Password are both required.');
      return false;
      }
      else{
      return true;
      }
      }
      </script>
      <table width="150" border="0" cellspacing="0" cellpadding="0" id="EXTERNAL">
      <tr><td><fieldset>
      <?php
      if($loggedIn == true){
      if(isset($_COOKIE['Sentry_firstName'])){
      $Sentry_firstName = $_COOKIE['Sentry_firstName'];
      $Sentry_firstName = base64_decode($Sentry_firstName);
      $Sentry_firstName = strrev($Sentry_firstName);
      ?>
      <div>
      <font size="2" face="Arial, Helvetica, sans-serif"><strong>
      <font color="#40BE1B">Welcome, <?php echo $Sentry_firstName;?>!</font>
      </strong></font>
      </div>
      <div>
      <font size="1" face="Arial, Helvetica, sans-serif" color="#999999">You are logged in. </font>
      </div>
      <p></p>
      <?php
      }
      }else{
      ?>
      <legend>
      <font size="2" face="Arial, Helvetica, sans-serif" color="#ACA899">Member Login&nbsp;</font></legend>
      <?php
      }
      ?>
      <table border="0" cellspacing="0" cellpadding="1" id="INNERMOST">
      <form name="Sentry_ext_module" method="post" action="http://www.sentrylogin.com/sentry/noSockets/loginAction.asp?Sentry_ID=5428&univ=1" onSubmit="return SentryValidate();">
      <?php
      if($loggedIn != true){
      ?>
      <tr><td><font size="1" face="Arial" <?php echo $color; ?>>E-Mail Address:&nbsp;&nbsp;<a href="http://www.sentrylogin.com"><img src="http://www.sentrylogin.com/sentry/images/logo.gif" alt="Sentry Password Protection Membership Script" width="4" height="2" border="0"></a></font>
      </td></tr>
      <tr><td>
      <input type="text" name="Sentry_USERNAME" size="21"></td></tr>
      <tr> <td>
      <font face="Arial" size="1" <?php echo $color; ?>>Password:</font></td></tr>
      <tr><td>
      <input type="password" name="Sentry_PASSWORD" size="21"></td></tr>
      <tr><td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td>
      <div style="margin-top:4px; margin-bottom:4px;"><input type="submit" name="Sentry_submit" value="Log In"></div></td>
      <td width="99">
      </td></tr></table></td></tr>
      <?php
      }
      ?>
      <input name="ip" type="hidden" value="<?php
      echo $ip; ?>">
      <input name="PrevURL" type="hidden" value="<?php
      echo $PreviousURL; ?>">
      <input name="NtvQueryStr" type="hidden" value="<?php
      echo $NtvQueryStr; ?>">
      <input name="URLnoQueryStr" type="hidden" value="<?php
      echo $URLnoQueryStr; ?>">
      <input name="base_domain" type="hidden" value="<?php
      echo $base_domain; ?>">
      <input name="Frm" type="hidden" value="<?php echo
      $Frm; ?>">
      <tr><td>
      <?php
      if($loggedIn != true){
      ?>
      <div>
      <a href="http://www.sentrylogin.com/sentry/sentry_remind_pw.asp?Sentry_ID=5428" title="Password Reminder" style="text-decoration:none;">
      <font size="1" face="Arial, Helvetica, sans-serif" color="#999999">Forgot Password </font></a>
      </div>
      <?php
      }
      ?>
      <div>
      <a href="http://www.sentrylogin.com/sentry/member_myAccount.asp?Site_ID=5428&univ=1" title="Lets you alter your credentials & make changes to your membership" style="text-decoration:none;">
      <font size="1" face="Arial, Helvetica, sans-serif" color="#999999">My Profile </font></a>
      </div>
      <div>
      <?php
      if($loggedIn == true){
      ?>
      <script language="JavaScript" type="text/JavaScript">
      var slogOutURL = encodeURI(document.Sentry_ext_module.PrevURL.value );
      var slogOutStr = '';
      w = slogOutURL.indexOf('?');
      if(w != -1){
      slogOutStr = (document.Sentry_ext_module.PrevURL.value);
      document.write('<a href="' + slogOutStr + '&logOut=1&logOutURL=' + slogOutURL + '" title="Logs you out of this site" style="text-decoration:none;">');
      }
      else{
      slogOutStr = (document.Sentry_ext_module.PrevURL.value);
      document.write('<a href="' + slogOutStr + '?logOut=1&logOutURL=' + slogOutURL + '" title="Logs you out of this site" style="text-decoration:none;">');
      }
      </script>
      <font size="1" face="Arial, Helvetica, sans-serif" color="#999999">Log Out </font></a>
      <?php
      }else{
      ?>
      <a href="http://www.sentrylogin.com/sentry/member_signup.asp?Site_ID=5428" title="Sign up now" style="text-decoration:none;">
      <font size="1" face="Arial, Helvetica, sans-serif" color="#999999">Sign Up </font></a>
      <?php
      }
      ?>
      </div>
      </td></tr>
      </form>
      </table>
      </fieldset>
      </td>
      </tr>
      </table>
      <script language="JavaScript" type="text/JavaScript">
      if(document.Sentry_ext_module.Sentry_USERNAME){
      document.Sentry_ext_module.Sentry_USERNAME.focus() ;
      }
      </script>
      <!--END SENTRY PHP UNIVERSAL LOGIN FORM -->

      I have deleted all other BV login forms on the site

      Cheers

      Comment

      Working...
      X