e-gru_user_dump.php
1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
//*****************************************************************************
//*
//* プログラム名:e-gru
//* プログラムID:toroku.php
//* 機能 :DB作成、登録
//* 作成者 :K.Yoshimura(MTC)
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("../include/dbcon_e-gru_admin.inc");
include("../include/jcode.phps");
include("../include/mime.php");
//dbcon.inc作成
$file_path = '';
$make_file = 'dump.txt';
if(!is_file($file_path.$make_file)){ // ファイルの確認
touch($file_path.$make_file); // 空のファイルを作成
}else{
echo("ファイル作成失敗");
}
chmod($file_path.$make_file,0644); // パーミッション変更
$strSql = " select kokyaku_no,kokyaku_name,mail_add from kokyaku_info_tbl RIGHT OUTER JOIN kokyaku_tbl USING ( kokyaku_no )";
$rsResult = pg_exec($pg_con,$strSql);
for ($intCnt=0; $intCnt < pg_numrows($rsResult); $intCnt++){
$objData = pg_fetch_object($rsResult, $intCnt);
$kokyaku_name=$objData->kokyaku_name;
$mail_add=$objData->mail_add;
$forder_name=$objData->forder_name;
// if(!is_file("/home/webusr/WWW/e-gru/".$forder_name."/index.php")){
if(!is_file("/usr/local/apache/htdocs/WWW/e-gru/".$forder_name."/index.php")){
$incstr .= $kokyaku_name.",".$mail_add."\n";
}else{
}
}
if (!$handle = fopen($file_path.$make_file, 'a')) {
print "Cannot open file ($file_path.$make_file)";
exit;
}
if (!fwrite($handle, $incstr)) {
print "Cannot write to file ($file_path.$make_file)";
exit;
}
fclose($handle);
?>