<?
/**
* Copyright (C) 2004 Tony Bierman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
see README.html for complete documentation
*/
echo '<div id="content" width="80%">';
/*
validate words folder
*/
$words_folder = phpGiggle_ABSPATH.'words';
if(file_exists($words_folder))
{
print_info('OK test successful!',"Words folder ".$words_folder." was found.");
$phpgiggle_tests++;
}
else
{
print_error("Words folder ".$words_folder." could not be found");
$phpgiggle_errors++;
}
if(is_writable($words_folder))
{
print_info('OK test successful!',"Words folder ".$words_folder." is writable.");
$phpgiggle_tests++;
}
else
{
print_error("Words folder ".$words_folder." is not writable");
$phpgiggle_errors++;
}
/*
validate clicks file
*/
if(file_exists(phpgiggle_clicksfile))
{
print_info('OK test successful!',"Clicks file ".phpgiggle_clicksfile." was found.");
$phpgiggle_tests++;
}
else
{
print_error("Clicks file ".phpgiggle_clicksfile." could not be found");
$phpgiggle_errors++;
}
if(is_writable(phpgiggle_clicksfile))
{
print_info('OK test successful!',"Clicks file ".phpgiggle_clicksfile." is writable.");
$phpgiggle_tests++;
}
else
{
print_error("Clicks file ".phpgiggle_clicksfile." is not writable");
$phpgiggle_errors++;
}
/*
validate words file
*/
if(file_exists(phpgiggle_wordsfile))
{
print_info('OK test successful!',"Words file ".phpgiggle_wordsfile." was found.");
$phpgiggle_tests++;
}
else
{
print_error("Words file ".phpgiggle_wordsfile." could not be found");
$phpgiggle_errors++;
}
if(is_writable(phpgiggle_wordsfile))
{
print_info('OK test successful!',"Words file ".phpgiggle_wordsfile." is writable.");
$phpgiggle_tests++;
}
else
{
print_error("Words file ".phpgiggle_wordsfile." is not writable");
$phpgiggle_errors++;
}
if(is_readable(phpgiggle_wordsfile) && ($phpgiggle_tests==4))
{
print_info('Validating keys','Validating all keywords and phrases:');
validate_keywords();
$phpgiggle_tests++;
}
echo '</div>';
?>