if (!empty($_REQUEST[$tag['column_name']])) { $sql_data[$tag['column_name']] = $_REQUEST[$tag['column_name']]; } } } if (!$db->build(SQL_UPDATE, ABONNES_TABLE, $sql_data, array('abo_id' => $abodata['id']))) { trigger_error('Impossible de mettre le profil à jour', ERROR); } $output->redirect('profil_cp.php', 4); $output->message('Profile_updated'); } } require WA_ROOTDIR . '/includes/functions.box.php'; $output->page_header(); $output->set_filenames(array('body' => 'editprofile_body.tpl')); $output->assign_vars(array('TITLE' => $lang['Module']['editprofile'], 'L_EXPLAIN' => nl2br($lang['Explain']['editprofile']), 'L_EMAIL' => $lang['Email_address'], 'L_PSEUDO' => $lang['Abo_pseudo'], 'L_LANG' => $lang['Default_lang'], 'L_NEW_PASS' => $lang['New_pass'], 'L_CONFIRM_PASS' => $lang['Conf_pass'], 'L_VALID_BUTTON' => $lang['Button']['valid'], 'EMAIL' => $abodata['email'], 'PSEUDO' => $abodata['pseudo'], 'LANG_BOX' => lang_box($abodata['language']))); foreach ($other_tags as $data) { if (isset($abodata[$data['column_name']])) { $output->assign_var($data['tag_name'], htmlspecialchars($abodata[$data['column_name']])); } } if ($abodata['passwd'] != '') { $output->assign_block_vars('password', array('L_PASS' => $lang['Password'])); } $output->pparse('body'); break; case 'archives': if (isset($_POST['submit'])) { $listlog = !empty($_POST['log']) ? (array) $_POST['log'] : array(); $sql_log_id = array(); foreach ($listlog as $liste_id => $logs) {
Attach::remove_file($source_file); } } } $browse->close(); } } $output->message('Success_modif'); } } else { $new_config = $old_config; } require WA_ROOTDIR . '/includes/functions.box.php'; $output->page_header(); $output->set_filenames(array('body' => 'config_body.tpl')); $output->assign_vars(array('TITLE_CONFIG_LANGUAGE' => $lang['Title']['config_lang'], 'TITLE_CONFIG_PERSO' => $lang['Title']['config_perso'], 'TITLE_CONFIG_COOKIES' => $lang['Title']['config_cookies'], 'TITLE_CONFIG_JOINED_FILES' => $lang['Title']['config_files'], 'TITLE_CONFIG_EMAIL' => $lang['Title']['config_email'], 'L_EXPLAIN' => nl2br($lang['Explain']['config']), 'L_EXPLAIN_COOKIES' => nl2br($lang['Explain']['config_cookies']), 'L_EXPLAIN_JOINED_FILES' => nl2br($lang['Explain']['config_files']), 'L_EXPLAIN_EMAIL' => nl2br(sprintf($lang['Explain']['config_email'], '<a href="' . WA_ROOTDIR . '/docs/faq.' . $lang['CONTENT_LANG'] . '.html#p9">', '</a>')), 'L_DEFAULT_LANG' => $lang['Default_lang'], 'L_SITENAME' => $lang['Sitename'], 'L_URLSITE' => $lang['Urlsite'], 'L_URLSITE_NOTE' => nl2br($lang['Urlsite_note']), 'L_URLSCRIPT' => $lang['Urlscript'], 'L_URLSCRIPT_NOTE' => nl2br($lang['Urlscript_note']), 'L_DATE_FORMAT' => $lang['Dateformat'], 'L_NOTE_DATE' => nl2br(sprintf($lang['Fct_date'], '<a href="http://www.php.net/date">', '</a>')), 'L_ENABLE_PROFIL_CP' => $lang['Enable_profil_cp'], 'L_COOKIE_NAME' => $lang['Cookie_name'], 'L_COOKIE_PATH' => $lang['Cookie_path'], 'L_LENGTH_SESSION' => $lang['Session_length'], 'L_SECONDS' => $lang['Seconds'], 'L_UPLOAD_PATH' => $lang['Upload_path'], 'L_MAX_FILESIZE' => $lang['Max_filesize'], 'L_MAX_FILESIZE_NOTE' => nl2br($lang['Max_filesize_note']), 'L_OCTETS' => $lang['Octets'], 'L_CHECK_EMAIL' => $lang['Check_email'], 'L_CHECK_EMAIL_NOTE' => nl2br(sprintf($lang['Check_email_note'], '<a href="' . WA_ROOTDIR . '/docs/faq.' . $lang['CONTENT_LANG'] . '.html#p11">', '</a>')), 'L_EMAILS_SENDED' => $lang['Emails_paquet'], 'L_EMAILS_SENDED_NOTE' => nl2br($lang['Emails_paquet_note']), 'L_USE_SMTP' => $lang['Use_smtp'], 'L_USE_SMTP_NOTE' => nl2br($lang['Use_smtp_note']), 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_SMTP_SERVER' => $lang['Smtp_server'], 'L_SMTP_PORT' => $lang['Smtp_port'], 'L_SMTP_PORT_NOTE' => nl2br($lang['Smtp_port_note']), 'L_SMTP_USER' => $lang['Smtp_user'], 'L_SMTP_PASS' => $lang['Smtp_pass'], 'L_AUTH_SMTP_NOTE' => nl2br($lang['Auth_smtp_note']), 'L_VALID_BUTTON' => $lang['Button']['valid'], 'L_RESET_BUTTON' => $lang['Button']['reset'], 'LANG_BOX' => lang_box($new_config['language']), 'SITENAME' => htmlspecialchars($new_config['sitename']), 'URLSITE' => $new_config['urlsite'], 'URLSCRIPT' => $new_config['path'], 'DATE_FORMAT' => $new_config['date_format'], 'CHECKED_PROFIL_CP_ON' => $new_config['enable_profil_cp'] ? ' checked="checked"' : '', 'CHECKED_PROFIL_CP_OFF' => !$new_config['enable_profil_cp'] ? ' checked="checked"' : '', 'COOKIE_NAME' => $new_config['cookie_name'], 'COOKIE_PATH' => $new_config['cookie_path'], 'LENGTH_SESSION' => $new_config['session_length'], 'UPLOAD_PATH' => $new_config['upload_path'], 'MAX_FILESIZE' => $new_config['max_filesize'], 'CHECKED_CHECK_EMAIL_ON' => $new_config['check_email_mx'] ? ' checked="checked"' : '', 'CHECKED_CHECK_EMAIL_OFF' => !$new_config['check_email_mx'] ? ' checked="checked"' : '', 'EMAILS_SENDED' => $new_config['emails_sended'], 'CHECKED_USE_SMTP_ON' => $new_config['use_smtp'] ? ' checked="checked"' : '', 'CHECKED_USE_SMTP_OFF' => !$new_config['use_smtp'] ? ' checked="checked"' : '', 'DISABLED_SMTP' => !function_exists('fsockopen') ? ' disabled="disabled"' : '', 'WARNING_SMTP' => !function_exists('fsockopen') ? ' <span style="color: red;">[not available]</span>' : '', 'SMTP_HOST' => $new_config['smtp_host'], 'SMTP_PORT' => $new_config['smtp_port'], 'SMTP_USER' => $new_config['smtp_user'], 'USE_FTP_STATUS' => $new_config['use_ftp'] ? 'true' : 'false', 'USE_SMTP_STATUS' => $new_config['use_smtp'] ? 'true' : 'false')); if (extension_loaded('ftp')) { $output->assign_block_vars('extension_ftp', array('L_USE_FTP' => $lang['Use_ftp'], 'L_FTP_SERVER' => $lang['Ftp_server'], 'L_FTP_SERVER_NOTE' => $lang['Ftp_server_note'], 'L_FTP_PORT' => $lang['Ftp_port'], 'L_FTP_PORT_NOTE' => $lang['Ftp_port_note'], 'L_FTP_PASV' => $lang['Ftp_pasv'], 'L_FTP_PASV_NOTE' => $lang['Ftp_pasv_note'], 'L_FTP_PATH' => $lang['Ftp_path'], 'L_FTP_USER' => $lang['Ftp_user'], 'L_FTP_PASS' => $lang['Ftp_pass'], 'CHECKED_USE_FTP_ON' => $new_config['use_ftp'] ? ' checked="checked"' : '', 'CHECKED_USE_FTP_OFF' => !$new_config['use_ftp'] ? ' checked="checked"' : '', 'CHECKED_FTP_PASV_ON' => $new_config['ftp_pasv'] ? ' checked="checked"' : '', 'CHECKED_FTP_PASV_OFF' => !$new_config['ftp_pasv'] ? ' checked="checked"' : '', 'FTP_SERVER' => $new_config['ftp_server'], 'FTP_PORT' => $new_config['ftp_port'], 'FTP_PATH' => $new_config['ftp_path'], 'FTP_USER' => $new_config['ftp_user'])); } if (Mailer::is_online_host() == false) { $output->assign_block_vars('choice_engine_send', array('L_ENGINE_SEND' => $lang['Choice_engine_send'], 'L_ENGINE_BCC' => $lang['With_engine_bcc'], 'L_ENGINE_UNIQ' => $lang['With_engine_uniq'], 'CHECKED_ENGINE_BCC' => $new_config['engine_send'] == ENGINE_BCC ? ' checked="checked"' : '', 'CHECKED_ENGINE_UNIQ' => $new_config['engine_send'] == ENGINE_UNIQ ? ' checked="checked"' : '')); } if (extension_loaded('gd')) { $output->assign_block_vars('extension_gd', array('TITLE_CONFIG_STATS' => $lang['Title']['config_stats'], 'L_EXPLAIN_STATS' => nl2br($lang['Explain']['config_stats']), 'L_DISABLE_STATS' => $lang['Disable_stats'], 'L_GD_VERSION' => $lang['GD_version'], 'CHECKED_DISABLE_STATS_ON' => $new_config['disable_stats'] ? ' checked="checked"' : '', 'CHECKED_DISABLE_STATS_OFF' => !$new_config['disable_stats'] ? ' checked="checked"' : '', 'SELECTED_GD_PNG' => $new_config['gd_img_type'] == 'png' ? ' selected="selected"' : '', 'SELECTED_GD_GIF' => $new_config['gd_img_type'] == 'gif' ? ' selected="selected"' : '')); } else { $output->addHiddenField('disable_stats', '1'); } $output->addHiddenField('sessid', $session->session_id); $output->assign_var('S_HIDDEN_FIELDS', $output->getHiddenFields()); $output->pparse('body'); $output->page_footer();
$listdata = $auth->read_data($current_admin['admin_id']); } else { $listdata = $auth->listdata; } } else { $current_admin = $admindata; } require WA_ROOTDIR . '/includes/functions.box.php'; $output->addHiddenField('admin_id', $current_admin['admin_id']); $output->addHiddenField('sessid', $session->session_id); if ($admindata['admin_level'] == ADMIN) { $output->addLink('section', './admin.php?mode=adduser', $lang['Add_user']); } $output->page_header(); $output->set_filenames(array('body' => 'admin_body.tpl')); $output->assign_vars(array('L_TITLE' => sprintf($lang['Title']['profile'], htmlspecialchars($current_admin['admin_login'], ENT_NOQUOTES)), 'L_EXPLAIN' => nl2br($lang['Explain']['admin']), 'L_DEFAULT_LANG' => $lang['Default_lang'], 'L_EMAIL' => $lang['Email_address'], 'L_DATEFORMAT' => $lang['Dateformat'], 'L_NOTE_DATE' => sprintf($lang['Fct_date'], '<a href="http://www.php.net/date">', '</a>'), 'L_EMAIL_NEW_SUBSCRIBE' => $lang['Email_new_subscribe'], 'L_EMAIL_UNSUBSCRIBE' => $lang['Email_unsubscribe'], 'L_PASS' => $lang['Password'], 'L_NEW_PASS' => $lang['New_pass'], 'L_CONFIRM_PASS' => $lang['Conf_pass'], 'L_NOTE_PASS' => nl2br($lang['Note_pass']), 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_VALID_BUTTON' => $lang['Button']['valid'], 'L_RESET_BUTTON' => $lang['Button']['reset'], 'LANG_BOX' => lang_box($current_admin['admin_lang']), 'EMAIL' => $current_admin['admin_email'], 'DATEFORMAT' => $current_admin['admin_dateformat'], 'EMAIL_NEW_SUBSCRIBE_YES' => $current_admin['email_new_subscribe'] == SUBSCRIBE_NOTIFY_YES ? ' checked="checked"' : '', 'EMAIL_NEW_SUBSCRIBE_NO' => $current_admin['email_new_subscribe'] == SUBSCRIBE_NOTIFY_NO ? ' checked="checked"' : '', 'EMAIL_UNSUBSCRIBE_YES' => $current_admin['email_unsubscribe'] == UNSUBSCRIBE_NOTIFY_YES ? ' checked="checked"' : '', 'EMAIL_UNSUBSCRIBE_NO' => $current_admin['email_unsubscribe'] == UNSUBSCRIBE_NOTIFY_NO ? ' checked="checked"' : '', 'S_HIDDEN_FIELDS' => $output->getHiddenFields())); if ($admindata['admin_level'] == ADMIN) { $output->assign_block_vars('admin_options', array('L_ADD_ADMIN' => $lang['Add_user'], 'L_TITLE_MANAGE' => $lang['Title']['manage'], 'L_TITLE_OPTIONS' => $lang['Title']['other_options'], 'L_ADMIN_LEVEL' => $lang['User_level'], 'L_LISTE_NAME' => $lang['Liste_name2'], 'L_VIEW' => $lang['View'], 'L_EDIT' => $lang['Edit'], 'L_DEL' => $lang['Button']['delete'], 'L_SEND' => $lang['Button']['send'], 'L_IMPORT' => $lang['Import'], 'L_EXPORT' => $lang['Export'], 'L_BAN' => $lang['Ban'], 'L_ATTACH' => $lang['Attach'], 'L_ADMIN' => $lang['Admin'], 'L_USER' => $lang['User'], 'L_DELETE_ADMIN' => $lang['Del_user'], 'L_NOTE_DELETE' => nl2br($lang['Del_note']), 'SELECTED_ADMIN' => $current_admin['admin_level'] == ADMIN ? ' selected="selected"' : '', 'SELECTED_USER' => $current_admin['admin_level'] == USER ? ' selected="selected"' : '')); foreach ($listdata as $listrow) { $output->assign_block_vars('admin_options.auth', array('LISTE_NAME' => $listrow['liste_name'], 'LISTE_ID' => $listrow['liste_id'], 'BOX_AUTH_VIEW' => $auth->box_auth(AUTH_VIEW, $listrow), 'BOX_AUTH_EDIT' => $auth->box_auth(AUTH_EDIT, $listrow), 'BOX_AUTH_DEL' => $auth->box_auth(AUTH_DEL, $listrow), 'BOX_AUTH_SEND' => $auth->box_auth(AUTH_SEND, $listrow), 'BOX_AUTH_IMPORT' => $auth->box_auth(AUTH_IMPORT, $listrow), 'BOX_AUTH_EXPORT' => $auth->box_auth(AUTH_EXPORT, $listrow), 'BOX_AUTH_BACKUP' => $auth->box_auth(AUTH_BAN, $listrow), 'BOX_AUTH_ATTACH' => $auth->box_auth(AUTH_ATTACH, $listrow))); } if ($admin_box != '') { $output->addHiddenField('sessid', $session->session_id); $output->assign_block_vars('admin_box', array('L_VIEW_PROFILE' => $lang['View_profile'], 'L_BUTTON_GO' => $lang['Button']['go'], 'ADMIN_BOX' => $admin_box, 'S_HIDDEN_FIELDS' => $output->getHiddenFields())); } } if ($current_admin['admin_id'] == $admindata['admin_id']) { $output->assign_block_vars('owner_profil', array()); } $output->pparse('body'); $output->page_footer();