    

CREATE TABLE IF NOT EXISTS `cms_visitors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `powner` int(11) NOT NULL,
  `visitor` int(11) NOT NULL,
  `pubdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
);

   components/users/fronted.php


[code=php] $plugins = $model->getPluginsOutput($usr);[/code]



[code=php]       $visithost = $usr['id'];
	$visitguest = $inUser->id;
	if($inUser->id){
	if ($visitguest !== $visithost){
 $sql = "INSERT INTO cms_visitors (powner, visitor)
                VALUES ($visithost, $visitguest)";
				$inDB->query($sql);
				
}
}[/code]

  /includes/myphp/

  gosti.php

    ()     php   gosti.php

       .