S
S
Sergey Novikov2014-01-21 22:33:43
DLE
Sergey Novikov, 2014-01-21 22:33:43

How to find out in the DLE engine if there is an authorization session or not?

So. I need to find out if there is an authorization session or not. What files should be included, and what variables should be used to check the session?
+ How is the connection to the database? Is it possible to connect directly to it using new mysqli("localhost","user","password","db_name"), or is there some kind of protection there too?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Makarov, 2014-01-21
@Segeja

Pfft...

@session_start(); - запуск сессии
print_r($_SESSION); - вывод всего содержимого сессии

In general, judging by the questions, you will not understand a word of what I said, so you are on Freelance .
Regarding the question about the database, as far as my memory serves me, in DLE a class with the name mysql.class.php works with the database, the connection settings are in db.config.php.
An example of working with a database for DLE:
define("DBHOST", "имя хоста");
define("DBNAME", "имя базы");
define("DBUSER", "имя пользователя");
define("DBPASS", "пароль");
define("COLLATE", "кодировка");
$db = new db;
$auth = $db->super_query("SELECT id, email, login FROM admin WHERE login = '{$rem}' OR email = '{$rem}' LIMIT 0,1");

Just keep in mind that I gave you an example, not a solution to your problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question