* @license GNU GPL2 (or any later version) */ // no direct file access if (count(get_included_files()) == 1) { die(header("Location: ../index.php", TRUE, 301)); } require_once WB_PATH . '/modules/jsadmin/jsadmin.php'; // Check if user selected what add-ons to reload if (isset($_POST['save_settings'])) { if (!$admin->checkFTAN()) { $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $_SERVER['REQUEST_URI']); } // Include functions file save_setting('mod_jsadmin_persist_order', isset($_POST['persist_order'])); save_setting('mod_jsadmin_ajax_order_pages', isset($_POST['ajax_order_pages'])); save_setting('mod_jsadmin_ajax_order_sections', isset($_POST['ajax_order_sections'])); // echo '<div style="border: solid 2px #9c9; background: #ffd; padding: 0.5em; margin-top: 1em">'.$MESSAGE['SETTINGS_SAVED'].'</div>'; // check if there is a database error, otherwise say successful if ($database->is_error()) { $admin->print_error($database->get_error(), $js_back); } else { $admin->print_success($MESSAGE['PAGES_SAVED'], ADMIN_URL . '/admintools/tool.php?tool=jsadmin'); } } else { // Display form $persist_order = get_setting('mod_jsadmin_persist_order', true) ? 'checked="checked"' : ''; $ajax_order_pages = get_setting('mod_jsadmin_ajax_order_pages', true) ? 'checked="checked"' : ''; $ajax_order_sections = get_setting('mod_jsadmin_ajax_order_sections', true) ? 'checked="checked"' : ''; // THIS ROUTINE CHECKS THE EXISTING OFF ALL NEEDED YUI FILES $YUI_ERROR = false; // ist there an Error
@unlink($clean_file); } } } if (is_dir(IL_TEMP_PATH . DIRECTORY_SEPARATOR . 'lib_' . $oldsession['sessionID'])) { rmdir(IL_TEMP_PATH . DIRECTORY_SEPARATOR . 'lib_' . $oldsession['sessionID']); } } $result = null; $dbHandle->query("DELETE FROM logins WHERE" . " sessionID!={$session_id_q} AND userID={$user_id_q}"); } // Cookie time out. if (isset($_POST['keepsigned']) && $_POST['keepsigned'] == 1) { $keepsigned = 1; save_setting($dbHandle, 'keepsigned', '1'); setcookie(session_name(), session_id(), time() + 604800); } else { save_setting($dbHandle, 'keepsigned', ''); setcookie(session_name(), session_id(), 0); } $result = $dbHandle->query("SELECT setting_name as n, setting_value as v FROM settings" . " WHERE userID= '' OR userID={$user_id_q}"); while ($setting = $result->fetch(PDO::FETCH_ASSOC)) { $_SESSION[$setting['n']] = htmlspecialchars($setting['v']); } $result = null; // Create user specific temp directory. @mkdir(IL_TEMP_PATH . DIRECTORY_SEPARATOR . 'lib_' . session_id()); if (!isset($ini_array['autosign']) || $ini_array['autosign'] != 1) { die('OK'); } }
if (isset($settings['cor_secundaria'])) { $value = "'" . $settings['cor_secundaria'] . "'"; save_setting('cor_secundaria', $value); } // Label Plurar Noticias if (isset($settings['noticia_singular'])) { $value = "'" . $settings['noticia_singular'] . "'"; save_setting('noticia_singular', $value); } if (isset($settings['noticia_plural'])) { $value = "'" . $settings['noticia_plural'] . "'"; save_setting('noticia_plural', $value); } // Singular Eventos if (isset($settings['evento_singular'])) { $value = "'" . $settings['evento_singular'] . "'"; save_setting('evento_singular', $value); } // Plural Eventos if (isset($settings['evento_plural'])) { $value = "'" . $settings['evento_plural'] . "'"; save_setting('evento_plural', $value); } //Lingua Website if (isset($settings['language'])) { $value = "'" . $settings['language'] . "'"; save_setting('language', $value); } $app->redirect('./defenicoes'); }); $app->run();
$file = $lit->key(); if (is_file($file)) { $required_space += filesize($file); $f_number++; } $lit->next(); } } else { if (!is_dir($directory)) { $is_dir = @mkdir($directory); } else { $is_dir = true; } if ($is_dir && is_writable($directory)) { database_connect(IL_USER_DATABASE_PATH, 'users'); save_setting($dbHandle, 'backup_dir', $directory); $dbHandle = null; // Create folders. $lit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(IL_LIBRARY_PATH)); while ($lit->valid()) { $dir = $lit->key(); if (is_dir($dir)) { $path_to = str_replace(IL_LIBRARY_PATH, $directory, $dir); if (!is_dir($path_to)) { mkdir($path_to); } } $lit->next(); } // Copy files. $lit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(IL_LIBRARY_PATH));
$database_pubmed = $_GET['database_pubmed']; } if (isset($_GET['database_nasaads'])) { $database_nasaads = $_GET['database_nasaads']; } if (isset($_GET['database_crossref'])) { $database_crossref = $_GET['database_crossref']; } if (isset($_GET['failed'])) { $failed = $_GET['failed']; } database_connect($usersdatabase_path, 'users'); save_setting($dbHandle, 'batchimport_database_pubmed', $database_pubmed); save_setting($dbHandle, 'batchimport_database_nasaads', $database_nasaads); save_setting($dbHandle, 'batchimport_database_crossref', $database_crossref); save_setting($dbHandle, 'batchimport_failed', $failed); $dbHandle = null; $user_dir = $temp_dir . DIRECTORY_SEPARATOR . 'lib_' . session_id(); session_write_close(); $stopwords = "a's, able, about, above, according, accordingly, across, actually, after, afterwards, again, against, ain't, all, allow, allows, almost, alone, along, already, also, although, always, am, among, amongst, an, and, another, any, anybody, anyhow, anyone, anything, anyway, anyways, anywhere, apart, appear, appreciate, appropriate, are, aren't, around, as, aside, ask, asking, associated, at, available, away, awfully, be, became, because, become, becomes, becoming, been, before, beforehand, behind, being, believe, below, beside, besides, best, better, between, beyond, both, brief, but, by, c'mon, c's, came, can, can't, cannot, cant, cause, causes, certain, certainly, changes, clearly, co, com, come, comes, concerning, consequently, consider, considering, contain, containing, contains, corresponding, could, couldn't, currently, definitely, described, despite, did, didn't, different, do, does, doesn't, doing, don't, done, down, during, each, edu, eg, either, else, elsewhere, enough, entirely, especially, et, etc, even, ever, every, everybody, everyone, everything, everywhere, ex, exactly, example, except, far, few, followed, following, follows, for, former, formerly, from, further, furthermore, get, gets, getting, given, gives, go, goes, going, gone, got, gotten, greetings, had, hadn't, happens, hardly, has, hasn't, have, haven't, having, he, he's, hello, help, hence, her, here, here's, hereafter, hereby, herein, hereupon, hers, herself, hi, him, himself, his, hither, hopefully, how, howbeit, however, i'd, i'll, i'm, i've, ie, if, in, inasmuch, inc, indeed, indicate, indicated, indicates, inner, insofar, instead, into, inward, is, isn't, it, it'd, it'll, it's, its, itself, just, keep, keeps, kept, know, knows, known, last, lately, later, latter, latterly, least, less, lest, let, let's, like, liked, likely, little, look, looking, looks, ltd, mainly, many, may, maybe, me, mean, meanwhile, merely, might, more, moreover, most, mostly, much, must, my, myself, name, namely, nd, near, nearly, necessary, need, needs, neither, never, nevertheless, new, next, no, nobody, non, none, noone, nor, normally, not, nothing, novel, now, nowhere, obviously, of, off, often, oh, ok, okay, old, on, once, ones, only, onto, or, other, others, otherwise, ought, our, ours, ourselves, out, outside, over, overall, own, particular, particularly, per, perhaps, placed, please, possible, presumably, probably, provides, que, quite, qv, rather, rd, re, really, reasonably, regarding, regardless, regards, relatively, respectively, right, said, same, saw, say, saying, says, secondly, see, seeing, seem, seemed, seeming, seems, seen, self, selves, sensible, sent, serious, seriously, several, shall, she, should, shouldn't, since, so, some, somebody, somehow, someone, something, sometime, sometimes, somewhat, somewhere, soon, sorry, specified, specify, specifying, still, sub, such, sup, sure, t's, take, taken, tell, tends, th, than, thank, thanks, thanx, that, that's, thats, the, their, theirs, them, themselves, then, thence, there, there's, thereafter, thereby, therefore, therein, theres, thereupon, these, they, they'd, they'll, they're, they've, think, this, thorough, thoroughly, those, though, through, throughout, thru, thus, to, together, too, took, toward, towards, tried, tries, truly, try, trying, twice, un, under, unfortunately, unless, unlikely, until, unto, up, upon, us, use, used, useful, uses, using, usually, value, various, very, via, viz, vs, want, wants, was, wasn't, way, we, we'd, we'll, we're, we've, welcome, well, went, were, weren't, what, what's, whatever, when, whence, whenever, where, where's, whereafter, whereas, whereby, wherein, whereupon, wherever, whether, which, while, whither, who, who's, whoever, whole, whom, whose, why, will, willing, wish, with, within, without, won't, wonder, would, would, wouldn't, yes, yet, you, you'd, you'll, you're, you've, your, yours, yourself, yourselves"; $stopwords = explode(', ', $stopwords); $patterns = join("\\b/ui /\\b", $stopwords); $patterns = "/\\b{$patterns}\\b/ui"; $patterns = explode(" ", $patterns); $order = array("\r\n", "\n", "\r"); $i = 0; if (isset($_FILES['Filedata']) && is_uploaded_file($_FILES['Filedata']['tmp_name'])) { $file = $_FILES['Filedata']['tmp_name']; $orig_filename = $_FILES['Filedata']['name']; $i = $i + 1; if (is_readable($file)) {
$proxy_username = $_SESSION['proxy_username']; } if (isset($_SESSION['proxy_password'])) { $proxy_password = $_SESSION['proxy_password']; } } $user_id = intval($_SESSION['user_id']); include_once 'functions.php'; $error = ''; if (isset($_POST['file'])) { $_GET['file'] = $_POST['file']; } ########## reference updating ########## if (isset($_POST['autoupdate'])) { database_connect(IL_USER_DATABASE_PATH, 'users'); save_setting($dbHandle, 'autoupdate_database', $_POST['database']); $dbHandle = null; session_write_close(); $doi = ''; $nasa_id = ''; $arxiv_id = ''; $pmid = ''; $ieee_id = ''; if (!empty($_POST['doi'])) { $doi = trim($_POST['doi']); if (stripos($doi, 'doi:') === 0) { $doi = trim(substr($doi, 4)); } if (stripos($doi, 'http') === 0) { $doi = trim(substr(parse_url($doi, PHP_URL_PATH), 1)); }
############################################################################################ case 'addnews': $uid = !empty($_GET['uid']) ? check($_GET['uid']) : 0; $msg = isset($_POST['msg']) ? check($_POST['msg']) : ''; $title = isset($_POST['title']) ? check($_POST['title']) : ''; $top = empty($_POST['top']) ? 0 : 1; $closed = empty($_POST['closed']) ? 0 : 1; $validation = new Validation(); $validation->addRule('equal', array($uid, $_SESSION['token']), 'Неверный идентификатор сессии, повторите действие!')->addRule('string', $title, 'Слишком длинный или короткий заголовок события!', true, 5, 50)->addRule('string', $msg, 'Слишком длинный или короткий текст события!', true, 5, 10000); if ($validation->run()) { DB::run()->query("INSERT INTO `news` (`news_title`, `news_text`, `news_author`, `news_time`, `news_comments`, `news_closed`, `news_top`) VALUES (?, ?, ?, ?, ?, ?, ?);", array($title, $msg, $log, SITETIME, 0, $closed, $top)); $lastid = DB::run()->lastInsertId(); // Выводим на главную если там нет новостей if (!empty($top) && empty($config['lastnews'])) { DB::run()->query("UPDATE `setting` SET `setting_value`=? WHERE `setting_name`=?;", array(1, 'lastnews')); save_setting(); } // ---------------------------- Загрузка изображения -------------------------------// if (is_uploaded_file($_FILES['image']['tmp_name'])) { $handle = upload_image($_FILES['image'], $config['filesize'], $config['fileupfoto'], $lastid); if ($handle) { $handle->process(BASEDIR . '/upload/news/'); if ($handle->processed) { DB::run()->query("UPDATE `news` SET `news_image`=? WHERE `news_id`=? LIMIT 1;", array($handle->file_dst_name, $lastid)); $handle->clean(); } else { notice($handle->error, 'danger'); redirect("news.php?act=edit&id={$lastid}"); } } }
} if (isset($_GET['database_crossref'])) { $database_crossref = $_GET['database_crossref']; } if (isset($_GET['failed'])) { $failed = $_GET['failed']; } if (isset($_GET['log'])) { $batchimport_log = $_GET['log']; } database_connect($usersdatabase_path, 'users'); save_setting($dbHandle, 'batchimport_database_pubmed', $database_pubmed); save_setting($dbHandle, 'batchimport_database_nasaads', $database_nasaads); save_setting($dbHandle, 'batchimport_database_crossref', $database_crossref); save_setting($dbHandle, 'batchimport_failed', $failed); save_setting($dbHandle, 'batchimport_log', $batchimport_log); $dbHandle = null; $user_dir = $temp_dir . DIRECTORY_SEPARATOR . 'lib_' . session_id(); session_write_close(); include_once 'functions.php'; if (substr($_GET['directory'], -1) == DIRECTORY_SEPARATOR) { $_GET['directory'] = substr($_GET['directory'], 0, -1); } $files = array(); $lit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($_GET['directory']), RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD); $lit->rewind(); while ($lit->valid()) { $file = $lit->key(); if (is_readable($file) && pathinfo($file, PATHINFO_EXTENSION) == 'pdf') { $files[] = $file; }
<div class="alternating_row items ui-corner-bottom"> <button id="batchimportbutton"><i class="fa fa-save"></i> Import</button> </div> </form> </div> <?php } else { if (substr($_GET['directory'], -1) == DIRECTORY_SEPARATOR) { $_GET['directory'] = substr($_GET['directory'], 0, -1); } database_connect(IL_USER_DATABASE_PATH, 'users'); save_setting($dbHandle, 'batchimport_dir', $_GET['directory']); if (isset($_GET['recursive'])) { save_setting($dbHandle, 'batchimport_recursive', $_GET['recursive']); } else { save_setting($dbHandle, 'batchimport_recursive', ''); } $dbHandle = null; $batchimport_database_pubmed = get_setting('batchimport_database_pubmed'); $batchimport_database_nasaads = get_setting('batchimport_database_nasaads'); $batchimport_database_crossref = get_setting('batchimport_database_crossref'); $batchimport_failed = get_setting('batchimport_failed'); $batchimport_log = get_setting('batchimport_log'); $pdf_files = array(); if (isset($_GET['recursive'])) { $lit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($_GET['directory']), RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD); $lit->rewind(); while ($lit->valid()) { $file = $lit->key(); if (is_readable($file) && in_array(pathinfo($file, PATHINFO_EXTENSION), array('pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp'))) { $pdf_files[] = $file;