| 15 |
* * |
* * |
| 16 |
***************************************************************************/ |
***************************************************************************/ |
| 17 |
|
|
| 18 |
|
#include "common.h" |
| 19 |
|
#include "log.h" |
| 20 |
#include "menu.h" |
#include "menu.h" |
| 21 |
|
#include <string.h> |
| 22 |
#include <time.h> |
#include <time.h> |
| 23 |
#include <sys/types.h> |
#include <sys/types.h> |
| 24 |
#include <sys/wait.h> |
#include <sys/wait.h> |
| 43 |
char DB_username[50]; |
char DB_username[50]; |
| 44 |
char DB_password[50]; |
char DB_password[50]; |
| 45 |
char DB_database[50]; |
char DB_database[50]; |
| 46 |
|
char DB_timezone[50]; |
| 47 |
|
|
| 48 |
// Global declaration for system |
// Global declaration for system |
| 49 |
int SYS_exit; |
int SYS_exit; |
| 50 |
int SYS_child_process_count; |
int SYS_child_process_count; |
| 51 |
|
|
| 52 |
// Common function |
// Common function |
| 53 |
const char * |
const char *str_space(char *string, int length) |
|
str_space(char *string, int length) |
|
| 54 |
{ |
{ |
| 55 |
int i; |
int i; |
| 56 |
for (i = 0; i < length; i++) |
for (i = 0; i < length; i++) |
| 61 |
return string; |
return string; |
| 62 |
} |
} |
| 63 |
|
|
| 64 |
const char * |
const char *get_time_str(char *string, size_t length) |
|
get_time_str(char *string, size_t length) |
|
| 65 |
{ |
{ |
| 66 |
char week[10], buffer[256]; |
char week[10], buffer[256]; |
| 67 |
time_t curtime; |
time_t curtime; |