//On essaye de se connecte avec les cookies if (!is_logged_in() && !empty($_COOKIE['nw_ident']) && !empty($_COOKIE['nw_pass'])) { //On vérifie que le compte existe if (Session::count_exit_cookies($_COOKIE['nw_ident'], $_COOKIE['nw_pass']) > 0) { $_SESSION['logged'] = true; $_SESSION['ident_session'] = intval($_COOKIE['nw_ident']); } } // Le membre est connecté if (is_logged_in()) { Nw::$dn_mbr = Session::recup_donnees_membre($_SESSION['ident_session']); if (Nw::$dn_mbr['u_group'] == 10) { exit; } // Si jamais le fichier de cache n'existe pas on le créé. $fcache = PATH_ROOT . Nw::$assets['dir_cache'] . Nw::$site_lang . '._groupauth_' . Nw::$dn_mbr['u_group'] . '.php'; if (!is_file($fcache)) { inc_lib('admin/refresh_cache_droits'); refresh_cache_droits(Nw::$dn_mbr['u_group']); } include $fcache; Nw::$droits = $group_auth['g' . Nw::$dn_mbr['u_group']]; // Mise à jour des données membre Session::maj_donnees_membre($_SESSION['ident_session']); } Nw::$tpl = new Talus_TPL(PATH_ROOT . 'themes/tpl/', PATH_ROOT . Nw::$assets['dir_cache'] . 'tpl/'); // Mode pour les développeurs if (DEV_MODE) { error_reporting(E_ALL | E_STRICT); Nw::$dev_mode = 1; }
* * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * Identifiants MySQL **/ if (is_file(PATH_ROOT . 'inc/configs/prod.php')) { Nw::$is_prod = true; include_once PATH_ROOT . 'inc/configs/prod.php'; } else { include_once PATH_ROOT . 'inc/configs/local.php'; } Nw::$prefix_table = $ident_config['pref']; Nw::$site_url = $ident_config['siteurl']; Nw::$site_name = $ident_config['sitename']; Nw::$site_slogan = $ident_config['slogan']; Nw::$site_lang = $ident_config['sitelang']; Nw::$id_devs = isset($ident_config['id_devs']) ? $ident_config['id_devs'] : array(); Nw::$assets = $ident_config['assets']; Nw::$social = isset($ident_config['social']) ? $ident_config['social'] : array(); Nw::$twitter = isset($ident_config['twitter']) ? $ident_config['twitter'] : array(); Nw::$site_email = isset($ident_config['email']) ? $ident_config['email'] : ''; Nw::$site_email_nor = isset($ident_config['email_nor']) ? $ident_config['email_nor'] : ''; Nw::$rpx_login = isset($ident_config['rpx_login']) ? $ident_config['rpx_login'] : ''; // Connexion à la base de données Nw::$DB = new Db($ident_config['host'], $ident_config['user'], $ident_config['pass'], $ident_config['base']); // Destruction des identifiants de connexion à la bdd unset($ident_config); Nw::$pref = array('nb_news_redac' => 20, 'nb_news_homepage' => 10, 'nb_cmts_page' => 10, 'nb_votes_valid_news' => 10, 'nb_votes_cmts_ptn' => 5, 'ppl_nb_news' => 15, 'ppl_nb_contribs' => 20, 'ppl_nb_comments' => 20, 'nb_logs_admin' => 20, 'long_intro_news' => 500);
protected final function add_form($form) { if (is_array($form)) { Nw::$forms_size = array_merge(Nw::$forms_size, $form); } else { Nw::$forms_size[] = $form; } return true; }