/** * setter. set the form URL * @param string page URL ( /admin/form.php?a=b); * @return nothing; * @access public */ function setFormUrl($url) { $this->formUrl = KT_getUriFolder() . $url; }
/** * Add some fields to a login transaction, if they are defined in control panel; * fields could be: kt_login_user, kt_login_password, kt_login_email, kt_activation_page, kt_login_page, kt_login_redirect * @param object tNG transaction object * @return nothing * @access public */ function Trigger_Registration_AddDynamicFields(&$tNG) { $user_field = $GLOBALS['tNG_login_config']['user_field']; $tNG->addColumn("kt_login_user", "STRING_TYPE", "VALUE", $tNG->getColumnValue($user_field)); $password_field = $GLOBALS['tNG_login_config']['password_field']; $tNG->addColumn("kt_login_password", "STRING_TYPE", "VALUE", $tNG->getColumnValue($password_field)); if ($GLOBALS['tNG_login_config']['activation_field'] != "" && $GLOBALS['tNG_login_config']['email_field'] != "" && isset($tNG->columns[$GLOBALS['tNG_login_config']['email_field']])) { $args = 'kt_login_id=' . $tNG->getColumnValue($GLOBALS['tNG_login_config']['pk_field']); if ($GLOBALS['tNG_login_config']['randomkey_field'] != "") { $args .= '&kt_login_random=' . $tNG->getColumnValue($GLOBALS['tNG_login_config']['randomkey_field']); } else { $args .= '&kt_login_email=' . $tNG->getColumnValue($GLOBALS['tNG_login_config']['email_field']); } $tmpPath = KT_makeIncludedURL(""); $activation_page = KT_getUriFolder() . $tmpPath . 'activate.php?' . $args; $tNG->addColumn("kt_activation_page", "STRING_TYPE", "VALUE", $activation_page); } $tmpRelPath = KT_makeIncludedURL($tNG->dispatcher->relPath); $login_page = KT_Rel2AbsUrl(KT_getUri(), $tmpRelPath, $GLOBALS['tNG_login_config']['login_page'], true); $tNG->addColumn("kt_login_page", "STRING_TYPE", "VALUE", $login_page); $redirect_page = $tmpRelPath . $GLOBALS['tNG_login_config']['login_page']; if ($GLOBALS['tNG_login_config']['email_field'] != "" && isset($tNG->columns[$GLOBALS['tNG_login_config']['email_field']])) { if ($GLOBALS['tNG_login_config']['activation_field'] != "") { if (isset($tNG->columns[$GLOBALS['tNG_login_config']['activation_field']]) && $tNG->getColumnValue($GLOBALS['tNG_login_config']['activation_field']) != 0) { $redirect_page = KT_addReplaceParam($redirect_page, "info", "REG"); } else { $redirect_page = KT_addReplaceParam($redirect_page, "info", "REG_ACTIVATE"); } } else { $redirect_page = KT_addReplaceParam($redirect_page, "info", "REG_EMAIL"); } } else { $redirect_page = KT_addReplaceParam($redirect_page, "info", "REG"); } $tNG->addColumn("kt_login_redirect", "STRING_TYPE", "VALUE", $redirect_page); return null; }
function mxi_getBaseURL() { return KT_getUriFolder(); }