/*
      _______                          .__ .__   .__   .__                 
      \      \    ____   __ __ _______ |__||  |  |  |  |__|  ____    ____  
      /   |   \ _/ __ \ |  |  \\_  __ \|  ||  |  |  |  |  | /  _ \  /    \ 
     /    |    \\  ___/ |  |  / |  | \/|  ||  |__|  |__|  |(  <_> )|   |  \
     \____|__  / \___  >|____/  |__|   |__||____/|____/|__| \____/ |___|  /
    =========\/======\/=================================================\/==
  v0.01 04/JUL/2007 (C) Copyright 2007-2007 Scott D. Yelich SOME RIGHTS RESERVED
 .,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.-*~'`^`'~*-,._.,-*~'`^`'~*-,. 


  LICENSE:  Creative Commons Attribution 3.0 License.
  SEE:      http://creativecommons.org/licenses/by/3.0/


  Sun Aug  6 14:17:42 EDT 2007, v0.01 sdy

  *Very* simple program to do a web page hit counter using sqlite3.

*/

//  C++

#include <iostream>
#include <string>

//  LOCAL

#include "Counter.h"

int
main()
{

  std::string id;
  std::cin >> id;  //  HTTP POST = read stdin

  Counter counter;

  int hits = counter.hit(id);

  std::cout << "Content-Type:  text/html" << std::endl << std::endl;

  std::cout << id;
  std::cout << " ";
  std::cout << hits;
  std::cout << std::endl;

  return 0;

}
