Project

General

Profile

1
<?php
2
/**
3
 * @package 	mod_bt_login - BT Login Module
4
 * @version		2.6.0
5
 * @created		April 2012
6
 * @author		BowThemes
7
 * @email		support@bowthems.com
8
 * @website		http://bowthemes.com
9
 * @support		Forum - http://bowthemes.com/forum/
10
 * @copyright	Copyright (C) 2011 Bowthemes. All rights reserved.
11
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
12
 *sign
13
 */
14

    
15
// no direct access
16
defined('_JEXEC') or die('Restricted access');
17

    
18
require_once JPATH_BASE.'/modules/mod_login/helper.php';
19
require_once JPATH_BASE.'/modules/mod_slogin/helper.php'
20
 
21
?>
22
<div id="btl">
23
	<!-- Panel top -->	
24
	<div class="btl-panel">
25
		<?php if($type == 'logout') : ?>
26
		<!-- Profile button -->
27
		<span id="btl-panel-profile" class="btl-dropdown" >
28
			
29
			<?php
30
			echo JText::_("BTL_WELCOME").", ";
31
			if($params->get('name')) : {
32
				echo $user->get('name');
33
			} else : {
34
				echo $user->get('username');
35
			} endif;
36
			?>
37
		</span> 
38
		<?php else : ?>
39
			<!-- Login button -->
40
			<?php
41
			
42
			$BT_REGISTER="REGISTER";
43
			$BT_LOGIN="SIGN IN   ";
44
			$BT_SEPERATOR="|";
45
			  
46
			if($params->get('enabled_login_tab', 1)){
47
			?>
48
			
49
			
50
			<span  style="color: rgb(255, 255, 255); background-color: rgb(45, 114, 214); border: medium none rgb(255, 255, 255);" id="btl-panel-login" class="<?php echo $effect;?>">
51
			<a class="loginLink"> <?php echo JText::_($BT_LOGIN);?></span></a> 
52
			 <?php echo JText::_($BT_SEPERATOR);?> 
53
			<?php }?>
54
			<!-- Registration button -->
55
			<?php
56
			//$enabledRegistration=false;
57
			if($enabledRegistration && $params->get('enabled_registration_tab')){
58
				$option = JRequest::getCmd('option');
59
				$task = JRequest::getCmd('task');
60
				if($option!='com_user' && $task != 'register' ){
61
			?>
62
			<span   style="color: rgb(255, 255, 255); background-color: rgb(45, 114, 214); border: medium none rgb(255, 255, 255);" id="btl-panel-registration"
63
			 class="<?php echo $effect;?>">
64
			 <a class="loginLink"> <?php echo JText::_($BT_REGISTER);?> </a></span>
65
			<?php }
66
			} ?>
67
			
68
			
69
		<?php endif; ?>
70
	</div>
71
	<!-- content dropdown/modal box -->
72
	 
73

    
74
	 
75
	 
76
	 
77
	<div id="btl-content" >
78
	
