package page.com.jfilerecovery;

import org.wikiwebserver.core.WareHouse;
import org.wikiwebserver.handler.http.interfaces.*;

import page.config.SiteTemplatedPage;

import static org.wikiwebserver.html.HTMLHelper.*;

public class Index extends SiteTemplatedPage implements HTTPResponder {
    
    public void generate() {
        addResourceRoot("/templates/com/jfilerecovery/");
        addCSSLink("jfilerecovery.css"); 
        
        ProgramDetails jfr = new ProgramDetails();
        
        setTitle("JFileRecovery - " + jfr.getDescription80());
        this.setKeywords(jfr.getKeywords());
        
        //String downloadPage = WareHouse.getUrlPathForClass(Download.class);
        String crcPage = WareHouse.getUrlPathForClass(CRCErrors.class);
        
        append(h(1, "What is <i>JFileRecovery</i>?") +
               image("scratched_cd.jpg", "Damaged CD", "align='right'") +
               p(jfr.getDescription450()) +
                 getGoogleAdsenseBlock("pub-7253309958196609", "3266833229", 468, 60) +
               p("Copying large video files from scratched CDs and DVDs often results in CRC" +
                 " errors, aborting the process and making transferring the file impossible." +
                 " JFileRecovery can bypass these " + a(crcPage, "CRC errors") + ", with minimal" +
                 " data loss which may only be noticeable as a single bad frame in the video.") +
               h(1, "How JFileRecovery works") +
               p("<!-- <a target='_blank' href='http://www.shareasale.com/r.cfm?b=177950&u=378675&m=22450&urllink=&afftrack='>" +
                 "<img align='left' src='http://www.shareasale.com/image/200x200safehappy.png' alt='Backed Up Online.   Files Safe.  Happy :)' border='0'>" +
                 "</a> -->" +
                 "JFileRecovery is not based on low level disk reading but on the" +
               	 " observation that damaged areas take longer to read." +
               	 " The multi-threaded design of JFileRecovery makes it possible to abort reads" +
               	 " from slow responding regions and continue the copy process." +
               	 " Additional attempts at recovering bad regions can be made as required.") +
               p("JFileRecovery was developed to recover large video files from CDRs with scratched" +
                 " top surfaces. Blocks of 1KB in size are not noticeable in most video files " +
                 " unless they occur at the very beginning or end of the file.") +
               h(2, "Warning") +
               p("JFileRecovery should not be used to recover executable files. A single error" +
               	 " in an executable file is very serious and could potentially damage your computer.")
        );
        
        String counterUrl = WareHouse.getUrlPathForClass(page.image.Counter.class) + "?size=11&amp;name=JFileRecovery";
        append(image(counterUrl, "Page hits", "id='counterImage' align='right'"));      
    }
}


