0) { $time = $closedays * (24*60*60); } elseif ($closehours > 9 && $closedays == 0) { $time = $closehours * (60*60); } $time = time() - $time; $time = date('Y-m-d h:i:s', $time); //echo $time; mysql_query("UPDATE mt_entry SET entry_allow_comments = 2 WHERE entry_blog_id = " . $weblogid . " AND entry_allow_comments = 1 AND entry_created_on < '$time'") or die('MySQL error ' . mysql_errno() . ' - ' . mysql_error()); if ($nooutput == 0) { echo 'Entries updated successfully. If you have the comment posting form on static pages, you will need to rebuild all entries to remove the comment form from them.
'; } //echo mysql_affected_rows(); mysql_close(); exit; ?>