Changeset 187 for trunk/includes/pages/mynodes/mynodes.php
- Timestamp:
- 12/10/2008 04:45:22 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/includes/pages/mynodes/mynodes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/pages/mynodes/mynodes.php
r152 r187 307 307 unset($p); 308 308 } 309 if ( $table_photosview->data[$p]['view_point'] == $value) {309 if (isset($p) && ($table_photosview->data[$p]['view_point'] == $value)) { 310 310 $table_photosview->data[$p]['photo'] = $vars['folders']['photos'].'photo-'.$table_photosview->data[$p]['id'].'-s.jpg'; 311 311 $t[$i] = $table_photosview->data[$p]; … … 324 324 function output() { 325 325 if (get('subpage') != '') return $this->page->output(); 326 if ( strstr($_POST['form_name'], 'table_links_ap') !== FALSE) return $this->output_onpost_table_links_ap();326 if (isset($_POST['form_name']) && (strstr($_POST['form_name'], 'table_links_ap') !== FALSE)) return $this->output_onpost_table_links_ap(); 327 327 if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_'.$_POST['form_name'])) return call_user_func(array($this, 'output_onpost_'.$_POST['form_name'])); 328 328 global $construct, $main, $db; … … 539 539 function output_onpost_table_photosview() { 540 540 global $vars, $db, $main; 541 foreach( (array) $_POST['id'] as $key => $value) { 542 $db->del("photos", "id = '".$value."'"); 543 $uploaddir = $vars['folders']['photos']; 544 $filename = 'photo-'.$value.".*"; 545 delfile(ROOT_PATH.$uploaddir.$filename); 546 $filename = 'photo-'.$value."-*.*"; 547 delfile(ROOT_PATH.$uploaddir.$filename); 541 if (isset($_POST['id'])) { 542 foreach( (array) $_POST['id'] as $key => $value) { 543 $db->del("photos", "id = '".$value."'"); 544 $uploaddir = $vars['folders']['photos']; 545 $filename = 'photo-'.$value.".*"; 546 delfile(ROOT_PATH.$uploaddir.$filename); 547 $filename = 'photo-'.$value."-*.*"; 548 delfile(ROOT_PATH.$uploaddir.$filename); 549 } 548 550 } 549 551 foreach( (array) array('N','NE','E','SE','S','SW','W','NW', 'PANORAMIC') as $value) { 550 if ( $_FILES[$value]['tmp_name'] != '') {551 if ( @!imagecreatefromjpeg($_FILES[$value]['tmp_name'])) continue;552 if (isset($_FILES[$value]['tmp_name'])) { 553 if (!imagecreatefromjpeg($_FILES[$value]['tmp_name'])) continue; 552 554 $db->add("photos", array('node_id' => intval(get('node')), 'type' => 'view', 'view_point' => $value, 'info' => $_POST['info-'.$value])); 553 555 $ins_id = $db->insert_id;
Note: See TracChangeset
for help on using the changeset viewer.
