static function registerRedirectCB($plan) { if (aecComponentHelper::detect_component('CB1.2')) { TempTokenHandler::TempTokenFromPlan($plan); if (!empty($_GET['fname'])) { setcookie("fname", $_GET['fname'], (int) gmdate('U') + 60 * 10); } if (!empty($_GET['femail'])) { setcookie("femail", $_GET['femail'], (int) gmdate('U') + 60 * 10); } aecRedirect('index.php?option=com_comprofiler&task=registers'); } else { global $task, $_PLUGINS, $ueConfig, $_CB_database; $app = JFactory::getApplication(); $savetask = $task; $_REQUEST['task'] = 'done'; include_once JPATH_SITE . '/components/com_comprofiler/comprofiler.php'; include_once JPATH_SITE . '/components/com_comprofiler/comprofiler.html.php'; $task = $savetask; registerForm('com_acctexp', $app->getCfg('emailpass'), null); } }
defined('_VALID_MOS') or die('Restricted access'); global $mosConfig_frontend_login; require_once $mainframe->getPath('front_html'); if ($mosConfig_frontend_login != NULL && ($mosConfig_frontend_login === 0 || $mosConfig_frontend_login === '0')) { echo _NOT_AUTH; return; } switch ($task) { case 'lostPassword': lostPassForm($option); break; case 'sendNewPass': sendNewPass($option); break; case 'register': registerForm($option, $mosConfig_useractivation); break; case 'saveRegistration': saveRegistration(); break; case 'activate': activate($option); break; } function lostPassForm($option) { global $mainframe; $mainframe->SetPageTitle(_PROMPT_PASSWORD); HTML_registration::lostPassForm($option); } function sendNewPass($option)
function blankRegForm($msg) { $newuser = array(); $newuser['username'] = ''; $newuser['fullnames'] = ''; $newuser['group'] = ''; $newuser['phone'] = ''; $newuser['user_website'] = ''; $newuser['email'] = ''; $newuser['referred_by'] = $_SESSION['ref']; registerForm($msg, $newuser); }
$iconpath = $_POST['iconpath']; $today = date("Ymdhis"); $signature = $_POST['signature']; //Debug /* print "Username: $username<br/>"; print "Password: $password<br/>"; print "Date: $today<br/>"; */ $confirm_password = $_POST['password2']; if (!isset($username) || !isset($password) || !isset($confirm_password)) { $error .= 'A required field was left blank.<br />'; } if (!$password == $confirm_password) { $error .= 'The passwords did not match.<br />'; } if (!preg_match('/[a-zA-Z_0-9{1, 20}]/', $username)) { $error .= 'The username can only contain letters, numbers and underscores.<br />'; } if ($error == '') { $password = md5($password); mysql_query('INSERT INTO `chat_users`(`username`, `password`, `date_registered`, `date_last_visited`,`icon`,`signature`) VALUES("' . $username . '", "' . $password . '", "' . $today . '", "' . $today . '", "' . $iconpath . '", "' . $signature . '")'); echo 'Thank you for taking the time to register, <strong>' . $username . '</strong>. You can now <a href="login.php">log in.</a>'; } else { echo 'The following errors were returned:<br />' . $error . '<br />'; registerForm(); } } else { registerForm(); } include 'foot.php';
userAvatar($option, $uid, _UE_UPDATE); break; case "lostPassword": case "lostpassword": lostPassForm( $option ); break; case "sendNewPass": case "sendnewpass": $oldignoreuserabort = ignore_user_abort(true); sendNewPass( $option ); break; case "registers": registerForm( $option, isset( $ueConfig['emailpass'] ) ? $ueConfig['emailpass'] : '******' ); break; case "saveregisters": $oldignoreuserabort = ignore_user_abort(true); saveRegistration( $option ); break; case "login": $oldignoreuserabort = ignore_user_abort(true); login(); break; case "logout": $oldignoreuserabort = ignore_user_abort(true); logout();
include_once "../globals.php"; include_once "{$srcdir}/registry.inc"; include_once "{$srcdir}/sql.inc"; if ($_GET['method'] == "enable") { updateRegistered($_GET['id'], "state=1"); } elseif ($_GET['method'] == "disable") { updateRegistered($_GET['id'], "state=0"); } elseif ($_GET['method'] == "install_db") { $dir = getRegistryEntry($_GET['id'], "directory"); if (installSQL("{$srcdir}/../interface/forms/{$dir['directory']}")) { updateRegistered($_GET['id'], "sql_run=1"); } else { $err = xl('ERROR: could not open table.sql, broken form?'); } } elseif ($_GET['method'] == "register") { registerForm($_GET['name']) or $err = xl('error while registering form!'); } $bigdata = getRegistered("%") or $bigdata = false; //START OUT OUR PAGE.... ?> <html> <head> <?php html_header_show(); ?> <link rel="stylesheet" href="<?php echo $css_header; ?> " type="text/css"> </head> <body class="body_top">
function register_form($option, $custom_task = '') { global $Itemid, $JLMS_CONFIG; global $ueConfig; $usersConfig =& JComponentHelper::getParams('com_users'); $allowUserRegistration = $usersConfig->get('allowUserRegistration'); if (!$allowUserRegistration && !$ueConfig['reg_admin_allowcbregistration']) { return ''; } $doc =& JFactory::getDocument(); $page_title = $doc->getTitle(); $is_cb = $JLMS_CONFIG->get('is_cb_installed'); $validate = josSpoofValue(1); $one_more_string_to_replace = ' <tr> <td colspan="2" width="100%"><div class="componentheading">Registration</div></td> </tr>'; $one_more_string_to_replace2 = ' <div class="componentheading"> Registration </div>'; if ($is_cb) { //ob_start(); require_once $JLMS_CONFIG->get('absolute_path') . '/components/com_comprofiler/comprofiler.html.php'; require_once $JLMS_CONFIG->get('absolute_path') . '/components/com_comprofiler/comprofiler.php'; //@ob_end_clean(); ob_start(); registerForm('com_joomla_lms', isset($ueConfig['emailpass']) ? $ueConfig['emailpass'] : '******', ' '); $form = ob_get_contents(); ob_end_clean(); /*SoulPowerUniversity_MOD*/ $form = str_replace("index.php?option=com_comprofiler", "index.php?option=com_comprofiler&vc=1", $form); /*SoulPowerUniversity_MOD*/ $form = str_replace('saveregisters', $custom_task . '_cb', $form); $form = str_replace('"com_comprofiler"', '"com_joomla_lms"', $form); $form = str_replace('</form>', '<input type="hidden" value="' . $Itemid . '" name="Itemid"></form>', $form); $form = str_replace($one_more_string_to_replace, '', $form); echo $form; if ($ueConfig['reg_admin_approval'] || $ueConfig['reg_confirmation']) { } else { ?> <script type="text/javascript" language="javascript"> <!-- var cb_form = document.adminForm; cb_form.option.value = 'com_joomla_lms'; --> </script> <?php } } else { if ($allowUserRegistration) { if (JLMS_Jversion() == 2) { if (JLMS_J16version()) { $lang =& JFactory::getLanguage(); $lang->load('com_users'); require_once $JLMS_CONFIG->get('absolute_path') . '/components/com_users/controller.php'; jimport('joomla.form.form'); JForm::addFormPath(JPATH_SITE . DS . 'components' . DS . 'com_users' . DS . 'models' . DS . 'forms'); JForm::addFieldPath(JPATH_SITE . DS . 'components' . DS . 'com_users' . DS . 'models' . DS . 'fields'); $usersConfig = array('base_path' => $JLMS_CONFIG->get('absolute_path') . DS . 'components' . DS . 'com_users'); // Create the controller $usersController = UsersController::getInstance('Users', $usersConfig); $usersView = $usersController->getView('registration', $doc->getType()); $usersView->addTemplatePath(JPATH_SITE . DS . 'components' . DS . 'com_users' . DS . 'views' . DS . 'registration' . DS . 'tmpl'); $oldView = JRequest::getCmd('view'); JRequest::setVar('view', 'registration'); ob_start(); $usersController->display(); $form = ob_get_contents(); ob_end_clean(); JRequest::setVar('view', $oldView); $form = str_replace('"com_users"', 'com_joomla_lms', $form); $form = str_replace('registration.register', $custom_task, $form); $form = str_replace(JRoute::_('index.php?option=com_users'), $JLMS_CONFIG->get('live_site') . "/index.php?option=com_joomla_lms&Itemid=" . $Itemid, $form); } else { $lang =& JFactory::getLanguage(); $lang->load('com_user'); require_once $JLMS_CONFIG->get('absolute_path') . '/components/com_user/controller.php'; require_once $JLMS_CONFIG->get('absolute_path') . '/components/com_user/views/register/view.html.php'; // Create the controller $controller = new UserController(); // Perform the Request task $controller->_basePath = $JLMS_CONFIG->get('absolute_path') . '/components/com_user'; ob_start(); $controller->execute('register'); $form = ob_get_contents(); ob_end_clean(); $form = str_replace('"com_user"', 'com_joomla_lms', $form); $form = str_replace('register_save', $custom_task, $form); $form = str_replace(JRoute::_('index.php?option=com_user'), $JLMS_CONFIG->get('live_site') . "/index.php?option=com_joomla_lms&Itemid=" . $Itemid, $form); } $form = str_replace($one_more_string_to_replace, '', $form); echo $form; } } } $doc->setTitle($page_title); }
function confirmSubscription($option) { $user = JFactory::getUser(); global $aecConfig; $app = JFactory::getApplication(); $userid = aecGetParam('userid', 0, true, array('word', 'int')); $usage = aecGetParam('usage', 0, true, array('word', 'string', 'clear_nonalnum')); $group = aecGetParam('group', 0, true, array('word', 'int')); $processor = aecGetParam('processor', '', true, array('word', 'string', 'clear_nonalnum')); $username = aecGetParam('username', '', true, array('string', 'clear_nonalnumwhitespace')); $passthrough = array(); if (isset($_POST['aec_passthrough'])) { if (is_array($_POST['aec_passthrough'])) { $passthrough = $_POST['aec_passthrough']; } else { $passthrough = unserialize(base64_decode($_POST['aec_passthrough'])); } } if ($aecConfig->cfg['plans_first'] && !empty($usage) && empty($username) && empty($passthrough['username']) && !$userid && !$user->id && empty($aecConfig->cfg['skip_registration'])) { if (aecComponentHelper::detect_component('anyCB')) { // This is a CB registration, borrowing their code to register the user include_once JPATH_SITE . '/components/com_comprofiler/comprofiler.html.php'; include_once JPATH_SITE . '/components/com_comprofiler/comprofiler.php'; registerForm($option, $app->getCfg('emailpass'), null); } else { // This is a joomla registration joomlaregisterForm($option, $app->getCfg('useractivation')); } } else { if (!empty($usage)) { $iFactory = new InvoiceFactory($userid, $usage, $group, $processor); $iFactory->confirm(); } else { subscribe($option); } } }