MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * Provide a spreadsheet report of all the files * */ // check for session and $_REQUEST['id'] session_start(); include '../odm-load.php'; if (!isset($_SESSION['uid'])) { redirect_visitor('../index.php?redirection=reports/file_list.php'); } // open a connection to the database $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); // Check to see if user is admin if (!$user_obj->isAdmin()) { header('Location:../error.php?ec=4'); exit; } function cleanExcelData(&$str) { if (strstr($str, '"')) { $str = '"' . str_replace('"', '""', $str) . '"'; } $str = mb_convert_encoding($str, 'UTF-16LE', 'UTF-8'); }
of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // check session and $id session_start(); include 'odm-load.php'; if (!isset($_SESSION['uid'])) { redirect_visitor(); } $last_message = isset($_REQUEST['last_message']) ? $_REQUEST['last_message'] : ''; if (!isset($_REQUEST['id']) || $_REQUEST['id'] == '') { header('Location:error.php?ec=2'); exit; } draw_header(msg('area_view_history'), $last_message); //revision parsing if (strchr($_REQUEST['id'], '_')) { list($_REQUEST['id'], $revision_id) = explode('_', $_REQUEST['id']); } $datafile = new FileData($_REQUEST['id'], $pdo); // verify if ($datafile->getError() != null) { header('Location:error.php?ec=2');
along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // check for valid session and $id session_start(); include 'odm-load.php'; if (!isset($_SESSION['uid'])) { redirect_visitor(); } require_once "AccessLog_class.php"; require_once "File_class.php"; require_once 'Email_class.php'; require_once 'Reviewer_class.php'; $user_obj = new User($_SESSION['uid'], $GLOBALS['connection'], DB_NAME); if (!$user_obj->canCheckIn()) { redirect_visitor('out.php'); } $last_message = isset($_REQUEST['last_message']) ? $_REQUEST['last_message'] : ''; if (!isset($_REQUEST['id']) || $_REQUEST['id'] == '') { $last_message = 'Failed'; header('Location:error.php?ec=2&last_message=' . urlencode($last_message)); exit; } // includes // open connection if (!isset($_POST['submit'])) { // form not yet submitted, display initial form // pre-fill the form with some information so that user knows which file is being updated $query = "SELECT description, realname FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE id = '{$_REQUEST['id']}' AND status = '{$_SESSION['uid']}'"; $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: {$query}. " . mysql_error()); // in case script is directly accessed, query above will return 0 rows