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 UserReviews extends SiteTemplatedPage implements HTTPResponder {
    
    public void generate() {
        addResourceRoot("/templates/com/jfilerecovery/");
        addCSSLink("jfilerecovery.css"); 
        
        setTitle("User reviews - JFileRecovery");
        this.addCSSLink("/templates/com/jfilerecovery/jfilerecovery.css");
        
        append(h(1, "User reviews of JFileRecovery") +
               p("JFileRecovery has helped thousands of users copy data from" +
                 " damaged hard disk drives, CDs, DVDs, and flash media. The" +
                 " following user reviews emphasize how effective JFileRecovery" +
                 " is at recovering damaged data.") +
                 getGoogleAdsenseBlock("pub-7253309958196609", "3210466396", 728, 90));
        
        for (int i=0; i<testimonials.length; i++) {
            append(getTestimonial(i));
        }
    }
    
    private String getTestimonial(int index) {
        String author = testimonials[index][0];
        String review = testimonials[index][1];
        
        String downloadPage = WareHouse.getUrlPathForClass(Download.class);
        review = review.replaceAll("JFileRecovery", a(downloadPage, "JFileRecovery"));
        
        return div(ContainerType.CLASS, "entry", 
                   div(ContainerType.CLASS, "author", author) +
                   div(ContainerType.CLASS, "review", review)) + cleardiv();
    }
  
    
    private static final String[][] testimonials = {
        
        { "Sam Brown",
        "This little utility does 1 thing, and does it very well. It&apos;s great for recovering" +
        " video files from a DVD that has physical damage. Extremely small and very useful;" +
        " it should be in everyones utility toolkit. " },
        
        { "Dan Mejak, Columbus",
        "I had my hard drive in my Powerbook crash. The Apple Store was able" +
        " to retrieve some files, including my Microsoft Entourage Database" +
        " onto a DVD. Unfortunately, the database was damaged, and I could not" +
        " transfer it to my other Mac. JFileRecovery rebuilt much of the file and" +
        " successfully transferred it to my desktop computer. Microsoft&apos;s database" +
        " rebuild program did the rest. The ENTIRE database is intact again!" +
        " Thank You!" },
        
        { "Todd Hlavacek",
        "I burn backups to DVDs on a monthly basis. Every single DVD was verified and" +
        " tested immediately after each backup to ensure data integrity is intact." +
        " One day, a backup was required and lo and behold, the latest DVD had a cyclic" +
        " redundancy error. That one particular file was a 200 MB file that was essential" +
        " to the system that was being restored. After looking online for days for an" +
        " utility that would restore the data regardless of the bad data block where the" +
        " CRC error occurred, I came across this utility. Man, I didn&apos;t know what to expect..." +
        " After I ran it, I got every bit of that 200 MB file except 32 KB. The system that" +
        " I had was happy. :) Needless to say, this utility is a lifesaver and I most certainly" +
        " will use this should my DVDs become bad again in the future. Thank you! " },
        
        { "CasperGG",
        "This utility got the corrupt PST of 1.5GB that I needed to move to another drive (which" +
        " wouldn&apos;t due to CRC error) fixed. " },
        
        { "Sree Ganesh",  
        "I had some video files from my DVD Camera which I could not copy because of a CRC Error." +
        " After I installed JFileRecovery the application recovered my file to the extent that was" +
        " possible. I am very much delighted. Thanks " },
        
        { "JPittner",
        "JFileRecovery recovered files with multiple CRC read errors replacing damaged content" +
        " with empty areas. Results were excellent, recommend. " },
        
        { "Abernstein",
        "I was so happy to find this. My husband finally convinced me to switch to an iPod so our" +
        " music could be compatible and I wouldn&apos;t have issues with converting files, but when I" +
        " synced the iPod the first time, it corrupted a whole bunch of my music files. I was" +
        " having nightmares of getting all my CDs out of storage and re-ripping them! People have" +
        " posted some really complicated fixes but this was so simple and worked perfectly! " +
        " Thanks again." },
        
        { "Bill",   
        "This program successfully recovered a file from a DVD when no other program could." },
        
        { "Steve",
        "G&apos;day from downunder where your JFileRecovery software saved my life - well, slight" +
        " exaggeration but it did indeed recover a most precious Photoshop .psd file and," +
        " although part of one layer was corrupt, it still recovered the remaining layers" +
        " intact and the job was saved! Thanks Michael and I&apos;ll be sure to drop by again" +
        " when your donation page is operational." },      
        
        { "Vinay V",
        "Great program.. Very simple & does what it says. I was unable to copy a file because" +
        " of some bad sectors. JFileRecovery receovered it in seconds!" },
        
        { "PWPP",
        "Helped recover a large image file with CRC error easily and quickly." },
        
        { "Anon",
        "Migrated all users from one dying server with bad hard drive to a new server, however" +
        " one user&apos;s mail database had CRC errors. I guess this is where the bad areas of the" +
        " hard drive were. I had to use the standalone version of JFileRecovery as I couldn&apos;t connect" +
        " to the Internet and the product worked flawlessly. The user&apos;s mail file had a 1% error" +
        " but this was good enough for her to continue using it. Excellent product, highly" +
        " recommended. " },
        
        { "Steve George",
        "I was unable to make copies of the DVD&apos;s from my camcorder due to CRC errors..." +
        " JFileRecovery was able to copy the files first try, no problems. It&apos;s simple and it works!" },
        
        { "Amit Jain",
        "Pretty cool, simple enough and seems to work quite well on multimedia at least the" +
        " one I used it on..." },
        
        { "Zorak2d",
        "Was hard to find, but finally someone did it! I tried other tools with lots of features" +
        " but these made the job frustrating, because they tried to read deleted data" +
        " from hard drive, recycle bin, formatted disks, find partitions etc over complicating the" +
        " &quot;simple&quot; job of ignoring some read errors in a file an go on reading..." +
        " When I downloaded your software I thought the download was corrupted because the file" +
        " was so small! Incredible... Thank you for this simple, useful, fast, freeware that works" +
        " so well!" },
        
        { "SWR",
        "An enormous Entourage database file went bad, and JFileRecovery was able to fix 21" +
        " out of 23 bad blocks. After that, the Entourage database utility was able fix the" +
        " last two bad blocks. This was on a G4 iBook with a modest amount of memory, and the" +
        " program seemed to work quickly enough." },
        
        { "Joanne",
        "I had a laptop of a teenager to reload and save as you can imagine a thousand photos" +
        " and heaps of music to save of it. A lot was corrupted and wouldnt save until I" +
        " searched and found JFileRecovery and even though it was a slow process because of the comp" +
        " problem it worked great and I managed to save her important stuff. Thanks" },
        
        { "Paul Hodnett",
        "I had a CD that kept returning a cyclic redundancy error message when I tried to copy" +
        " it on to my hard drive. The JFile recovery software was able to by-pass this and" +
        " retrieve the data with minimal loss of quality. I was surprised to find a piece of" +
        " software that was so easy to use and actually did what it said it would do." +
        " I highly recommend this application." },
        
        { "Nick Williams",
        "After enabling Java (I initially was unable to use the program as I had not realised" +
        " the need for Java), JFileRecovery was able to recover a 4.5GB .avi file that was" +
        " otherwise unaccessable on a failing hard drive. I was very impressed and pleased." +
        " I have already recommended it to a friend. " },
        
        { "Bstonehouse",
        "I used this program to copy some damaged photos from DVD - it worked successfully" },
        
        { "Kaiser83",
        "Thanks a lot for this program - it did wonders on recovering my files from a scratched" +
        " to heck cd. Only lost a couple of KB as opposed to the entire file and since they" +
        " were video files it only amounted to a single lost frame. I would recommend this to" +
        " anyone who needs their files back." },
        
        { "Mickah",
        "Excellent simple piece of software. Encountered CRC on a bad floppy disk and" +
        " JFileRecovery did the job on it. I would use this for recovery from CRC type errors on" +
        " foppys (much less these days) and CD&apos;s. This program helped me solve my issue in 5" +
        " minutes! " },
        
        { "Chiefcho",
        "It managed copying files from my erratic dvd-rom... saved me a lot of trouble." +
        " Been using it ever since :) Can only recommend. " },
        
        { "Destroyer",
        "Great was able to copy some damaged video files of a DVD that was badly damaged." +
        " Will continue to use in the future. " },
        
        { "Wintermute",
        "Ok so I had a 4.5GB dvd iso file which I could not restore from backup dvd due" +
        " to crc errors. Very frustrating, as the errors were right at the very end of the" +
        " read, and I wanted to reinstall this iso after reformatting my computer. I found" +
        " this program, gave it a try on my iso file. This program rebuilt my iso and I was" +
        " able to mount it and install it from a virtual drive as I had wanted to before except" +
        " the crc errors stopped me. So I heartily reccomend this program. It will be of use for" +
        " many people in situations like these, especially a great program for restoring large" +
        " backup files such as mine, where a tiny data error (32mb) renders a whole 4.5GB. iso" +
        " usless. Nice one, and thank you very much for an excellent product. " },
        
        { "Dpeace",
        "I had an urgent need to recover files from a corrupted floppy disk, and I tried five" +
        " free and shareware utilities. JFileRecovery was the only one to successfully recover the" +
        " files I needed, and so was very pleased. " },
        
    };
}


