Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -Naur flatnuke/sections/none_Login/section.php flatnuke-patch/sections/none_Login/section.php
- --- flatnuke/sections/none_Login/section.php 2013-08-26 18:31:41.000000000 +0200
- +++ flatnuke-patch/sections/none_Login/section.php 2014-05-07 13:41:08.428312153 +0200
- @@ -778,7 +778,7 @@
- }
- global $forumback,$forumborder;
- - $nome=getparam("nome",PAR_POST,SAN_FLAT);
- + $nome=getparam("regnome",PAR_POST,SAN_FLAT);
- if(!is_alphanumeric($nome)) {
- echo _FERRCAMPO."<br />";
- echo "<a href=\"javascript:history.back()\"><<"._INDIETRO."</a>";
- @@ -1118,10 +1118,10 @@
- }
- function validate_reguser()
- {
- - if(document.getElementsByName('nome')[0].value=='')
- + if(document.getElementsByName('regnome')[0].value=='')
- {
- alert('<?php echo _REQUIREDFIELD.": "._NOMEUTENTE?>');
- - document.getElementsByName('nome')[0].focus();
- + document.getElementsByName('regnome')[0].focus();
- document.getElementsByName('reregpass')[0].value='';
- return false;
- }
- @@ -1224,7 +1224,7 @@
- else if ($action=="reguser"){
- ?>
- <tr><td>
- - <label for="nome"><b><span>*</span> <?php echo _NOMEUTENTE?></b></label></td><td><input name="nome" type="text" id="nome" value="Username" onfocus="
- + <label for="nome"><b><span>*</span> <?php echo _NOMEUTENTE?></b></label></td><td><input name="regnome" type="text" id="nome" value="Username" onfocus="
- if (this.value=='Username'){this.value='';}"/></td></tr>
- <tr><td><label for="regpass"><b><span>*</span> <?php echo _PASSWORD?></b></label></td><td><input name="regpass" type="password" id="regpass" /></td></tr>
- <tr><td><label for="reregpass"><b><span>*</span> <?php echo _REPEATPASSWORD?></b></label></td><td> <input name="reregpass" type="password" id="reregpass" /></td>
- diff -Naur flatnuke/themes/fnluke/structure.php flatnuke-patch/themes/fnluke/structure.php
- --- flatnuke/themes/fnluke/structure.php 2013-11-30 20:02:43.000000000 +0100
- +++ flatnuke-patch/themes/fnluke/structure.php 2014-05-07 13:23:09.672294664 +0200
- @@ -38,6 +38,13 @@
- <ul class="nav navbar-nav">
- <?php create_menu_horiz(); ?>
- </ul>
- +
- + <ul class="nav navbar-nav navbar-right">
- + <li class="dropdown">
- + <?php print_login(); ?>
- + </li>
- + </ul>
- +
- <form class="navbar-form navbar-right" role="search" method="post" action="index.php?mod=none_Search">
- <div class="form-group">
- <input name="find" type="text" class="form-control" placeholder="<?php echo _CERCA; ?>">
- diff -Naur flatnuke/themes/fnluke/theme.php flatnuke-patch/themes/fnluke/theme.php
- --- flatnuke/themes/fnluke/theme.php 2013-12-14 07:32:03.000000000 +0100
- +++ flatnuke-patch/themes/fnluke/theme.php 2014-05-07 13:20:22.556291955 +0200
- @@ -100,6 +100,187 @@
- }
- }
- +function print_login(){
- + if (preg_match("/login.php/i",$_SERVER['PHP_SELF'])) {
- + Header("Location: ../../index.php");
- + die();
- +}
- +
- +
- +// Security checks
- +$req = getparam("REQUEST_URI", PAR_SERVER, SAN_FLAT);
- +if(strstr($req,"myforum="))
- + die(_NONPUOI);
- +
- +
- +
- +// user is not logged
- +if(_FN_IS_GUEST) {
- + ?>
- + <a href="#" id="drop-login" role="button" class="dropdown-toggle" data-toggle="dropdown">
- +
- + <span class="glyphicon glyphicon-user"> </span>Account<b class="caret"></b>
- + </a>
- + <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
- + <li role="presentation">
- +
- +
- +
- +
- + <script type="text/javascript" language="javascript">
- + function validatelogin()
- + {
- + if(document.getElementsByName('nome')[0].value=='')
- + {
- + alert('<?php echo _REQUIREDFIELD.": "._NOMEUTENTE?>');
- + document.getElementsByName('nome')[0].focus();
- + document.getElementsByName('nome')[0].value='';
- + return false;
- + }
- + else if(document.getElementsByName('logpassword')[0].value=='')
- + {
- + alert('<?php echo _REQUIREDFIELD.": "._PASSWORD?>');
- + document.getElementsByName('logpassword')[0].focus();
- + document.getElementsByName('logpassword')[0].value='';
- + return false;
- + }
- + else return true;
- + }
- + </script>
- +
- + <form class="form-horizontal" role="form" action="index.php?mod=none_Login" method="post" onsubmit="return validatelogin()">
- + <input type="hidden" name="action" value="login" />
- + <input type="hidden" name="from" value="home" />
- + <div class="form-group">
- + <div class="col-sm-offset-1 col-sm-10">
- + <input alt="username" name="nome" size="10" id="username" class="form-control" placeholder="Username">
- + </div>
- + </div>
- + <div class="form-group">
- + <div class="col-sm-offset-1 col-sm-10">
- + <input alt="password di accesso" name="logpassword" type="password" class="form-control" id="password" placeholder="Password">
- + </div>
- + </div>
- + <div class="form-group">
- + <div class="col-sm-offset-2 col-sm-10">
- + <div class="checkbox">
- + <label>
- + <input type="checkbox" alt="ricorda l'accesso" name="rememberlogin" id="rememberlogin"> Ricorda
- + </label>
- + </div>
- + </div>
- + </div>
- + <div class="form-group">
- + <div class="col-sm-offset-3 col-sm-6">
- + <button type="submit" class="btn btn-default">Entra</button>
- + </div>
- + </div>
- +</form>
- +
- +</li>
- + <li role="presentation"><a href="index.php?mod=none_Login&action=passwordlost" role="menuitem" tabindex="-1">Recupera password</a></li>
- + <li role="presentation"><a href="index.php?mod=none_Login&action=visreg" role="menuitem" tabindex="-1">Registrati</a></li>
- + </ul>
- +<?php
- +}
- +// user is logged
- +elseif(_FN_IS_USER OR _FN_IS_ADMIN) {
- + // print user name
- + $username = _FN_USERNAME;
- + $img = _FN_USERAVATAR;
- +// $level = _FN_USERLEVEL;
- +// if(!file_exists("themes/$theme/images/level_y.gif") OR !file_exists("themes/$theme/images/level_n.gif")) {
- +// $level_img_y = "images/useronline/level_y.gif";
- +// $level_img_n = "images/useronline/level_n.gif";
- +// } else {
- +// $level_img_y = "themes/$theme/images/level_y.gif";
- +// $level_img_n = "themes/$theme/images/level_n.gif";
- +// }
- + ?>
- +
- + <a href="#" id="drop-login" role="button" class="dropdown-toggle" data-toggle="dropdown">
- +
- + <?php
- + // print avatar
- + if($img!="") {
- + if(!stristr($img,"http://"))
- + echo "<img src='forum/$img' class='img-rounded' style='width:20px;height:20px;' />";
- + else echo "<img src='$img' class='img-rounded' style='width:20px;height:20px;' />";
- + }
- + else echo "<span class=\"glyphicon glyphicon-user\"></span>";
- + ?>
- +
- + <?php echo $username;?><b class="caret"></b>
- + </a>
- + <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
- + <li role="presentation"><a href="index.php?mod=none_Login&action=viewprofile&user=<?php echo $username;?>" role="menuitem" tabindex="-1">Visualizza profilo</a></li>
- +
- + <?php
- +
- + //print level
- +// print "<div style='position:relative;margin-left:0px;margin-right:0px;text-align:center;'><b>"._LEVEL." $level</b></div>";
- +// print "<div align='center'>";
- +// print "<hr size='1' noshade width='100%' />";
- +// for($i=0; $i<$level; $i++) {
- +// print "<img src='$level_img_y' alt='level' />";
- +// }
- +// for($j=$i; $j<10; $j++) {
- +// print "<img src='$level_img_n' alt='level' />";
- +// }
- +// print "<hr size='1' noshade width='100%' />";
- +// print "</div>";
- + if (_FN_IS_NEWS_MODERATOR and !_FN_IS_ADMIN){
- + global $home_section;
- + if ($home_section==""){
- + echo "<li role=\"presentation\"><a href=\"index.php?action=addnewsinterface\" role=\"menuitem\" tabindex=\"-1\">Aggiungi news</a></li>";
- + }
- + include_once("flatnews/include/news_functions.php");
- + $proposednewsarray=load_proposed_news_list();
- + if(count($proposednewsarray)>0) {
- + $modstring="";
- + if (_FN_MOD=="")
- + $modstring = "mod=none_News&";
- + else $modstring = "mod="._FN_MOD."&";
- + ?>
- + <li role="presentation"><a href="index.php?mod=none_News&action=manageproposednews" role="menuitem" tabindex="-1">Notizie segnalate (<?php echo count($proposednewsarray)?>)</a></li>
- + <?php
- + }
- + }
- + // administrator panel
- + if(_FN_IS_ADMIN) {
- + ?>
- + <li role="presentation"><a href="index.php?mod=none_Admin" role="menuitem" tabindex="-1">Amministra sito</a></li>
- + <?php
- + global $home_section;
- + if ($home_section==""){
- + echo "<li role=\"presentation\"><a href=\"index.php?action=addnewsinterface\" role=\"menuitem\" tabindex=\"-1\">Aggiungi news</a></li>";
- + }
- + include_once("flatnews/include/news_functions.php");
- + $proposednewsarray=load_proposed_news_list();
- + if(count($proposednewsarray)>0) {
- + $modstring="";
- + if (_FN_MOD=="")
- + $modstring = "mod=none_News&";
- + else $modstring = "mod="._FN_MOD."&";
- + ?><li role="presentation"><a href="index.php?mod=none_News&action=manageproposednews" role="menuitem" tabindex="-1">Notizie segnalate (<?php echo count($proposednewsarray)?>)</a></li>
- + <?php
- + }
- + ?><li role="presentation"><a href="index.php?mod=fnnewsectinterface" role="menuitem" tabindex="-1">Crea sezione(home)</a></li>
- + <?php
- +
- +
- + }
- + // logout
- + ?>
- + <li role="presentation"><a href="index.php?mod=none_Login&action=logout&from=home" role="menuitem" tabindex="-1">Esci</a></li>
- + <?php
- +}else {echo "Cookie mismatch, please <a href='index.php?mod=none_Login&action=logout&from=home'>delete your cookies!</a>";}
- +
- +?>
- +</ul>
- +<?php
- +}
- +
- // function to create footer site
- function CreateFooterSite() {
- $footer_elements = get_footer_array();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement