Ignore:
Timestamp:
02/27/2006 12:50:42 AM (6 years ago)
Author:
cirrus
Message:

Change: $root_path variable was changed to a constant due to possible security issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/pages/mynodes/mynodes.php

    r141 r143  
    2020 */ 
    2121 
    22 if (get('subpage') != '') include_once($root_path."includes/pages/mynodes/mynodes_".get('subpage').".php"); 
     22if (get('subpage') != '') include_once(ROOT_PATH."includes/pages/mynodes/mynodes_".get('subpage').".php"); 
    2323 
    2424class mynodes { 
     
    493493         
    494494        function output_onpost_table_photosview() { 
    495                 global $root_path, $vars, $db, $main; 
     495                global $vars, $db, $main; 
    496496                foreach( (array) $_POST['id'] as $key => $value) { 
    497497                        $db->del("photos", "id = '".$value."'"); 
    498498                        $uploaddir = $vars['folders']['photos']; 
    499499                        $filename = 'photo-'.$value.".*"; 
    500                         delfile($root_path.$uploaddir.$filename); 
     500                        delfile(ROOT_PATH.$uploaddir.$filename); 
    501501                        $filename = 'photo-'.$value."-*.*"; 
    502                         delfile($root_path.$uploaddir.$filename); 
     502                        delfile(ROOT_PATH.$uploaddir.$filename); 
    503503                } 
    504504                foreach( (array) array('N','NE','E','SE','S','SW','W','NW', 'PANORAMIC') as $value) { 
     
    510510                                $filename = 'photo-'.$ins_id.'.jpg'; 
    511511                                $filename_s = 'photo-'.$ins_id.'-s.jpg'; 
    512                                 if (@move_uploaded_file($_FILES[$value]['tmp_name'], $root_path.$uploaddir.$filename) === FALSE) { 
     512                                if (@move_uploaded_file($_FILES[$value]['tmp_name'], ROOT_PATH.$uploaddir.$filename) === FALSE) { 
    513513                                        $db->del("photos", "id = '".$ins_id."'"); 
    514514                                        $main->message->set_fromlang("error", "upload_file_failed"); 
     
    516516                                } 
    517517                                if ($value == 'PANORAMIC') { 
    518                                         $image_s = resizeJPG($root_path.$uploaddir.$filename, 600, 200); 
     518                                        $image_s = resizeJPG(ROOT_PATH.$uploaddir.$filename, 600, 200); 
    519519                                } else { 
    520                                         $image_s = resizeJPG($root_path.$uploaddir.$filename, 200, 200); 
     520                                        $image_s = resizeJPG(ROOT_PATH.$uploaddir.$filename, 200, 200); 
    521521                                } 
    522                                 imagejpeg($image_s, $root_path.$uploaddir.$filename_s); 
     522                                imagejpeg($image_s, ROOT_PATH.$uploaddir.$filename_s); 
    523523                        } elseif ($_POST['info-'.$value] != '') { 
    524524                                $db->set("photos", array('info' => $_POST['info-'.$value]), "node_id = ".intval(get('node'))." AND view_point = '".$value."'"); 
Note: See TracChangeset for help on using the changeset viewer.