Mercurial > mercurial > hgweb_rsearcher.cgi
comparison src/net.cpp @ 13:f5ffc34f045a
manage DB.
author | pyon@macmini |
---|---|
date | Wed, 14 Nov 2018 19:43:40 +0900 |
parents | 799b6008db8e |
children | c262e17de9b1 |
comparison
equal
deleted
inserted
replaced
12:240752cbe11b | 13:f5ffc34f045a |
---|---|
1 // Filename : net.cpp | 1 // Filename : net.cpp |
2 // Last Change: 2018-11-09 金 09:32:56. | 2 // Last Change: 2018-11-14 水 10:46:24. |
3 // | 3 // |
4 | 4 |
5 #include <wx/datetime.h> | 5 #include <wx/datetime.h> |
6 #include <wx/stream.h> | 6 #include <wx/stream.h> |
7 #include <wx/zstream.h> | 7 #include <wx/zstream.h> |
37 wxDELETE( httpStream ); | 37 wxDELETE( httpStream ); |
38 get.Close(); | 38 get.Close(); |
39 return ret; | 39 return ret; |
40 } | 40 } |
41 | 41 |
42 bool RsHttp::GetDB( void ) | 42 bool RsHttp::GetDB( int a, int h, int i ) |
43 { | 43 { |
44 bool ret = false; | 44 bool ret = false; |
45 ret = Get( wxT( "/db/auth.db"), wxT( "auth.db") ); | 45 if ( a == 1 ) ret = Get( wxT( "/db/auth.db"), wxT( "auth.db") ); |
46 ret = Get( wxT( "/db/hhs.db"), wxT( "hhs.db") ); | 46 if ( h == 1 ) ret = Get( wxT( "/db/hhs.db"), wxT( "hhs.db") ); |
47 wxDateTime now = wxDateTime::Now(); | 47 wxDateTime now = wxDateTime::Now(); |
48 if ( now.GetDay() % 14 == 0 ) | 48 if ( i == 2 || now.GetDay() % 13 == 0 || now.GetDay() % 28 == 0 ) |
49 Get( wxT( "/db/index.db"), wxT( "index.db" ) ); | 49 Get( wxT( "/db/index.db"), wxT( "index.db" ) ); |
50 return ret; | 50 return ret; |
51 } | 51 } |
52 | 52 |
53 int RsHttp::GetImagesSize( wxString hhs, wxString date ) | 53 int RsHttp::GetImagesSize( wxString hhs, wxString date ) |
54 { | 54 { |