79
		<?php if($type == 'logout') { ?>
80
		<!-- Profile module -->
81
		<div id="btl-content-profile" class="btl-content-block">
82
			<?php if($loggedInHtml): ?>
83
			<div id="module-in-profile">
84
				<?php echo $loggedInHtml; ?>
85
			</div>
86
			<?php endif; ?>
87
			  	 
88
				 
89
		</div>
90
		<?php }else{ ?>	
91
		<!-- Form login -->	
92
		 
93
		<div id="btl-content-login" class="btl-content-block">
94
		 <div id="main-block">
95
			
96
			<?php if(JPluginHelper::isEnabled('authentication', 'openid')) : ?>
97
				<?php JHTML::_('script', 'openid.js'); ?>
98
			<?php endif; ?>
99
		        <a href="plugins/user/oneloginsaml/oneloginsaml.php?sso" style="padding-left:20px;">OpenMintedAAI</a>
100
			<!-- if not integrated any component -->
101
			<?php if($integrated_com==''|| $moduleRender == ''){?>
102
			<form name="btl-formlogin" class="btl-formlogin"
103
			 action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post">
104
				<div id="btl-login-in-process">   
105
				 </div>	 
106
				<div id= "btl-login-title">
107
				 <p class="omb_authTitle">
108
<?php echo JText::_('LOGIN TO YOUR ACCOUNT') ?>
109
 
110
</h3>
111

    
112
				 </div>
113
				 <!-- <div id="register-link"> 
114
				    // if ($enabledRegistration) : <?php echo sprintf(JText::_('DONT_HAVE_AN_ACCOUNT_YET'),'<a href="'.JRoute::_('index.php?option=com_users&view=registration').'">','</a>');?>
115
					 
116
				     </div> -->
117
				
118
				 
119
				  <div class="spacer"></div>  
120
				 
121
				<div class="btl-error" id="btl-login-error"></div>
122
			          <div class="btl-field" >
123
				 <div class="btl-label"><?php echo JText::_('Username') ?></div>
124
				  <div class="uk-form-large uk-form-width-small">
125
				  <input id="btl-input-username" type="text" name="username" />
126
					 
127
				</div>
128
				
129
				
130
				</div>
131
				<div class="btl-field" >
132
					<div class="btl-label"><?php echo JText::_('Password') ?></div>
133
					<div class="uk-form-large uk-form-width-small">
134
					 <input id="btl-input-password" type="password" name="password" alt="password" />
135
					</div> 
136
				</div>
137
				
138
				
139
				<div class="clear"></div>
140
				<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
141
				 			
142
					
143
					<div class="btl-input" id="btl-input-remember" >
144
						<input id="btl-checkbox-remember"  type="checkbox" name="remember"
145
							value="yes" />
146
							<?php echo JText::_('BT_REMEMBER_ME'); ?>
147
					</div>	
148
				 
149
				<div class="clear"></div>
150
				<?php endif; ?>
151
				 
152
		             <div class="btl-buttonsubmit" >
153
				
154
				
155
			 <input type="submit" name="Submit" class="uk-button uk-button-primary"   id='btl-login-button'
156
		  
157
		    
158
					onclick="return loginAjax()" value="<?php echo JText::_('JLOGIN') ?>" /> 
159
					<input type="hidden" name="bttask" value="login" /> 
160
					<input type="hidden" name="return" id="btl-return"	value="<?php echo $return; ?>" />
161
					<?php echo JHtml::_('form.token');?>
162
				</div>
163
			</form>	
164
			
165
		 <div id="btl-forgot">
166
			<ul id ="bt_ul" style="width: 200px;">
167
				<li>
168
					<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
169
					<?php echo JText::_('BT_FORGOT_YOUR_PASSWORD'); ?></a>
170
					</li>	
171
					<li>
172
					<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
173
					<?php echo JText::_('BT_FORGOT_YOUR_USERNAME'); ?></a>
174
				</li>				
175
			</ul>
176
		 
177
		 </div>
178
	 
179
 <div id="btl-social">
180
 <div id="socialMsg"> 
181
 <?php echo JText::_('Or use your Academic/Social account:'); ?> 
182
 </divy
183
  
184
   
185
<div id="btl-slogin-buttons_group" >
186
<ul id='btl-horizontal-list'>
187
 
188
  <li><a href="https://www.openaire.eu/index.php?option=com_sso"   title="Login Through Your Institution (EDUGAIN)" rel="nofollow"><img src="/images/site_images/Edugain_001.png"  width="45px" /></a></li>
189
 <li><a href="/provider/orcid/auth"   title="Orcid" rel="nofollow"><img src="/images/site_images/Orcid_001.png"  width="45px" /></a></li>
190

    
191

    
192
<li><a href="/provider/github/auth"   title="Github" rel="nofollow"><img src="/images/site_images/Github_001.png"  width="45px" /></a></li>
193
<li><a href="/provider/google/auth"   title="Google" rel="nofollow"><img src="/images/site_images/Google_001.jpg"  width="45px" /></a></li>
194

    
195
<li><a href="/provider/twitter/auth"   title="Twitter" rel="nofollow"><img src="/images/site_images/Twitter_001.jpg"  width="45px" /> </a></li>
196
<li><a href="/provider/facebook/auth"   title="Facebook" rel="nofollow"> <img src="/images/site_images/Facebook_001.jpg"  width="45px" /> </a></li>
197
<li><a href="/provider/linkedin/auth"   title="LinkedIN" rel="nofollow"><img src="/images/site_images/Linkedin_001.jpg"  width="45px" /></a></li>
198
<li><a href="/provider/live/auth"  title="Windows Live " rel="nofollow"><img src="/images/site_images/Live_001.png"  width="45px" /></a></li>
199

    
200
</ul>
201
 
202

    
203
 
204
</div>  </div>
205
       
206
 
207
 <!-- End of social Login -->
208
	 		    
209
 <div id="register-link"> 
210
 
211
	 <?php
212
	 // echo  (JText::_('Don\'t have an account?'));
213
	 ?>
214
	 <div>
215
	  
216
	 <!-- This is an anchor toggling the modal -->
217
<!-- <a href="#registration-id" data-uk-modal  title="Register Now!" >Register Now!  </a>
218
-->
219
<!--
220
  <a href="index.php?option=com_users&view=registration" title="Register Now!"> Register Now!</a>-->	
221
		
222
		</div>					 
223
				     </div>  
224
				 
225
			 
226
 
227
		<!-- if integrated with one component -->
228
			<?php }else{ ?>
229
				<h3><?php echo JText::_('JLOGIN') ?></h3>
230
				<div id="btl-wrap-module"><?php  echo $moduleRender; ?></div>
231
				<?php }?>			
232
		
233
		
234
	<!--for	<div id="main-block"> -->
235
		</div>
236
		</div>  
237
		
238
		<?php 
239
		
240
		
241
		if($enabledRegistration ){ ?>			
242
		<div id="btl-content-registration" class="btl-content-block" >			
243
			<!-- if not integrated any component -->
244
			<?php if($integrated_com==''){?>	
245
		  <p class="omb_authTitle">
246
<?php echo JText::_('CREATE AN ACCOUNT') ?>
247

    
248
</p>
249
    <div id="register-link"> 
250
 
251
	 <?php echo  (JText::_('Don\'t have an account yet ?'));
252
	 ?>
253
	 <div>
254
	  
255
	  <!-- This is an anchor toggling the modal -->
256
<a href="#btl-content-registration-modal" data-uk-modal  title="Register Now!" > Register Now !  </a>
257
 
258
 
259
		</div>					 
260
				     </div>  
261
				 
262
	 
263
  <div id="btl-social" >
264
  <div id="socialMsg"> 
265
 Or use your Academic/Social account:
266
 </div> 
267
  
268
<div id="btl-slogin-buttons_group" >
269
<ul id='btl-horizontal-list'>
270
  <li><!--https://new.openaire.eu/index.php?option=com_sso -->
271
  <a href=""   title="Register Through Your Institution (EDUGAIN)" rel="nofollow"><img src="/images/site_images/Edugain_001.png"  width="45px" /></a></li>
272
 <li><a href="/provider/orcid/auth"   title="Orcid" rel="nofollow"><img src="/images/site_images/Orcid_001.png"  width="45px" /></a></li>
273

    
274

    
275
<li><a href="/provider/github/auth"   title="Github" rel="nofollow"><img src="/images/site_images/Github_001.png"  width="45px" /></a></li>
276
<li><a href="/provider/google/auth"   title="Google" rel="nofollow"><img src="/images/site_images/Google_001.jpg"  width="45px" /></a></li>
277

    
278
<li><a href="/provider/twitter/auth"   title="Twitter" rel="nofollow"><img src="/images/site_images/Twitter_001.jpg"  width="45px" /> </a></li>
279
<li><a href="/provider/facebook/auth"   title="Facebook" rel="nofollow"> <img src="/images/site_images/Facebook_001.jpg"  width="45px" /> </a></li>
280
<li><a href="/provider/linkedin/auth"   title="LinkedIN" rel="nofollow"><img src="/images/site_images/Linkedin_001.jpg"  width="45px" /></a></li>
281
<li><a href="/provider/live/auth"  title="Windows Live" rel="nofollow"><img src="/images/site_images/Live_001.png"  width="45px" /></a></li>
282

    
283
</ul>
284
  
285
 
286
</div>  </div>
287
  
288
 
289
			<!-- if  integrated any component -->
290
			<?php }else{ ?>
291
				<input type="hidden" name="integrated" value="<?php echo $linkOption?>" value="no" id="btl-integrated"/>		
292
			<?php }?>
293
		</div>
294
						
295
		<?php } ?>
296
	<?php } ?>
