IA_CLIENT_PROT * clnp;
 WEB * web = NULL;
 
-using namespace std;
-
 time_t stgTime;
 
 //-----------------------------------------------------------------------------
 printf("sgauth <path_to_config>\n");
 }
 //-----------------------------------------------------------------------------
-void SetDirName(const vector<string> & dn, void *)
+void SetDirName(const std::vector<std::string> & dn, void *)
 {
 for (int j = 0; j < DIR_NUM; j++)
     {
     if (winKOI)
         {
-        string dir;
+        std::string dir;
         KOIToWin(dn[j], &dir);
         if (web)
             web->SetDirName(dir, j);
 {
 }
 //-----------------------------------------------------------------------------
-void ShowMessage(const string & message, int i, int, int, void *)
+void ShowMessage(const std::string & message, int i, int, int, void *)
 {
 if (web)
     web->AddMessage(message, i);
 }
 //-----------------------------------------------------------------------------
-void ShowError(const string & message, int, void *)
+void ShowError(const std::string & message, int, void *)
 {
 if (web)
      web->AddMessage(message, 0);
 {
 if (clnp->GetAuthorized())
     {
-    cout << "Connect" << endl;
+    std::cout << "Connect" << std::endl;
     clnp->Connect();
     }
 }
 //-----------------------------------------------------------------------------
 void CatchUSR2(int)
 {
-cout << "Disconnect" << endl;
+std::cout << "Disconnect" << std::endl;
 clnp->Disconnect();
 }
 //-----------------------------------------------------------------------------
 void CatchTERM(int)
 {
-cout << "Terminated" << endl;
+std::cout << "Terminated" << std::endl;
 clnp->Disconnect();
 sleep(2);
 exit(0);
 
     {
     if (dirName[j][0] == 0)
         continue;
-    string s;
+    std::string s;
     KOIToWin(dirName[j], &s);// +++++++++ sigsegv ==========   TODO too long dir name crashes sgauth
     sprintf(str, "       <TD id=\"TraffTableCaptionCell%d\">%s</TD>\n", rowNum++, s.c_str());
     send(outerSocket, str, strlen(str), 0);
     sprintf(str,"        </TR>\n");
     send(outerSocket, str, strlen(str), 0);
 
-    list<STG_MESSAGE>::reverse_iterator it;
+    std::list<STG_MESSAGE>::reverse_iterator it;
     it = messages.rbegin();
     while (it != messages.rend())
         {
 return 0;
 }
 //---------------------------------------------------------------------------
-void WEB::SetDirName(const string & dn, int n)
+void WEB::SetDirName(const std::string & dn, int n)
 {
 web->dirName[n] =  dn;
 }
 //---------------------------------------------------------------------------
-void WEB::AddMessage(const string & message, int type)
+void WEB::AddMessage(const std::string & message, int type)
 {
 time_t t = time(NULL);
 STG_MESSAGE m;
 
 #include "stg/const.h"
 #include "stg/ia_packets.h"
 
-using namespace std;
-
 #define MAX_MESSAGES    (10)
 //-----------------------------------------------------------------------------
 struct STG_MESSAGE
 {
-string  msg;
-string  recvTime;
+std::string  msg;
+std::string  recvTime;
 int     type;
 };
 //-----------------------------------------------------------------------------
 public:
     WEB();
     void Run();
-    void SetDirName(const string & dn, int n);
+    void SetDirName(const std::string & dn, int n);
     void SetRefreshPagePeriod(int p);
     void SetListenAddr(uint32_t ip);
-    void AddMessage(const string & message, int type);
+    void AddMessage(const std::string & message, int type);
     void UpdateStat(const LOADSTAT & ls);
     void Start();
 private:
     pthread_t thread;
     #endif
 
-    string dirName[DIR_NUM];
+    std::string dirName[DIR_NUM];
     int res;
     int listenSocket;
     int outerSocket;
     uint32_t listenWebAddr;
     LOADSTAT ls;
 
-    list<STG_MESSAGE> messages;
+    std::list<STG_MESSAGE> messages;
 };
 //-----------------------------------------------------------------------------