 # =======================================================================
 #                               
 # =======================================================================
 
1.  : history.php, history_conf.php  history_admin.php  
    ,    MySQL   history_conf.php.
      form_setup.txt   src  (  
      ),   classes   .
   
2.  admin.php     :
   <li><a href=history_admin.php?do=history".$sess."> \" \"</a>
   <li><a href=history_admin.php?do=logs".$sess."> \" \"</a>
   
3.  __main.php :
   ---------------------------------------------------------------------------
   m_private($nick_to,qm1("q_privget")."\"$nick_from\",\"".$msg."\"".qm2());
   ---------------------------------------------------------------------------
    :
   ---------------------------------------------------------------------------
   /**** mod history and logs messages start ****/
   require_once("__other.php");
   require_once("history_conf.php");
   require_once("__other.php");
   require_once("classes/class.mysql.php");
   $db = new mysql_db(); 
   $db->getConnect($dbhost,$dbname,$dbuser,$dbpass);
   $db->query("insert into chat_history_privatmsg (date_history, nick_history, nick_history_to, time, you_message) values('".date("d.m.Y")."', '$nick_from', '$nick_to', '[".date("H:i:s")."]', '$msg')");
   /**** mod history and logs messages close ****/
   ---------------------------------------------------------------------------
   
   :
   ---------------------------------------------------------------------------
   m_all($nick,qm1($proc,$nick)."\"".$msg."\"".(empty($setaway)?"":",\"<away>\"").qm2()); 
   ---------------------------------------------------------------------------
    :
   ---------------------------------------------------------------------------
   /**** mod history and logs messages start ****/
   require_once("__other.php");
   require_once("history_conf.php");
   require_once("__other.php");
   require_once("classes/class.mysql.php");
   $db  = new mysql_db(); 
   $db->getConnect($dbhost,$dbname,$dbuser,$dbpass);
   $db->query("insert into chat_history_msg (date_history, nick_history, time, history_message) values('".date("d.m.Y")."', '$nick', '[".date("H:i:s")."]', '$msg')");
   /**** mod history and logs messages close ****/
   ---------------------------------------------------------------------------
   
   
    n.php :
   ---------------------------------------------------------------------------
   case "N1": // post message
   
   if ($msg=="") {
      myexit("err6");
   }
   ---------------------------------------------------------------------------
    :
   ---------------------------------------------------------------------------
   /**** mod history and logs messages start ****/
   $cfg_file_name=$chatpath."/lgs_hstr_cnfg.ini";
   if (!file_exists($cfg_file_name)){
   $fopen=fopen($cfg_file_name, "w");}
   $form_cfg=date("d.m.Y");   
   $open=fopen($cfg_file_name,"r");
   while(!feof($open)) $search.=fgets($open,1024);
   fclose($open);
   if(!eregi(strtolower($form_cfg),strtolower($search))){
   $open=fopen($cfg_file_name,"a");
   fwrite($open,$form_cfg."\r\n");
   fclose($open);}
   /**** mod history and logs messages close ****/
   ---------------------------------------------------------------------------
  
  
    skin/_/frame_more.html     :
   ---------------------------------------------------------------------------
   <a href="#" onclick="window.open('history.php','link','width=600, height=500 top=50, left=50'); return false" title=" "></a>
   ---------------------------------------------------------------------------
  
 # =======================================================================
 #                           ;) 
 # =======================================================================
 # =======================================================================
 # P.S.    "history.php"   ( ) ,                   
 #    MySQL  ,       
 # (  )   ,     
 # ()     history_conf.php,     
 #     :
 
  CREATE TABLE IF NOT EXISTS `chat_history_msg` (
    `date_history` varchar(65) NOT NULL default '',
    `nick_history` varchar(25) NOT NULL default '',
    `time` text NOT NULL,
    `history_message` mediumtext NOT NULL
  ) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
  CREATE TABLE IF NOT EXISTS `chat_history_privatmsg` (
    `date_history` varchar(65) NOT NULL default '',
    `nick_history` varchar(20) NOT NULL default '',
    `nick_history_to` varchar(25) NOT NULL default '',
    `time` text NOT NULL,
    `you_message` mediumtext NOT NULL
  ) ENGINE=MyISAM DEFAULT CHARSET=cp1251;   
                                                            
 # =======================================================================
  