I Love PHPMaker

... because it gets even more powerful and flexible!!

  • About
  • Terms and Conditions
  • Membership Options
  • Sitemap
  • Downloads
    • PHPMaker Extensions Download
    • PHPMaker Projects Download
    • PHP Report Maker Extensions Download
I Love PHPMaker » Customize Template » How to Beautify Your “Registration” Page and Add “Terms and Conditions” Page on It Using PHPMaker 8.0.1
How to Customize Header and Footer for the Website Created with PHPMaker 8.0.1
How to Beautify Your “Forgot Password” Page Created With PHPMaker 8.0.1

April 16, 2011

How to Beautify Your “Registration” Page and Add “Terms and Conditions” Page on It Using PHPMaker 8.0.1

This following modification will change the look of your "Registration" page just like the modifications I have ever been made ​​to beautify the Login and Forgot Password page, and also add the ability to display the "Terms and Conditions" page before the "Registration" page itself. The "Terms and Conditions" page can be displayed or not by simply setting a constant value in the configuration file that generated by PHPMaker. If the page is displayed, then that page will appear precede the page where the user register his/her account data. Conversely, if not displayed, then the page "Terms and Conditions" does not appear, but user will directly see the "Registration" page. In addition, you can now decide whether to display the captcha on registration page or not, simply by setting up the related constant in your configuration file.

Updated: This modification has been tested and works fine also for the latest version, PHPMaker 8.0.3 on August 27, 2011.

All we have to do is customizing PHPMaker template files. In other words, we will not modify the generated script files at all.

Please click on the following image to watch the demo:

Terms and Conditions on Registration Page
Terms and Conditions on Registration Page

