Esempio n. 1
0
 public static function getConnection()
 {
     if (null === self::$conn) {
         self::$conn = new medoo(['database_type' => 'mysql', 'database_name' => 'comments', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8']);
     }
     return self::$conn;
 }
 /**
  * Activates a new account
  * @access private
  * @param string ActivationCode An md5 code for the new user to identify him without his username
  * @return string Page
  */
 function _activateRegistration($ActivationCode)
 {
     $out = '';
     if ($this->_Config->Get('activate_throw_admin', '0')) {
         $out .= $this->_AdminLang['activation_only_by_an_administrator_possible'];
     } else {
         $sql = "UPDATE " . DB_PREFIX . "users\n\t\t\t\t\tSET user_activated=1, user_activationcode=''\n\t\t\t\t\tWHERE user_activationcode='{$ActivationCode}'";
         $this->_SqlConnection->SqlQuery($sql);
         $out .= $this->_AdminLang['your_account_has_been_successfully_activated'];
     }
     return $out;
 }
Esempio n. 3
0
function selectComment()
{
    return SqlConnection::select('all');
}