297
	
298
	</div>
299
	 
300
</div>
301
 
302
  
303

    
304
<!-- This is the Register  modal -->
305
<div id="btl-content-registration-modal" class="uk-modal">
306
    <div class="uk-modal-dialog">
307
        <a class="uk-modal-close uk-close"></a>
308
       
309
       <div id="btl-content-registration-modal-inner" class="btl-register-modal">			
310
			  <div id="btl-success">
311
			
312
			<p style="font-family: Roboto;font-size: 22px; line-height: 35px;text-transform: uppercase;"> Congratulations! </p>
313
			<p>
314
			 You have just completed your registration at OpenAire.  </p>
315
			<p>Before you can login to the site, you will need to activate your account.
316
			 An e-mail will be sent to you with the proper instructions. 
317
			
318
			<div class="uk-alert uk-alert-danger" style=" font-size: 13px;">
319
			
320
			Important!
321
			<br>
322
			<p>Please note that this site is currently undergoing  Beta testing.<br>
323
			
324
			Any new content you create is not guaranteed to be present to the final version 
325
			of the  site upon release. 
326
		        </p>
327
		        <p>
328
		        Thank you for your patience, 
329
		        <br>
330
		        OpenAire Dev Team. 
331
			
332
				</p>
333
			
334
			</div>
