Changeset 801 for trunk/picture.php
- Timestamp:
- Jul 16, 2005, 4:29:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r774 r801 343 343 or $conf['anti-flood_time'] == 0 ) 344 344 { 345 $query = 'INSERT INTO '.COMMENTS_TABLE; 346 $query.= ' (author,date,image_id,content,validated) VALUES ('; 347 $query.= "'".$author."'"; 348 $query.= ',NOW(),'.$_GET['image_id']; 349 $query.= ",'".htmlspecialchars( $_POST['content'], ENT_QUOTES)."'"; 350 if ( !$conf['comments_validation'] or $user['status'] == 'admin' ) 351 { 352 $query.= ",'true'"; 345 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();')); 346 347 $data = array(); 348 $data{'author'} = $author; 349 $data{'date'} = $dbnow; 350 $data{'image_id'} = $_GET['image_id']; 351 $data{'content'} = htmlspecialchars( $_POST['content'], ENT_QUOTES); 352 353 if (!$conf['comments_validation'] or $user['status'] == 'admin') 354 { 355 $data{'validated'} = 'true'; 356 $data{'validation_date'} = $dbnow; 353 357 } 354 358 else 355 359 { 356 $ query.= ",'false'";360 $data{'validated'} = 'false'; 357 361 } 358 $query.= ');'; 359 pwg_query( $query ); 362 363 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 364 $fields = array('author', 'date', 'image_id', 'content', 'validated', 365 'validation_date'); 366 mass_inserts(COMMENTS_TABLE, $fields, array($data)); 367 360 368 // information message 361 369 $message = $lang['comment_added']; 370 371 if (!$conf['comments_validation'] or $user['status'] == 'admin') 372 362 373 if ( $conf['comments_validation'] and $user['status'] != 'admin' ) 363 374 { … … 480 491 481 492 // date of availability 482 $availability_date = format_date($picture['current']['date_available']); 493 $availability_date = format_date($picture['current']['date_available'], 494 'mysql_datetime'); 483 495 484 496 // size in pixels
Note: See TracChangeset
for help on using the changeset viewer.