TOP000_2.php
1.39 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
57
58
59
60
61
62
<?php
//*****************************************************************************
//*
//* プログラム名:TOP画面(メモ帳)
//* プログラムID:TOP000_1.php
//* 機能 :
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
$strDBinc="include/dbcon.inc";
include($strDBinc);
function link_url($str)
{
$regex = "((https?://|ftp://)([0-9A-Za-z:_?./~%;()=+#-]|&)+)";
$str = eregi_replace($regex, "<a href=\"\\1\" target=\"_blank\">\\1</a>", $str);
$regex_mail = "((mailto:)?([0-9A-Za-z._-]+@[0-9A-Za-z.-]+))";
$str = eregi_replace($regex_mail, "<a href=\"mailto:\\3\">\\1</a>", $str);
return $str;
}
if ($seq!=""){
$strWhere=" and seq=".$seq;
}else{
$strWhere="";
}
$strSQL="Select memo From mymemo_tbl Where syain_cd = '$PHP_SYAIN_CD' ".$strWhere;
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($objRec) > 0){
$objData = pg_fetch_object($objRec, 0);
$memo=$objData->memo;
}
?>
<!--
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td><pre><?php echo link_url(htmlspecialchars($memo)); ?></pre></td>
</tr>
</table>
-->
<html>
<head>
</head>
<body BGCOLOR="#FFFFFF">
<pre><?php echo link_url(htmlspecialchars($memo)); ?></pre>
</body>
</html>