#!/usr/bin/perl

$pwd = ($0 =~ /^(.+)[\/\\]/)[0] || '.';
require ("$pwd/cs-lib.pl");

%indexes = ();
unlink("$tokens{data_dir}/dbm/indexes.txt");

my @indexed = ('email','category','package','status');

foreach my $user (keys(%users)) {
	my %user = ();

	foreach (split(/\t/,$users{$user})) {
		my @line = split(/=/,$_,2);
		$user{$line[0]} = $line[1];
	}

	foreach (@indexed) {
		&index_create($_,$user{$_},$user);
	}
}

print "Content-type: text/html\n\n Ok done!\n";