/ Published in: PHP
URL: /httpdocs/modules/mod_virtuemart_login/mod_virtuemart_login.php
Hier bepaal je de layout voor de members login
Expand |
Embed | Plain Text
<?php /** * @version $Id: mod_virtuemart_login.php 1824 2009-06-24 20:08:11Z soeren_nb $ * @package VirtueMart * @subpackage modules * @copyright Copyright (C) 2007 Greg Perkins. All rights reserved. * @license GNU/GPL, http://www.gnu.org/copyleft/gpl.html * * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net */ // TODO: Joomla! 1.5 compatibility - do these global vars depend on the legacy plugin? // Load the virtuemart main parse code } else { } // Show login or logout? if( vmIsJoomla(1.5) ) { $user = & JFactory::getUser(); $type = (!$user->get('guest')) ? 'logout' : 'login'; } else { $type = ($my->id) ? 'logout' : 'login'; } // Determine settings based on CMS version if( vmIsJoomla('1.5') ) { // Joomla 1.5 if( $type == 'login' ) { // Redirect type $redirect = $params->get('login'); // Lost password // User name reminder (Joomla 1.5 only) // Set the validation value $validate = JUtility::getToken(); } else { // Redirect type $redirect = $params->get('logout'); // Return URL $uri = JFactory::getURI(); // Set the greeting name $user =& JFactory::getUser(); $name = ( $params->get( 'name') ) ? $user->name : $user->username; } // Post action $action = $mm_action_url. 'index.php?option=com_user&task='.$type; // Set the redirection URL if( $redirect == 'home' ) { // The Joomla! home page $menu = &JSite::getMenu(); $default = $menu->getDefault(); $uri = JFactory::getURI( $default->link.'&Itemid='.$default->id ); } elseif( $redirect == 'vmhome' ) { // The VirtueMart home page $url = JRoute::_( 'index.php?option=com_virtuemart&page='.HOMEPAGE.'&Itemid='.$sess->getShopItemid(), false ); } else { // The same page $uri = JFactory::getURI(); } } else { // Not Joomla 1.5 if( $type == 'login' ) { // Redirect type $redirect = $params->get('login'); // Lost password url $reset_url = sefRelToAbs( 'index.php?option=com_registration&task=lostPassword&Itemid='.(int)mosGetParam($_REQUEST, 'Itemid', 0) ); // Set user name reminder to nothing $remind_url = ''; // Set the validation value $validate = josSpoofValue(1); } else { $validate = vmSpoofValue(1); } } else { // Redirect type $redirect = $params->get('logout'); // Set the greeting name $name = ( $params->get( 'name') ) ? $my->name : $my->username; } // Post action $action = sefRelToAbs( $mm_action_url . 'index.php?option='.$type ); // Set the redirection URL if( $redirect == 'home' ) { $url = sefRelToAbs( 'index.php' ); } elseif( $redirect == 'vmhome' ) { // The VirtueMart home page $url = $sess->url( URL.'index.php?option=com_virtuemart&page='.HOMEPAGE ); } else { // The same page $url = $sess->url( basename($_SERVER['PHP_SELF']).'?'.mosGetParam($_SERVER,'QUERY_STRING'), true, false ); } $return_url = sefRelToAbs( $url ); } // Registration URL $registration_url = $sess->url( SECUREURL.'index.php?option=com_virtuemart&page=shop.registration' ); ?> <?php if( $type == 'logout' ) : ?> <div> <?php if( $params->get('greeting') ) : ?> <?php endif; ?> <?php if( $params->get('accountlink') || ENABLE_DOWNLOADS == '1' ) : ?> <ul> <?php if( $params->get('accountlink') ) : ?> <?php endif; ?> <?php if( ENABLE_DOWNLOADS == '1' ) : ?> <li><a href="<?php $sess->purl(SECUREURL . "index.php?page=shop.downloads");?>"><?php echo $VM_LANG->_('PHPSHOP_DOWNLOADS_TITLE') ?></a></li> <?php endif; ?> </ul> <?php endif; ?> <input type="submit" name="Submit" class="button" value="<?php echo $VM_LANG->_('BUTTON_LOGOUT') ?>" /> <br /><br /> <input type="hidden" name="op2" value="logout" /> <input type="hidden" name="lang" value="english" /> <input type="hidden" name="message" value="0" /> </form> </div> <?php else : ?> <div> <?php if( $params->get('pretext') ) : ?> <br /> <?php endif; ?> <input class="inputbox" type="text" id="username_vmlogin" size="20" name="username" /> <br /> <input type="password" class="inputbox" id="password_vmlogin" size="20" name="passwd" /> <?php if( @VM_SHOW_REMEMBER_ME_BOX == '1' ) { $remember_me_checked = $params->get('remember_me_default', 1) ? 'checked="checked"' : ''; ?> <br /> <input type="checkbox" name="remember" id="remember_vmlogin" value="yes" <?php echo $remember_me_checked ?> /> <?php } else { ?> <br /> <input type="hidden" name="remember" value="yes" /> <?php } ?> <input type="submit" value="<?php echo $VM_LANG->_('BUTTON_LOGIN') ?>" class="button" name="Login" /> <ul> <?php if( $remind_url ) : ?> <?php endif; ?> <?php if( $mosConfig_allowUserRegistration == '0' ) : ?> <?php endif; ?> </ul> <input type="hidden" value="login" name="op2" /> </form> </div> <?php endif; ?>
Comments
Subscribe to comments
You need to login to post a comment.

03-10-2010: Deze is zoals toegepast op Querino.nl Optie tot registratie ontbreekt inmiddels.