[hidepost]

  1. Make sure you have already downloaded the box-images file, and already extracted all files inside that zip file into your Script\images\ sub-directory.
  2. Open your \extensions\CAPTCHA\captcha-script.php file, and find this code:

    		// CAPTCHA checking
    		if ($<!--##=gsTblVar##-->->CurrentAction <> "I" && $<!--##=gsTblVar##-->->CurrentAction <> "C") {
    			$objForm->Index = 0;
    			$this->captcha = $objForm->GetValue("captcha");
    			if ($this->captcha <> @$_SESSION["EW_CAPTCHA_CODE"]) { // CAPTCHA unmatched
    				$this->setFailureMessage($Language->Phrase("EnterValidateCode"));
    				$<!--##=gsTblVar##-->->CurrentAction = "I"; // Reset action, do not insert
    				$<!--##=sTblVar##-->->EventCancelled = TRUE; // Event cancelled
    				$this->RestoreFormValues(); // Restore form values
    			} else {
    				if ($<!--##=gsTblVar##-->->CurrentAction == "A")
    					$_SESSION["EW_CAPTCHA_CODE"] = ew_Random();
    			}
    		}
    

    then replace it with this following code:

    	// CAPTCHA checking
        if ($<!--##=gsTblVar##-->->CurrentAction <> "I" && $<!--##=gsTblVar##-->->CurrentAction <> "C") {
    		if (  (($<!--##=gsTblVar##-->->CurrentAction == "F") || ($<!--##=gsTblVar##-->->CurrentAction == "I") || ($<!--##=gsTblVar##-->->CurrentAction == "A") || ($<!--##=gsTblVar##-->->CurrentAction == "X")) && (EW_SHOW_CAPTCHA_ON_REGISTRATION_PAGE == TRUE) ) { 
    
    			$objForm->Index = 0;
    			$this->captcha = $objForm->GetValue("captcha");
    			if ($this->captcha <> @$_SESSION["EW_CAPTCHA_CODE"]) { // CAPTCHA unmatched
    				$this->setFailureMessage($Language->Phrase("EnterValidateCode"));
    				$<!--##=gsTblVar##-->->CurrentAction = "I"; // Reset action, do not insert
    				$<!--##=sTblVar##-->->EventCancelled = TRUE; // Event cancelled
    				$this->RestoreFormValues(); // Restore form values
    			} else {
    				if ($<!--##=gsTblVar##-->->CurrentAction == "A")
    					$_SESSION["EW_CAPTCHA_CODE"] = ew_Random();
    			}
    		}
    	}
    
  3. Still in the \extensions\CAPTCHA\captcha-script.php file, and find this code:

    <!-- captcha html (begin) -->
    <table>
    	<tr>
    		<td>
    

    then replace it with this following code:

    <!-- captcha html (begin) -->
    					 <tr>
                <td >&nbsp;</td>
                <td >&nbsp;</td>
               <tr/>
    
    	<tr>
    		<td colspan="2" align="center">
    
  4. Still in the \extensions\CAPTCHA\captcha-script.php file, find again this code:

    	</tr>
    </table>
    

    then replace it with this following code:

    	</tr>
    
    
  5. Open your add-script.php file, and find this code:

    <!--##include detail-script.php/detailgrid##-->
    
    <!--##include captcha-script.php/phpcaptcha_htm##-->
    

    then replace it with this following code:

    <!--##include detail-script.php/detailgrid##-->
    
    <!--## 	If bUseCaptcha Then ##-->
    <table>
    <!--##include captcha-script.php/phpcaptcha_htm##-->
    </table>
    <!--## 	End If ##-->
    
  6. Open your edit-script.php file, and find this code:

    <!--##include detail-script.php/detailgrid##-->
    
    <!--##include captcha-script.php/phpcaptcha_htm##-->
    

    then replace it with this following code:

    <!--##include detail-script.php/detailgrid##-->
    
    <!--## 	If bUseCaptcha Then ##-->
    <table>
    <!--##include captcha-script.php/phpcaptcha_htm##-->
    </table>
    <!--## 	End If ##-->
    
  7. Open your C:\Program Files\PHPMaker 8\languages\english.xml, and find this code:

    </global>
    

    before that line, insert this following code:

    	<phrase id="TaCTitle" value="Terms and Conditions"/>
    	<phrase id="TaCContent" value="Here is the content of Terms and Condition. Each row must be separated by BR tag."/>
    	<phrase id="IAgree" value="I Agree"/>
    

    Do the same way to your .xml language (for example, I am also using Indonesian, then I add the same code to my indonesian.xml file:

    	<phrase id="TaCTitle" value="Syarat dan Ketentuan"/>
    	<phrase id="TaCContent" value="Di sini isi dari Syarat dan Ketentuan. Setiap baris harus dipisahkan dengan tag BR."/>
    	<phrase id="IAgree" value="Saya Setuju"/>
    
  8. Open your \Script\ewcfg.php file, and find this code:

    // General
    

    before that line, insert this following code:

    // Begin of modification by Masino Sinaga, April 14, 2011
    // Show Captcha and TOC on registration page
    define("EW_SHOW_CAPTCHA_ON_REGISTRATION_PAGE", TRUE, TRUE); // TRUE = Show Captcha on registration page; FALSE = Don't show it
    define("EW_SHOW_TOC_ON_REGISTRATION_PAGE", TRUE, TRUE); // TRUE = Show TOC on registration page; FALSE = Dont' show it
    // End of modification by Masino Sinaga, April 14, 2011
    
    
  9. Open your \Script\register.php file, and replace the content of that file with this following code (it is strongly recommended that you backup first this register.php file before doing this step):

    <!--##session currenttable##-->
    <!--##
        ' Set security table current
        If PROJ.SecTbl <> "" Then
            Set TABLE = DB.Tables(PROJ.SecTbl)
            gsTblVar = TABLE.TblVar
        End If
        If GetFldObj(PROJ.SecLoginIDFld) Then
            Set LOGINIDFIELD = FIELD
            sLoginIDFld = gsFld
            sLoginIDFldName = gsFldName
            sLoginIDFldVar = gsFldVar
            sLoginIDFldParm = gsFldParm
            sLoginIDFldObj = gsFldObj
        End If
        If GetFldObjByName(PROJ.SecPasswdFld) Then
            Set PASSWORDFIELD = FIELD
            sPasswordFld = gsFld
            sPasswordFldName = gsFldName
            sPasswordFldVar = gsFldVar
            sPasswordFldParm = gsFldParm
            sPasswordFldObj = gsFldObj
        End If
        If PROJ.SecRegisterEmail And PROJ.SecEmailFld <> "" Then
            If GetFldObj(PROJ.SecEmailFld) Then
                Set EMAILFIELD = FIELD
                sEmailFld = gsFld
                sEmailFldName = gsFldName
                sEmailFldVar = gsFldVar
                sEmailFldParm = gsFldParm
                sEmailFldObj = gsFldObj
            End If
        End If
        If PROJ.SecRegisterActivate And PROJ.SecRegisterActivateFld <> "" Then
            If GetFldObj(PROJ.SecRegisterActivateFld) Then
                sActivateFldName = gsFldName
            End If
        End If
    ##-->
    <!--##/session##-->
    
    <?php
    <!--##session phpmain##-->
    
    <!--##include captcha-script.php/phpcaptcha_var##-->
    
        //
        // Page main
        //
        function Page_Main() {
            global $conn, $Security, $Language, $gsFormError, $objForm, $<!--##=gsTblVar##-->;
       
            $bUserExists = FALSE;
           
            if (@$_POST["a_register"] <> "") {
           
                // Get action
                $<!--##=gsTblVar##-->->CurrentAction = $_POST["a_register"];
           
            <!--## If bHasFileField Then ##-->
                $this->GetUploadFiles(); // Get upload files
            <!--## End If ##-->
           
                $this->LoadFormValues(); // Get form values
               
                // Validate form
                if (!$this->ValidateForm()) {
                    $<!--##=gsTblVar##-->->CurrentAction = "I"; // Form error, reset action
                    $this->setFailureMessage($gsFormError);
                }
               
            } else {
                // $<!--##=gsTblVar##-->->CurrentAction = "I"; // Display blank record
                $this->LoadDefaultValues(); // Load default values
            }
           
            <!--##include captcha-script.php/phpcaptcha_php##-->
           
            <!--##
                If PROJ.SecRegisterActivate And PROJ.SecRegisterActivateFld <> "" Then
            ##-->
            // Handle email activation
            if (@$_GET["action"] <> "") {
                $sAction = $_GET["action"];
                $sEmail = @$_GET["email"];
                $qs = new cQueryString();
                $sApprovalCode = $qs->getValue("code");
                if ($sEmail == TEAdecrypt($sApprovalCode, EW_RANDOM_KEY)) {
                    if (strtolower($sAction) == "confirm") { // Email activation
                        if ($this->ActivateEmail($sEmail)) { // Activate this email
                            $this->setSuccessMessage($Language->Phrase("ActivateAccount")); // Set message acount activated
        <!--## If PROJ.SecRegisterAutoLogin And sLoginIDFldObj <> "" And sPasswordFldObj <> "" Then ##-->
                            // Auto login user from cookie values
                            $sUsr = TEAdecrypt(@$_COOKIE[EW_PROJECT_NAME]['Username'], EW_RANDOM_KEY);
                            $sPwd = TEAdecrypt(@$_COOKIE[EW_PROJECT_NAME]['Password'], EW_RANDOM_KEY);
                            if ($Security->ValidateUser($sUsr, $sPwd, TRUE))
                                $this->Page_Terminate(<!--##=sRegisterReturnPage##-->); // Go to return page
        <!--## Else ##-->
                            $this->Page_Terminate("<!--##=sFnLogin##-->"); // Go to login page
        <!--## End If ##-->
                        }
                    }
                }
                if ($this->getFailureMessage() == "")
                    $this->setFailureMessage($Language->Phrase("ActivateFailed")); // Set activate failed message
                $this->Page_Terminate("<!--##=sFnLogin##-->"); // Go to login page
            }
            <!--##
                End If
            ##-->
           
            switch ($<!--##=gsTblVar##-->->CurrentAction) {
           
                case "I": // Blank record, no action required
                    break;
           
                case "A": // Add
           
            <!--## If Not LOGINIDFIELD.FldAutoIncrement Then ##-->
                    // Check for duplicate User ID
                    $sFilter = str_replace("%u", ew_AdjustSql($<!--##=sLoginIDFldObj##-->->CurrentValue), EW_USER_NAME_FILTER);
                    // Set up filter (SQL WHERE clause) and get return SQL
                    // SQL constructor in <!--##=gsTblVar##--> class, <!--##=gsTblVar##-->info.php
                    $<!--##=gsTblVar##-->->CurrentFilter = $sFilter;
                    $sUserSql = $<!--##=gsTblVar##-->->SQL();
           
                    if ($rs = $conn->Execute($sUserSql)) {
                        if (!$rs->EOF) {
                            $bUserExists = TRUE;
                            $this->RestoreFormValues(); // Restore form values
                            $this->setFailureMessage($Language->Phrase("UserExists")); // Set user exist message
                        }
                        $rs->Close();
                    }
            <!--## Else ##-->
                    $bUserExists = FALSE;
            <!--## End If ##-->
           
                    if (!$bUserExists) {
                        $<!--##=gsTblVar##-->->SendEmail = TRUE; // Send email on add success
                        if ($this->AddRow()) { // Add record
            <!--##
                If PROJ.SecRegisterEmail And PROJ.SecEmailFld <> "" Then
            ##-->
           
                            // Load user email
                            $sReceiverEmail = $<!--##=sEmailFldObj##-->->CurrentValue;
                            if ($sReceiverEmail == "") { // Send to recipient directly
                                $sReceiverEmail = EW_RECIPIENT_EMAIL;
                                $sBccEmail = "";
                            } else { // Bcc recipient
                                $sBccEmail = EW_RECIPIENT_EMAIL;
                            }
           
                            // Set up email content
                            if ($sReceiverEmail <> "") {
                                $Email = new cEmail;
                                $Email->Load("<!--##=sFnRegisterTxt##-->");
                                $Email->ReplaceSender(EW_SENDER_EMAIL); // Replace Sender
                                $Email->ReplaceRecipient($sReceiverEmail); // Replace Recipient
                                if ($sBccEmail <> "") $Email->AddBcc($sBccEmail); // Add Bcc
           
                <!--##
                    For i = 0 to nFldCount-1
                        If GetFldObj(arFlds(i)) Then
                ##-->
                                $Email->ReplaceContent('<!--FieldCaption_<!--##=SQuote(gsFldName)##-->-->', $<!--##=gsFldObj##-->->FldCaption());
                                $Email->ReplaceContent('<!--<!--##=SQuote(gsFldName)##-->-->', strval($<!--##=gsFldObj##-->->FormValue));
                <!--##
                        End If
                    Next
                ##-->
           
                <!--##
                    If PROJ.SecRegisterActivate Then
                ##-->
                                $sActivateLink = ew_FullUrl() . "?action=confirm";
                                $sActivateLink .= "&email=" . $<!--##=sEmailFldObj##-->->CurrentValue;
                                $sActivateLink .= "&code=" . TEAencrypt($<!--##=sEmailFldObj##-->->CurrentValue, EW_RANDOM_KEY);
                                $Email->ReplaceContent("<!--ActivateLink-->", $sActivateLink);
                        <!--## If PROJ.SecRegisterAutoLogin And sLoginIDFldObj <> "" And sPasswordFldObj <> "" Then ##-->
                                setcookie(EW_PROJECT_NAME . '[Username]', TEAencrypt($<!--##=sLoginIDFldObj##-->->CurrentValue, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME); // Set up user name cookies
                                setcookie(EW_PROJECT_NAME . '[Password]', TEAencrypt($<!--##=sPasswordFldObj##-->->FormValue, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME); // Set up password cookies
                        <!--## End If ##-->
                <!--##
                    End If
                ##-->
                                $Email->Charset = EW_EMAIL_CHARSET;
                               
                                // Get new recordset
                                $<!--##=gsTblVar##-->->CurrentFilter = $<!--##=gsTblVar##-->->KeyFilter();
                                $sSql = $<!--##=gsTblVar##-->->SQL();
                                $rsnew = $conn->Execute($sSql);
       
        <!--## If SYSTEMFUNCTIONS.ServerScriptExist("Other","Email_Sending") Then ##-->
                                $Args = array();
                                $Args["rs"] =& $rsnew;
                                $bEmailSent = FALSE;
                                if ($this->Email_Sending($Email, $Args))
                                    $bEmailSent = $Email->Send();
        <!--## Else ##-->
                                $bEmailSent =$Email->Send();
        <!--## End If ##-->
                                // Send email failed
                                if (!$bEmailSent)
                                    $this->setFailureMessage($Email->SendErrDescription);
    
                            }
            <!--##
                End If
            ##-->
           
            <!--## If PROJ.SecRegisterActivate Then ##-->
                            $this->setSuccessMessage($Language->Phrase("RegisterSuccessActivate")); // Activate success
            <!--## Else ##-->
                            $this->setSuccessMessage($Language->Phrase("RegisterSuccess")); // Register success
                <!--## If PROJ.SecRegisterAutoLogin And sLoginIDFldObj <> "" And sPasswordFldObj <> "" Then ##-->
                            // Auto login user
                            if ($Security->ValidateUser($<!--##=sLoginIDFldObj##-->->CurrentValue, $<!--##=sPasswordFldObj##-->->FormValue, TRUE)) {
                                // Nothing to do
                            }
                <!--## End If ##-->
            <!--## End If ##-->
           
                            $this->Page_Terminate(<!--##=sRegisterReturnPage##-->); // Return
                        } else {
                            $this->RestoreFormValues(); // Restore form values
                        }
                    }
                   
                default: // Show the "Terms of Condition"
                  break;
                   
           
            }
           
            // Render row
            <!--## If bRegisterConfirm Then ##-->
            if ($<!--##=gsTblVar##-->->CurrentAction == "F") { // Confirm page
                $<!--##=gsTblVar##-->->RowType = EW_ROWTYPE_VIEW; // Render view
            } else {
                $<!--##=gsTblVar##-->->RowType = EW_ROWTYPE_ADD; // Render add
            }
            <!--## Else ##-->
            $<!--##=gsTblVar##-->->RowType = EW_ROWTYPE_ADD; // Render add
            <!--## End If ##-->
            $<!--##=gsTblVar##-->->ResetAttrs();
            $this->RenderRow();
        }
    <!--##/session##-->
    ?>
    
    <!--##session htmtable##-->
    <!--##include phpcommon.php/header-message##-->
    <p class="phpmaker ewTitle"><!--##@RegisterPage##--></p>
    <p class="phpmaker"><a href="<!--##=sFnLogin##-->"><!--##@BackToLogin##--></a></p>
    
    <!--##include phpcommon.php/phpcommon-message##-->
    <body>
    <form name="<!--##=sFormName##-->" id="<!--##=sFormName##-->" action="<?php echo ew_CurrentPage() ?>" method="post"<!--##=sEncType##--><!--##=sFormSubmit##-->>
    
    <table border="0" cellpadding="0" cellspacing="0" width="400" align="center">
     <tr>
      <td>
       <table border="0" cellpadding="0" cellspacing="0" width="420" align="center">
        <tr>
         <td align="left" valign="top" width="4" height="30"><img src="phpimages/sidebox-title-left.gif"></td>
         <td align="left" valign="middle" background="phpimages/sidebox-title-bg.gif" width="390" height="30">
          <font class="option">&nbsp;&nbsp;<strong><!--##@RegisterPage##--></strong></font>
                &nbsp;&nbsp;    
                </td>
         <td align="left" valign="top" width="4" height="30"><img src="phpimages/sidebox-title-right.gif"></td>
        </tr>
       </table>
      </td>
     </tr>
    </table>
    
    <table border="0" cellpadding="0" cellspacing="0" align="center" class="ewGrid">
     <tr valign="top">
      <td width="4" align="left" valign="top" background="phpimages/sidebox-bar-left.gif"><img src="phpimages/sidebox-bar-px.gif"></td>
      <td bgcolor="#FFFFFF" width="" align="left" valign="top">
       <table bgcolor="#F0F1F5" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr>
         <td>
             <table width="412" border="0" align="center" cellpadding="2" cellspacing="0">
             
    <?php if (  ($<!--##=gsTblVar##-->->CurrentAction == "F") || ($<!--##=gsTblVar##-->->CurrentAction == "I") ||  ($<!--##=gsTblVar##-->->CurrentAction == "X") ||  ($<!--##=gsTblVar##-->->CurrentAction == "A") || (EW_SHOW_TOC_ON_REGISTRATION_PAGE == FALSE) ) { ?>
             
               <tr>
                <td>&nbsp;</td>
                <td>&nbsp;
            <input type="hidden" name="t" id="t" value="<!--##=gsTblVar##-->" />
    <input type="hidden" name="a_register" id="a_register" value="A" />
    <!--## If bRegisterConfirm Then ##-->
    <?php if ($<!--##=gsTblVar##-->->CurrentAction == "F") { // Confirm page ?>
    <input type="hidden" name="a_confirm" id="a_confirm" value="F" />
    <?php } elseif ($<!--##=gsTblVar##-->->CurrentAction == "T") { ?>
    <input type="hidden" name="a_confirm" id="a_confirm" value="T">
    <?php } ?>
    
    <!--## Else ##-->
    
    <?php if ($<!--##=gsTblVar##-->->CurrentAction == "T") { ?>
    <input type="hidden" name="a_confirm" id="a_confirm" value="T">
    <?php } ?>
    
    <!--## End If ##-->
                </td>
               </tr>
    
    <!--##
        ' Get number of pages
        nPage = 1
        Set dPageLabels = CreateObject("Scripting.Dictionary")
        If PROJ.RegisterMultiPage Then
            For i = 0 to nFldCount-1
                If GetFldObj(arFlds(i)) Then
                    If Not FIELD.FldAutoIncrement And FIELD.FldAutoUpdateValue = "" And _
                        FIELD.FldName <> DB.SecUserLevelFld And _
                        FIELD.FldName <> sActivateFldName Then
                        If glFldPageIndex > nPage Then
                            nPage = glFldPageIndex
                        End If
                        If Not dPageLabels.Exists(CStr(glFldPageIndex)) Then
                            dPageLabels.Add CStr(glFldPageIndex), "Page " & glFldPageIndex
                        End If
                    End If
                End If
            Next
        End If
       
        ' Multi page style
        If nPage > 1 Then
            sMultiPageStyle = " style=""width: 100%"""
        Else
            sMultiPageStyle = ""
        End If
    
        ' Multi page
        If nPage > 1 Then
    ##-->
    <table cellspacing="0" cellpadding="0"><tr><td>
    <div id="<!--##=sPageObj##-->" class="yui-navset">
        <ul class="yui-nav">
    <!--##
            For i = 1 to nPage
                If dPageLabels.Exists(CStr(i)) Then
                    If i = 1 Then sItemClass = " class=""selected""" Else sItemClass = ""
    ##-->
            <li<!--##=sItemClass##-->><a href="#tab_<!--##=gsTblVar##-->_<!--##=i##-->"><em><span class="phpmaker"><?php echo  $<!--##=gsTblVar##-->->PageCaption(<!--##=i##-->) ?></span></em></a></li>
    <!--##
                Else ' P6
    ##-->
            <li style="display: none"><a href="#tab_<!--##=gsTblVar##-->_<!--##=i##-->"></a></li>
    <!--##
                End If
            Next
    ##-->
        </ul>
        <div class="yui-content">
    <!--##
        End If
    ##-->
    
    <!--##
        For pageidx = 1 to nPage
            If nPage > 1 Then
    ##-->
            <div id="tab_<!--##=gsTblVar##-->_<!--##=pageidx##-->">
    <!--##
            End If
            If (Not PROJ.RegisterMultiPage) Or (PROJ.RegisterMultiPage And dPageLabels.Exists(CStr(pageidx))) Then ' P6
    ##-->
    
    
    <!--- modified by Masino Sinaga -->
    
    
    <!--##
            rowcnt = 0
            For i = 0 to nFldCount-1
                If GetFldObj(arFlds(i)) Then
                    If (Not PROJ.RegisterMultiPage) Or (PROJ.RegisterMultiPage And glFldPageIndex = pageidx) Then
                    If Not FIELD.FldAutoIncrement And FIELD.FldAutoUpdateValue = "" Then
                        ' Skip User Level Field, Activate Field and Hidden Field
                        If FIELD.FldName <> DB.SecUserLevelFld And _
                            FIELD.FldName <> sActivateFldName And _
                            Not (FIELD.FldHtmlTag = "HIDDEN" And FIELD.FldDefault <> "") Then
                            sSpanID = "el_" & gsFldParm
                            If IsRequiredField(FIELD) Then
                                sFldReqInd = "<?php echo $Language->Phrase(""FieldRequiredIndicator"") ?>"
                            Else
                                sFldReqInd = ""
                            End If
                            rowcnt = rowcnt + 1
    ##-->
        <tr id="r_<!--##=gsFldParm##-->"<?php echo $<!--##=gsTblVar##-->->RowAttributes() ?>>
            <td<!--##=ewCSSTableHeaderClass##-->>&nbsp;&nbsp;&nbsp;<?php echo $<!--##=gsFldObj##-->->FldCaption() ?><!--##=sFldReqInd##--></td>
            <td<?php echo $<!--##=gsFldObj##-->->CellAttributes() ?>><span id="<!--##=sSpanID##-->"><!--##=SYSTEMFUNCTIONS.FieldAdd##--></span><?php echo $<!--##=gsFldObj##-->->CustomMsg ?></td>
        </tr>
    <!--##
                            If FIELD.FldName = PROJ.SecPasswdFld Then ' Generate Confirm Password Field
                                sTmpFldVar = FIELD.FldVar ' Save Field Variable Name
                                gsFldVar = "c_" & gsFldParm ' New Variable as c_FldVar
                                FIELD.FldVar = gsFldVar
                                rowcnt = rowcnt + 1
    ##-->
        <tr id="rc_<!--##=gsFldParm##-->"<?php echo $<!--##=gsTblVar##-->->RowAttributes() ?>>
            <td<!--##=ewCSSTableHeaderClass##-->>&nbsp;&nbsp;&nbsp;<!--##@Confirm##-->&nbsp;<?php echo $<!--##=gsFldObj##-->->FldCaption() ?><!--##=sFldReqInd##--></td>
            <td<?php echo $<!--##=gsFldObj##-->->CellAttributes() ?>><!--##=SYSTEMFUNCTIONS.FieldAdd##--></td>
        </tr>
    <!--##
                                FIELD.FldVar = sTmpFldVar ' Restore Field Variable Name
                            End If
                        ' Hidden field
                        ElseIf (FIELD.FldHtmlTag = "HIDDEN" And FIELD.FldDefault <> "") Then
    ##-->
        <!--##=SYSTEMFUNCTIONS.FieldAdd##-->
    <!--##
                        End If
                    End If
                    End If
                End If
            Next
    ##-->
    
    
    <!--##
            End If ' P6
            If nPage > 1 Then
    ##-->
            </div>
    <!--##
            End If
        Next
    ##-->
    
    <!--##
        ' Multi page
        If nPage > 1 Then
    ##-->
        </div>
    </div>
    </td></tr></table>
    <!--##
        End If
        Set dPageLabels = Nothing
    ##-->
    
    <!--##
        ' Multi page
        If nPage > 1 And PROJ.RegisterMultiPage Then
    ##-->
    <script type="text/javascript">
    <!--
    ew_TabView(<!--##=sPageObj##-->);
    //-->
    </script>  
    <!--##
        End If
    ##-->
    
    <?php if (EW_SHOW_CAPTCHA_ON_REGISTRATION_PAGE == TRUE) { ?> 
    <!--##include captcha-script.php/phpcaptcha_htm##-->
    <?php } ?> 
    
               <tr>
                <td >&nbsp;</td>
                <td >&nbsp;</td>
               </tr>
    
               <tr>
                    <td>&nbsp;</td>
                    <td><span class="phpmaker">
    <!--## If bRegisterConfirm Then ##-->
    <?php if ($<!--##=gsTblVar##-->->CurrentAction <> "F") { // Confirm page ?>
    <input type="<!--##=sButtonType##-->" name="btnAction" id="btnAction" value="<?php echo ew_BtnCaption($Language->Phrase("RegisterBtn")) ?>"<!--##=sConfirmButtonSubmit##--> />
    <?php } else { ?>
    <input type="<!--##=sButtonType##-->" name="btnCancel" id="btnCancel" value="<?php echo ew_BtnCaption($Language->Phrase("CancelBtn")) ?>"<!--##=sCancelButtonSubmit##--> />
    <input type="<!--##=sButtonType##-->" name="btnAction" id="btnAction" value="<?php echo ew_BtnCaption($Language->Phrase("ConfirmBtn")) ?>"<!--##=sButtonSubmit##--> />
    <?php } ?>
    <!--## Else ##-->
    <input type="<!--##=sButtonType##-->" name="btnAction" id="btnAction" value="<?php echo ew_BtnCaption($Language->Phrase("RegisterBtn")) ?>"<!--##=sButtonSubmit##--> />
    <!--## End If ##-->
    
    </span></td>
                 </tr>
               <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
               </tr>
               <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
               </tr>
               
    <?php } else { ?>
    
    <tr>
      <td>&nbsp;&nbsp;<?php echo $Language->Phrase("TaCTitle"); ?></td>
    </tr>
    
    <tr>
      <td>
        &nbsp;&nbsp;<textarea cols="72" rows="14" readonly><?php echo $Language->Phrase("TaCContent"); ?></textarea></td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
    </tr>
    
    <tr>
      <td align="left">&nbsp;&nbsp;
      <input type="hidden" name="a_register" id="a_register" value="I">
      <input type="submit" name="btnAction" id="btnAction" value="<?php echo $Language->Phrase("IAgree"); ?>"  onclick="this.form.a_register.value='I';">
      </td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
    </tr>
    
    <?php } ?>  
               
             </table>
         </td>
        </tr>
       </table>
      </td>
      <td width="4" align="left" valign="top" background="phpimages/sidebox-bar-right.gif"><img src="phpimages/sidebox-bar-px.gif">
      </td>
     </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="420" align="center">
     <tr>
    <td width="2" height="29" align="left" valign="top"><img src="phpimages/storybox-bottom-left.gif"></td>
    <td width="394" height="29" background="phpimages/storybox-bottom-bg.gif">&nbsp;<a href="<!--##=sFnLogin##-->"><!--##@BackToLogin##--></a></td>
    <td width="8" height="29" align="left" valign="top"><img src="phpimages/storybox-bottom-right.gif"></td>
     </tr>
    </table>
    <br /><br />
    </form>
    </body>
    
    
    <!--##=sConfirmJsChkStart##-->
    <!--##=SYSTEMFUNCTIONS.UpdateComboJS("add")##-->
    <!--##=sConfirmJsChkEnd##-->
    <!--##include phpcommon.php/footer-message##-->
    <!--##/session##-->
    
    
    <?php
    <!--##session phpfunction##-->
    <!--##
        If PROJ.SecRegisterActivate And PROJ.SecRegisterActivateFld <> "" Then
            If GetFldObj(PROJ.SecRegisterActivateFld) Then
                sActivateFld = gsFld
                sActivateFldName = gsFldName
                sActivateFldVar = gsFldVar
                sActivateFldParm = gsFldParm
                sActivateFldQuoteS = gsFldQuoteS
                sActivateFldQuoteE = gsFldQuoteE
                sActivateFldValue = ActivateFieldValue(FIELD)
                If sActivateFldQuoteS <> "" Then
                    sActivateFldValue = ew_DoubleQuote(sActivateFldValue, 1)
                End If
            End If
    ##-->
    
        // Activate account based on email
        function ActivateEmail($email) {
            global $conn, $Language, $<!--##=gsTblVar##-->;
            $sFilter = str_replace("%e", ew_AdjustSql($email), EW_USER_EMAIL_FILTER);
            $sSql = $<!--##=gsTblVar##-->->GetSQL($sFilter, "");
            $conn->raiseErrorFn = 'ew_ErrorFn';
            $rs = $conn->Execute($sSql);
            $conn->raiseErrorFn = '';
            if (!$rs)
                return FALSE;
            if (!$rs->EOF) {
                $rsnew = $rs->fields;
                $rs->Close();
                $rsact = array('<!--##=SQuote(sActivateFldName)##-->' => <!--##=sActivateFldValue##-->); // Auto register
                $<!--##=gsTblVar##-->->CurrentFilter = $sFilter;
                $res = $conn->Execute($<!--##=gsTblVar##-->->UpdateSQL($rsact));
                <!--## If SYSTEMFUNCTIONS.ServerScriptExist("Other","User_Activated") Then ##-->
                if ($res) { // Call User Activated event
                    $rsnew['<!--##=SQuote(sActivateFldName)##-->'] = <!--##=sActivateFldValue##-->;
                    $this->User_Activated($rsnew);
                }
                <!--## End If ##-->
                return $res;
            } else {
                $this->setFailureMessage($Language->Phrase("NoRecord"));
                $rs->Close();
                return FALSE;
            }
        }
    <!--##
        End If
    ##-->
    <!--##/session##-->
    ?>
    
    <?php
    <!--##session phpevents##-->
        <!--##~SYSTEMFUNCTIONS.GetServerScript("Other","Email_Sending")##-->
        <!--##~SYSTEMFUNCTIONS.GetServerScript("Other","Form_CustomValidate")##-->
        <!--##~SYSTEMFUNCTIONS.GetServerScript("Other","User_Registered")##-->
        <!--##~SYSTEMFUNCTIONS.GetServerScript("Other","User_Activated")##-->
    <!--##/session##-->
    ?>
    

[/hidepost]

Article by Masino Sinaga / Customize Template / form, PHPMaker 8.0.0, PHPMaker 8.0.1, PHPMaker 8.0.2, PHPMaker 8.0.3, register, registration, Terms and Conditions, Terms of Conditions Leave a Comment

How to Customize Header and Footer for the Website Created with PHPMaker 8.0.1
How to Beautify Your “Forgot Password” Page Created With PHPMaker 8.0.1

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • A New PHPMaker 2025 Project File Is Released
  • PHPMaker 2025 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2025 Is Released!
  • A New PHPMaker 2024 Project File Is Released
  • PHPMaker 2024 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2024 Is Released!
  • PHPMakerProjects.com, For Those Who Need PHPMaker Project Sample
  • A New PHPMaker 2023 Project File Is Released
  • PHPMaker 2023 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2023 Is Released!

Search

Recent Comments

  • Masino Sinaga on Masino Extensions for PHPMaker 2024 Is Released!
  • Masino Sinaga on A New PHPMaker 2024 Project File Is Released
  • Masino Sinaga on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on Masino Extensions for PHPMaker 2024 Is Released!

Demo Website

  • Demo of I Love PHPMaker 2025 (MasinoExtensions).
  • Stock Inventory Management for PHPMaker 2025.

Another Demo

The following template are not available in this site (must be purchased separately)

  • PHPMaker v2018 Horizontal Vertical Template.
  • PHPMaker v2017 Horizontal Vertical Template.

Demo Explanation

Stock Inventory Management is the good project for your reference, since it uses the real example in the real world. Many useful features you can use from this project, such as how to add the Thousand and Decimal separator character, and also how to calculate multiple row in Grid-Add when End-Users are entering data into the Grid-Add mode.

Categories

  • Customize Template (103)
  • General (4)
  • PHP Report Maker (17)
  • PHP Report Maker Extensions (2)
  • PHPMaker Extensions (84)
  • PHPMaker Projects (7)
  • Tips and Trick (72)

Articles based on version

  • PHPMaker 2025
  • PHPMaker 2024
  • PHPMaker 2023
  • PHPMaker 2022
  • PHPMaker 2021
  • PHPMaker 2020
  • PHPMaker 2019
  • PHPMaker 2018
  • PHPMaker 2017.0.7
  • PHPMaker 12.0.7
  • PHPMaker 11.0.6
  • PHPMaker 10.0.5
  • PHPMaker 9.2.0
  • PHPMaker 8.0.3
  • PHP Report Maker 12

(c) I Love PHPMaker 2010 - 2025 by Masino Sinaga | WordPress | Log in | Back to top