$sql = " SELECT * ".
" FROM "._TABLE_.
" LEFT JOIN "._TABLE_GROUP_." ON "._TABLE_GROUP_."_ID = "._TABLE_."_GroupID ".
" LEFT JOIN "._SYSTEM_TABLE_USER_." ON "._SYSTEM_TABLE_USER_."_ID = "._TABLE_."_CreateByID ".
" LEFT JOIN "._MODULE_TABLE_MEMBER_." ON "._MODULE_TABLE_MEMBER_."_ID = "._TABLE_."_CreateByID ".
" WHERE "._TABLE_."_ID = '$id' ";
#echo $sql;
$result = mysql_query($sql);
$rs = mysql_fetch_array($result);
$status = false;
$_member_type = $rs[_MODULE_TABLE_MEMBER_."_Type"];
$_member_user = $rs[_MODULE_TABLE_MEMBER_."_Username"];
#select img member
$src = "";
#echo $_member_type;
if($_member_type == "Student"){
$sql_m = " SELECT * FROM "._MODULE_TABLE_MEMBER_STUDENT_.
" WHERE "._MODULE_TABLE_MEMBER_STUDENT_."_Username = '".$_member_user."' ";
$result_m = mysql_query($sql_m);
$rs_m = mysql_fetch_array($result_m);
$src = _FILE_MODULE_MEMBER_IMAGE_.$rs_m[_MODULE_TABLE_MEMBER_STUDENT_."_PhysicalName"];
(file_exists($src_m) && strlen($rs_m[_MODULE_TABLE_MEMBER_STUDENT_."_PhysicalName"]) > 4) ? $src_m : $src_m="admin/images/nopicture/nopicture_75x75_noborder.gif";
$status = true;
}else{
$sql_m = " SELECT * FROM "._MODULE_TABLE_MEMBER_INSTITUTION_.
" WHERE "._MODULE_TABLE_MEMBER_INSTITUTION_."_Username = '".$_member_user."' ";
$result_m = mysql_query($sql_m);
$rs_m = mysql_fetch_array($result_m);
$src_m = _FILE_MODULE_MEMBER_IMAGE_.$rs_m[_MODULE_TABLE_MEMBER_INSTITUTION_."_PhysicalName"];
(file_exists($src_m) && strlen($rs_m[_MODULE_TABLE_MEMBER_INSTITUTION_."_PhysicalName"]) > 4) ? $src_m : $src_m="admin/images/nopicture/nopicture_75x75_noborder.gif";
$status = true;
}
#echo $src_m;
if($rs[_SYSTEM_TABLE_USER_."_PhysicalName"]){
$src = _SYSTEM_USER_IMAGE_."/".$rs[_SYSTEM_TABLE_USER_."_PhysicalName"];
}else if($status){
$src = $src_m;
}else{
$src = "../images/nopicture/nopicture_75x75_noborder.gif";
$src = "admin/".str_replace("../", "", $src);
}
#echo $src;
?>
" />
"> Email
|
=$rs[_TABLE_."_Title"]?>
=$rs[_TABLE_."_Subject"]?>
|
|
if($HTML_Session_ID){
?>
}
?>
require_once "admin/lib/class.page_split_font_s.php";
$__Size = 20;
$obj = new page_split();
$obj->_setPageSize($__Size);
$obj->_setFile("view.php");
$obj->_setPage($page);
$sql = " SELECT * ".
" FROM "._TABLE_COMMENT_.
" LEFT JOIN "._MODULE_TABLE_MEMBER_." ON "._MODULE_TABLE_MEMBER_."_ID = "._TABLE_COMMENT_."_CreateByID ".
" WHERE "._TABLE_COMMENT_."_WebboardID = '$id' ".
" ORDER BY "._TABLE_COMMENT_."_ID ASC ";
#echo $sql;
#$result_row = mysql_query($sql);
#$all_row = mysql_num_rows($result_row);
$result=$obj->_query($sql);
$count_row = mysql_num_rows($result);
if($count_row > 0){
?>
if($page)$row_index = ($__Size * $page)-$__Size;
else $row_index = 0;
#echo $all_row." - ".$_page;
while($rs = mysql_fetch_array($result)){
++$row_index;
$_member_type = $rs[_MODULE_TABLE_MEMBER_."_Type"];
$_member_user = $rs[_MODULE_TABLE_MEMBER_."_Username"];
#select img member
$src = "";
if($_member_type == "Student"){
$sql_m = " SELECT * FROM "._MODULE_TABLE_MEMBER_STUDENT_.
" WHERE "._MODULE_TABLE_MEMBER_STUDENT_."_Username = '".$_member_user."' ";
$result_m = mysql_query($sql_m);
$rs_m = mysql_fetch_array($result_m);
$src = _FILE_MODULE_MEMBER_IMAGE_.$rs_m[_MODULE_TABLE_MEMBER_STUDENT_."_PhysicalName"];
(file_exists($src) && strlen($rs_m[_MODULE_TABLE_MEMBER_STUDENT_."_PhysicalName"]) > 4) ? $src : $src="admin/images/nopicture/nopicture_75x75_noborder.gif";
}else{
$sql_m = " SELECT * FROM "._MODULE_TABLE_MEMBER_INSTITUTION_.
" WHERE "._MODULE_TABLE_MEMBER_INSTITUTION_."_Username = '".$_member_user."' ";
$result_m = mysql_query($sql_m);
$rs_m = mysql_fetch_array($result_m);
$src = _FILE_MODULE_MEMBER_IMAGE_.$rs_m[_MODULE_TABLE_MEMBER_INSTITUTION_."_PhysicalName"];
(file_exists($src) && strlen($rs_m[_MODULE_TABLE_MEMBER_INSTITUTION_."_PhysicalName"]) > 4) ? $src : $src="admin/images/nopicture/nopicture_75x75_noborder.gif";
}
#$src = "admin/".str_replace("../", "", $src);
#echo $src;
?>
ความคิดเห็น =$row_index?> |
โดยคุณ =$rs[_MODULE_TABLE_MEMBER_."_Username"]?> |
โพสต์เมื่อ =php_FormatDate("1 Jan XX",$rs[_TABLE_COMMENT_."_LastUpdate"],true)?> |
|
}
}
?>
$obj->_displayPage("id=$id&menu_id=$menu_id");
?>
include_once("admin/object/obj_useronline/object_dis.php");
?>
#static forum and last user
$sql = " SELECT "._MODULE_TABLE_MEMBER_."_ID , "._MODULE_TABLE_MEMBER_."_UserName , ".
" (SELECT COUNT("._MODULE_TABLE_MEMBER_."_ID) ".
" FROM "._MODULE_TABLE_MEMBER_." WHERE "._MODULE_TABLE_MEMBER_."_Status = 'Enable' ) AS "._MODULE_TABLE_MEMBER_."_CountUser , ".
" (SELECT COUNT("._TABLE_FORUM_."_ID) FROM "._TABLE_FORUM_." WHERE "._TABLE_FORUM_."_Status = 'Enable' ) AS "._TABLE_FORUM_."_SumForum , ".
" (SELECT COUNT("._TABLE_."_ID) FROM "._TABLE_." WHERE "._TABLE_."_Status = 'Enable' ) AS "._TABLE_."_SumForum ".
" FROM "._MODULE_TABLE_MEMBER_.
" WHERE "._MODULE_TABLE_MEMBER_."_Status = 'Enable' ".
" ORDER BY "._MODULE_TABLE_MEMBER_."_ID DESC limit 1";
$result = mysql_query($sql);
$rs = mysql_fetch_array($result);
?>
สถิติการใช้งานเว็บบอร์ด
หัวข้อ: =number_format($rs[_TABLE_FORUM_."_SumForum"],0,'',',')?>, กระทู้: =number_format($rs[_TABLE_."_SumForum"],0,'',',')?> สมาชิก: =number_format($rs[_MODULE_TABLE_MEMBER_."_CountUser"],0,'',',')?> สมาชิกที่ใช้งานอยู่: include_once("admin/object/obj_useronline/object.php")?>
ยินดีต้อนรับ คุณ =$rs[_MODULE_TABLE_MEMBER_."_UserName"]?> เป็นสมาชิกคนล่าสุด |
สมาชิกที่กำลังออนไลน์
include("admin/object/obj_useronline/object_user_online.php")?>
|
|
|
include("menu/right_menu.php");
?> |