<commit_before><?php

namespace PFC\Editor;
//use \PFC\Editor\AppLogin;
//use \PFC\Editor\AppFile;
//use \PFC\Editor\AppSess;         

//do login if login form is submited
if( isset($_POST['pwd']) &&  isset($_POST['login'])
        && AppLogin::verify($_POST['login'],$_POST['pwd'],$_POST['pin'])        
  )
{
  
  
     AppLogin::setUserLoggedIn($_POST['pwd']);    
     AppSess::set('pfc-login',true);
     
     echo json_encode(array(
       'succ' => 'yes'
     ));
  
     //AppFile::sendRedirectHeaders(str_replace('?_app=true&action=login','',$_SERVER['REQUEST_URI']).'?after-login');

}
     else
     {
       if( AppLogin::isFreeForLoging() )       
         echo json_encode(array(
           'succ' => 'no',
           'reason' => 'creditials'
         ));
       else
         echo json_encode(array(
           'succ' => 'no',
           'reason' => 'banned',
           'bannedToTime' => date('G:i:s',AppLogin::getBannedToTime())
         ));       
       
       //AppFile::sendRedirectHeaders(str_replace('?_app=true&action=login','',$_SERVER['REQUEST_URI']).'?wrong-creditials');
     }

<commit_msg>login fix<commit_after><?php

namespace PFC\Editor;
//use \PFC\Editor\AppLogin;
//use \PFC\Editor\AppFile;
//use \PFC\Editor\AppSess;         

//do login if login form is submited
if( isset($_POST['pwd']) &&  isset($_POST['login'])
        && AppLogin::verify($_POST['login'],$_POST['pwd'],$_POST['pin'])        
  )
{
  
  
     AppLogin::setUserLoggedIn($_POST['pwd']);    
     AppSess::set('pfc-login',true);
     
     echo json_encode(array(
       'succ' => 'yes'
     ));
  
     //AppFile::sendRedirectHeaders(str_replace('?_app=true&action=login','',$_SERVER['REQUEST_URI']).'?after-login');

}
     else
     {
       if( AppLogin::isFreeForLoging() ) {       
         echo json_encode(array(
           'succ' => 'no',
           'reason' => 'creditials'
         ));
       } else {
         echo json_encode(array(
           'succ' => 'no',
           'reason' => 'banned',
           'bannedToTime' => date('G:i:s',AppLogin::getBannedToTime())
         ));       
       }
       //AppFile::sendRedirectHeaders(str_replace('?_app=true&action=login','',$_SERVER['REQUEST_URI']).'?wrong-creditials');
     }


{'fraction_non_alphanumeric': 0.19581664441477525, 'fraction_numerical': 0.0, 'mean_word_length': 2.463790446841294, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6708785', 'n_tokens_mistral': 766, 'n_tokens_neox': 754, 'n_words': 93}