Location: PHPKode > projects > Article System > include/modules/admin/include/index.php
<?php

/*
 *	Article System
 *	Online journal management tool written in PHP/MySQL/PostgreSQL.
 *	This code is available at http://sourceforge.net/projects/artsys
 *
 *	Copyright (C) 2001-2005 Jan Hnatek
 *	Distributed under the terms of the GNU General Public License
 *
 *	Date:	  05/08/2005
 *	Version:  0.6   	
 */

###############################################################################
# ADMIN PART
# admin index control page
#

	// TODO: style fixes
	function adm_info ($text) {	echo "<p class=\"head2\">$text: </p>\n";	}
	function ainfo ($text) {	echo $text.'<br>';	}
	function aalert ($text) {	echo '<span style="color: red">'.$text.'</span><br>'; 	}

###############################################################################

	adm_info ("fulltext index information");
	// **********************************
	$index_present = $db->exec ("SELECT * FROM object_word_link LIMIT 1");
	if (!$index_present) {
		echo "index: not found <br>\n";
	} else {
		echo "index: present<br>\n";
		$tmp =& $articles->get ("id");
		if ($tmp)
			echo "total articles in the system: ", count ($tmp), "<br>\n";
		$tmp =& $db->array_exec ("SELECT A.id FROM Articles A, Issues I
			WHERE (A.issue=I.id) AND (I.current='1' OR I.archived='1')");
		if ($tmp)
			echo "total published articles: ", count ($tmp), "<br>\n";
		$tmp =& $db->array_exec ("SELECT object_id FROM object_word_link GROUP BY object_id");
		if ($tmp)
			echo "total indexed articles: ", count ($tmp), "<br>\n";

		// TEMP: 
		echo "list of indexed articles { ";
		foreach ($tmp as $t)
			echo $t["object_id"], ", ";
		echo "}";
		
	}
	echo "<br>";

/*	// test object index drop
	require_once (INCLUDE_DIR ."/classes/class.fulltext_index.php");
	$fi =& new fulltext_index ("Articles", "content");
	$fi->remove_item_index (2);
*/
	
	//$s->create_item_index (7);
	//$s->clear_all_indexes ();
/*
echo "<p class=txt>";
	$s =& new fulltext_search ("Articles", "content");
	$s->rebuild_all_indexes ();	
echo "</p>";
 */

?>
Return current item: Article System