$msg = "";
if(isset($_GET['file'])){
$s_id = $_GET['file'];
include("conf.php");
include("lib/clsConn.php");
include("lib/function.php");
$clsConn = new conn_DB(HOST_NAME,DB_USER,DB_PWD,DB_NAME);
$sql_get_list_subject = "SELECT tbl_master.m_name,tbl_master.m_id,tbl_master.m_pic,tbl_subject.s_name,tbl_subject.s_link_wma,bride_sub_cd_mas.source,tbl_cd.cd_name ";
$sql_get_list_subject .= "FROM tbl_master,tbl_subject,bride_cd_master,bride_sub_cd_mas,tbl_cd ";
$sql_get_list_subject .= "WHERE tbl_master.m_id = bride_cd_master.m_id ";
$sql_get_list_subject .= "AND bride_cd_master.b_cm_id = bride_sub_cd_mas.b_cm_id ";
$sql_get_list_subject .= "AND bride_cd_master.cd_id = tbl_cd.cd_id ";
$sql_get_list_subject .= "AND bride_sub_cd_mas.s_id = tbl_subject.s_id ";
$sql_get_list_subject .= "AND tbl_subject.s_id = ".$s_id;
//echo $sql_get_list_subject;
$clsConn->set_char();
if($res_subject = @$clsConn->execute($sql_get_list_subject)){
$master_name = mysql_result($res_subject,0,"tbl_master.m_name");
$subject = mysql_result($res_subject,0,"tbl_subject.s_name");
$file = mysql_result($res_subject,0,"tbl_subject.s_link_wma");
$pic = mysql_result($res_subject,0,"tbl_master.m_pic");
$path = get_path(mysql_result($res_subject,$i,"tbl_master.m_id"));
$path_wma = $path."wma/".$file;
$path_pic = $path.$pic;
if(!file_exists($path_wma)){
$msg = "ไม่พบข้อมูลธรรมะบรรยายนี้";
}
}else{
$msg = "ไม่พบข้อมูลธรรมะบรรยายนี้";
}
}else{
$msg = "ไม่พบข้อมูลธรรมะบรรยายนี้";
}
/*if(isset($_GET['file'])){
$file_wma = $_GET['file'];
}else{
$file_wma = "";
}
if(!file_exists($file_wma)){
echo "ไม่พบไฟล์ข้อมูลนี้";
exit();
}*/
function get_path_pic($_m_id){
}
?>
Thammapedia : ฟังเสียงธรรมะบรรยาย
ธรรมะบรรยาย
โดย
|
|
|
if($msg == ""){?>
}else{
echo $msg;
}
?>
|
เรื่อง : |
www.thammapedia.com
ธรรมะพีเดีย : ศูนย์เผยแผ่พระพุทธธรรม |
|
|