335
			
336
			<a class="uk-modal-close" style="display: inline; text-decoration: none;">Close This Message</a>
337
			    </div>	
338
				<form name="btl-formregistration" id="btl-content-registration-form" class="btl-formregistration"  autocomplete="off">
339
					<div id="btl-register-in-process"></div>	
340
					
341
					
342
					 
343
 
344

    
345
  <p class="omb_authTitle">
346
<?php echo JText::_('CREATE AN ACCOUNT') ?>
347

    
348
</p>
349
			 	
350
 
351
					<div id="btl-registration-error" class="btl-error"></div>
352
		  			 <div class="btl-field">
353
						<div class="blt-register-label"><?php echo JText::_( 'Name:' ); ?></div>
354
						
355
						<div class="uk-form-large uk-form-width-small">
356
						<!--<span data-uk-tooltip="{pos:'top-right'}" title="Please Fill In Your Name">   -->
357
							
358
							<!--<span class="uk-form-help-inline">  -->
359
						
360
							<div class="uk-form-icon">
361
   							  <i class="uk-icon-pencil"></i>
362
    								<input id="btl-input-name" type="text" name="jform[name]">
363
							 </div>
364
							 
365
							
366
						</div>  
367
					</div>		
368
					
369
					<div class="clear"></div>
370
					
371
					<div class="btl-field">
372
						<div class="blt-register-label"><?php echo JText::_( 'Username:' ); ?></div>
373
						<div class="uk-form-large uk-form-width-small">
374
							 <div class="uk-form-icon">
375
   							  <i class="uk-icon-user"></i>
376
							<input id="btl-input-username1" type="text" name="jform[username]"/>
377
						  
378
						</div>
379
						</div>
380
					</div>
381
					<div class="clear"></div>
382
					
383
					<div class="btl-field">
384
						<div class="blt-register-label"><?php echo JText::_( 'Password:' ); ?></div>
385
						<div class="uk-form-large uk-form-width-small">
386
						 <div class="uk-form-icon">
387
   							  <i class="uk-icon-lock"></i>
388
							<input id="btl-input-password1" type="password" name="jform[password1]"  />
389
						</div>
390
						
391
						<!--<div class="btl-note-small"><span><?php echo JText::_("*Must be at least 4 characters long."); ?></span></div>
392
						-->
393
						
394
						</div>
395
					</div>		
396
					<div class="clear"></div>
397
					
398
					<div class="btl-field">
399
						<div class="blt-register-label"><?php echo JText::_( 'Verify Password:' ); ?></div>
400
						<div class="uk-form-large uk-form-width-small"> 
401
						 <div class="uk-form-icon">
402
   							  <i class="uk-icon-lock"></i>
403
							<input id="btl-input-password2" type="password" name="jform[password2]"  />
404
							</div>
405
						</div>
406
					</div>
407
					<div class="clear"></div>
408
					
409
					<div class="btl-field">
410
						<div class="blt-register-label"><?php echo JText::_( 'E-mail:' ); ?></div>
411
						<div class="uk-form-large uk-form-width-small">
412
						<div class="uk-form-icon">
413
   							<i class="uk-icon-at"></i>
414
							<input id="btl-input-email1" type="text" name="jform[email1]"  />
415
						</div>
416
 						
417
					 <!--  <div class="btl-note-small"><span><?php echo JText::_("*Must be a valid mail address."); ?></span></div> 
418
    -->
419
    
420
 						
421
 						</div>
422
					 </div>
423
				
424
					<div class="clear"></div>
425
				
426
					<div class="btl-field">
427
						<div class="blt-register-label"><?php echo JText::_( 'Verify E-mail:' ); ?></div>
428
						<div class="uk-form-large uk-form-width-small">
429
						  <div class="uk-form-icon">
430
   							  <i class="uk-icon-at"></i>
431
							<input id="btl-input-email2" type="text" name="jform[email2]" />
432
						</div></div>
433
					</div>
434
					<div class="clear"></div>			
435
					
436
					
