public static function form_saisie($user, $date_debut, $date_fin) { $PHP_SELF = $_SERVER['PHP_SELF']; $session = session_id(); $date_today = date("d-m-Y"); if ($date_debut == "") { $date_debut = $date_today; } if ($date_fin == "") { $date_fin = $date_today; } $huser = hash_user($user); header_popup(); echo "<center>\n"; echo "<h1>" . _('export_cal_titre') . "</h1>\n"; echo _('button_export_2') . "<br>"; echo " <a href='" . ROOT_PATH . "export/ics_export.php?usr="******"'>" . $_SESSION['config']['URL_ACCUEIL_CONGES'] . "/export/ics_export.php?usr="******"<a>"; bottom(); }
echo '<li><input type="checkbox" ' . $class . ' id="check_' . $login . '" value="' . $login . '" name="users[]"' . $check . '><label for="check_' . $login . '">' . $login . '</label></li>'; } } else { echo '<li class="empty">' . e('The users list is empty', false) . '</li>'; } exit; } // essayer de s'identifier ou de se déconnecter ? => auto_restrict if (!empty($_POST['pass']) && !empty($_POST['login']) || isset($_GET['logout']) || isset($_GET['deconnexion'])) { require_once __DIR__ . '/auto_restrict.php'; exit; } // afficher les statistiques en RSS if (isset($_GET['statrss']) && !empty($_GET['key']) && hash_user($_GET['key'])) { $rss = ['infos' => '', 'items' => '']; $rss['infos'] = ['title' => 'ShareMe - stats', 'description' => e('Rss feed of stats', false), 'link' => htmlentities($_SESSION['home'])]; include_once 'core/Array2feed.php'; $stats = load($_SESSION['stats_file']); for ($index = 0; $index < $_SESSION['stats_max_lines']; $index++) { if (!empty($stats[$index])) { $rss['items'][] = ['title' => $stats[$index]['file'], 'description' => '[ip:' . $stats[$index]['ip'] . '] ' . '[referrer:' . $stats[$index]['referrer'] . '] ' . '[host:' . $stats[$index]['host'] . '] ', 'pubDate' => makeRSSdate($stats[$index]['date']), 'link' => $_SESSION['home'] . '?f=' . $stats[$index]['id'], 'guid' => $_SESSION['home'] . '?f=' . $stats[$index]['id']]; } } array2feed($rss); exit; } // afficher les statistiques en Json if (isset($_GET['statjson']) && !empty($_GET['key']) && hash_user($_GET['key'])) { $stats = load($_SESSION['stats_file']); exit(json_encode($stats)); }
} # Current session changing theme if (!empty($_GET['theme'])) { $_SESSION['theme'] = $_GET['theme']; header('location:index.php?p=' . $page . '&token=' . returnToken()); } if (empty($_SESSION['theme'])) { $_SESSION['theme'] = $default_theme; } if (empty($_SESSION['mode'])) { $_SESSION['mode'] = $default_mode; } # SESSION VARS # Upload paths if (empty($_SESSION['api_rss_key']) && !empty($_SESSION['login'])) { $_SESSION['api_rss_key'] = hash_user($_SESSION['login']); } if (empty($_SESSION['upload_root_path'])) { $_SESSION['upload_root_path'] = addslash_if_needed($default_path); } if (empty($_SESSION['upload_user_path']) && !empty($_SESSION['login'])) { $_SESSION['upload_user_path'] = $_SESSION['login'] . '/'; } if (!is_dir($_SESSION['upload_root_path'])) { mkdir($_SESSION['upload_root_path'], 0744, true); } if (!empty($_SESSION['upload_user_path']) && !is_dir($_SESSION['upload_root_path'] . $_SESSION['upload_user_path'])) { mkdir($_SESSION['upload_root_path'] . $_SESSION['upload_user_path'], 0744, true); } if (!is_file($_SESSION['upload_root_path'] . 'index.html')) { file_put_contents($_SESSION['upload_root_path'] . 'index.html', ' ');