$value) { sb_tb_ping ( $ad_array[$name], $_POST[ 'title' ], $_POST[ 'permalink' ], $_POST[ 'excerpt' ] ); } redirect_to_url( 'index.php' ); } } } else { // ------------- // ADD / EDIT ENTRY // ------------- global $auto_discovery_confirm; // If editing an entry, store old entry date... $temp_date = substr($_POST['entry'],-13,6); $temp_time = substr($_POST['entry'],-6,6); $dd = substr($temp_date,-2,2); $mt = substr($temp_date,-4,2); $yy = substr($temp_date,-6,2); if ($yy >= 95) { $yy = '19' . $yy; } else { $yy = '20' . $yy; } $hh = substr($temp_time,-6,2); $mm = substr($temp_time,-4,2); $ss = substr($temp_time,-2,2); $oldtime = mktime($hh, $mm, $ss, $mt, $dd, $yy ); $newtime = mktime($_POST['hour'], $_POST['minute'], $_POST['second'], $_POST['month'], $_POST['day'], $_POST['year'] ); $ok = false; if ( $oldtime != $newtime ) { // Different date $entry = 'content/'.$_POST['y'].'/'.$_POST['m'].'/'.$_POST['entry']; if ( file_exists( $entry . ".txt" ) ) { $filename = $entry . ".txt"; } elseif ( file_exists( $entry . ".txt.gz" ) ) { $filename = $entry . ".txt.gz"; } // Move Assoicated Files move_entry($oldtime,$newtime); // Create New Entry $ok = write_entry( sb_stripslashes( $_POST[ 'blog_subject' ] ), sb_stripslashes( $_POST[ 'blog_text' ] ), sb_stripslashes( $_POST[ 'tb_ping' ] ), NULL, $_POST[ 'catlist' ], sb_stripslashes( $_POST[ 'blog_relatedlink' ] ), $newtime ); // Delete Old Entry sb_delete_file($filename); } else { $entry = 'content/'.$_POST['y'].'/'.$_POST['m'].'/'.$_POST['entry']; // Update Entry $ok = write_entry( sb_stripslashes( $_POST[ 'blog_subject' ] ), sb_stripslashes( $_POST[ 'blog_text' ] ), sb_stripslashes( $_POST[ 'tb_ping' ] ), $entry, $_POST[ 'catlist' ], sb_stripslashes( $_POST[ 'blog_relatedlink' ] ), $oldtime ); } if ( $ok === true ) { if( strlen($auto_discovery_confirm[ 'text' ]) > 0 ) { // Find the trackback URLs $ad_array = trackback_autodiscover( $auto_discovery_confirm[ 'text' ] ); // Is there anything to be confirmed? if ( is_array( $ad_array ) ) { if ( count( $ad_array ) === 0 ) { redirect_to_url( 'index.php' ); } } else { redirect_to_url( 'index.php' ); } } else { redirect_to_url( 'index.php' ); } } } ?> <?php echo($blog_config[ 'blog_title' ]); ?> - <?php echo( $lang_string[ 'title' ] ); ?> ' ); } else { echo( $lang_string[ 'success' ] . '

' ); } echo( '' . $lang_string[ 'home' ] . '

' ); } else { // Display Trackback confirmation. ?>


"; for ( $k = 0; $k < count( $ad_array ); $k++ ) { echo "\n"; echo "" . $ad_array[$k]; echo "\n"; echo "\n"; } echo "
\n"; } ?>