437
					   <div class="btl-note"><span><?php echo JText::_("*All Fields Are Required."); ?></span></div> 
438
    
439
    
440
    
441
					<!-- add captcha-->
442
					
443
					<?php if($enabledRecaptcha){?>
444
					
445
					<div class="clear"></div>
446
				
447
				
448
					
449
					<div class="btl-field" style="margin-top:25px;">
450
		
451
						<div class="blt-register-label">
452
						<?php echo JText::_( 'Please Verify You Are Human:' ); ?>
453
						 </div>
454
				
455
				     <div id="recaptcha" class="recaptcha"> <?php echo $reCaptcha;?></div>
456
					</div>
457
					<div id="btl-registration-captcha-error" class="btl-error-detail"></div>
458
					<div class="clear"></div>
459
					<!--  end add captcha -->
460
					<?php }?>
461
					 <div  style="margin-left: 25px; margin-top: 20px;">						
462
					 <button type="submit" class="uk-button uk-button-primary"  id="register-button"
463
						  
464
						 onclick="return registerAjax()" >
465
							<?php echo JText::_('JREGISTER');?>							
466
						
467
						</button>
468
						 
469
						<input type="hidden" name="bttask" value="register" /> 
470
						<?php echo JHtml::_('form.token');?>
471
					</div>
472
			</form>
473
			    
474
   
475
       
476
      </div>
477
       
478
 
479

    
480
    </div>
481
</div>
482

    
483

    
484
 <!-- End of Register Modal-->
485
       
486
       
487

    
488

    
489

    
490
 
491
<script type="text/javascript">
492
/*<![CDATA[*/
493
var btlOpt = 
494
{         
495
	BT_AJAX					:'<?php echo addslashes(JURI::getInstance()->toString()); ?>',
496
	BT_RETURN				:'<?php echo addslashes($return_decode); ?>',
497
	RECAPTCHA				:'<?php echo $enabledRecaptcha ;?>',
498
	LOGIN_TAGS				:'<?php echo $loginTag?>',
499
	REGISTER_TAGS			:'<?php echo $registerTag?>',
500
	EFFECT					:'<?php echo $effect?>',
501
	ALIGN					:'<?php echo $align?>',
502
	BG_COLOR				:'<?php echo $bgColor ;?>',
503
	MOUSE_EVENT				:'<?php echo $params->get('mouse_event','click') ;?>',
504
	TEXT_COLOR				:'<?php echo $textColor;?>',
505
	MESSAGES 				: {
506
		E_LOGIN_AUTHENTICATE 		: '<?php echo JText::_('E_LOGIN_AUTHENTICATE')?>',
507
		REQUIRED_NAME				: '<?php echo JText::_('REQUIRED_NAME')?>',
508
		REQUIRED_USERNAME			: '<?php echo JText::_('REQUIRED_USERNAME')?>',
509
		REQUIRED_PASSWORD			: '<?php echo JText::_('REQUIRED_PASSWORD')?>',
510
		REQUIRED_VERIFY_PASSWORD	: '<?php echo JText::_('REQUIRED_VERIFY_PASSWORD')?>',
511
		PASSWORD_NOT_MATCH			: '<?php echo JText::_('PASSWORD_NOT_MATCH')?>',
512
		REQUIRED_EMAIL				: '<?php echo JText::_('REQUIRED_EMAIL')?>',
513
		EMAIL_INVALID				: '<?php echo JText::_('EMAIL_INVALID')?>',
514
		REQUIRED_VERIFY_EMAIL		: '<?php echo JText::_('REQUIRED_VERIFY_EMAIL')?>',
515
		EMAIL_NOT_MATCH				: '<?php echo JText::_('EMAIL_NOT_MATCH')?>',
516
		CAPTCHA_REQUIRED			: '<?php echo JText::_('CAPTCHA_REQUIRED')?>'
517
	}
518
}
519
if(btlOpt.ALIGN == "center"){
520
	BTLJ(".btl-panel").css('textAlign','center');
521
}else{
522
	BTLJ(".btl-panel").css('float',btlOpt.ALIGN);
523
}
524
BTLJ("input.btl-buttonsubmit,button.btl-buttonsubmit").css({"color":btlOpt.TEXT_COLOR,"background":btlOpt.BG_COLOR});
525
BTLJ("#btl .btl-panel > span").css({"color":btlOpt.TEXT_COLOR,"background-color":btlOpt.BG_COLOR,"border":btlOpt.TEXT_COLOR});
526
/*]]>*/
527
</script>
(1-1/3)