Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84023465-1"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', 'UA-84023465-1');
- </script>
- <?
- class Class_Shows{
- function FormAddNewsEducation(){
- $db = new ConnectMySQL;
- $db->connect();
- $objResponse = new xajaxResponse("TIS-620");
- $objResponse->addScriptCall("showdivblockeducation");
- $template = new Template_all;
- $data = $template->GetTemplate('addnewseducation_template.tpl');
- $objResponse->addAssign("form_data", "innerHTML",$data);
- return $objResponse;
- }
- function InsertForm_Edu($frm_action,$edittor){
- $db = new ConnectMySQL;
- $db->connect();
- $checkemail = new Class_Form;
- $objResponse = new xajaxResponse("TIS-620");
- $board_subject = $frm_action["board_subject"];
- $txttype = $frm_action["txttype"];
- $txtcomefrom = $frm_action["txtcomefrom"];
- if (($txtcomefrom == "") or ($board_subject == "")){
- $objResponse->Addalert("��سҡ�͡���������ú ��ǹ");
- }
- else
- {
- $ndate=date("Y/m/d");
- if ($board_name == "Viagra")
- {
- $data .="<CENTER>�ѹ�֡�������������</CENTER><br>";
- }
- else
- {
- $sql1= "INSERT INTO newsall (nid, ntopic, ndetail, ndate,nread,comefrom,status,typeid) VALUES ('NULL','$board_subject','$edittor','$ndate','0','$txtcomefrom','0','$txttype')";
- $dbquery1 = mysql_query($sql1);
- if (!$dbquery1)
- {
- $objResponse->Addalert("�ѹ�֡�������������");
- }
- else
- {
- $objResponse->addAssign("board_name", "value","");
- $objResponse->addAssign("board_subject", "value","");
- $objResponse->addAssign("txtcomefrom", "value","");
- $objResponse->Addalert("�ѹ�֡���������º�������� ��س��͡����ѵ��ѡ����");
- $objResponse->addScriptCall("clear_ed_text","News_Editor"); //��ҧ������� edittor
- }
- }
- }
- return $objResponse;
- $db->close();
- }
- function Show_Education($id){
- $db = new ConnectMySQL;
- $db->connect();
- //$objResponse = new xajaxResponse();
- $objResponse = new xajaxResponse("TIS-620");
- //$objResponse->addScriptCall("dbconnect");
- $edu_data .= "<TABLE width=100% class=bul>";
- if($id == "1") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>���ǡ���֡�ҷ�����</B></CENTER><TD>";
- $edu_data .= "</TR>";
- } else if($id == "2") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>�����ͷ�</B></CENTER><TD>";
- $edu_data .= "</TR>";
- }
- else if($id == "3") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>�������</B></CENTER><TD>";
- $edu_data .= "</TR>";
- }
- else if($id == "4") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>���</B></CENTER><TD>";
- $edu_data .= "</TR>";
- }
- else if($id == "5") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>��ԷԹ����ͺ�觢ѹ</B></CENTER><TD>";
- $edu_data .= "</TR>";
- }
- else if($id == "6") {
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>�����Ե��Ш��ѹ</B></CENTER><TD>";
- $edu_data .= "</TR>";
- }
- $edu_data .= "</TABLE>";
- $edu_data .= "<TABLE width=100% class=bul>";
- $newsinfirst=50; //�ӹǹ��Ǣ�͢����˹���á
- $newinpage=50; //�ӹǹ��Ǣ�͢��ǵ��˹��˹��
- $sql="select nid,ndate,ntopic,comefrom,nread,typeid from newsall where typeid='$id' order by nid desc limit 0,$newsinfirst";
- $result = mysql_query($sql);
- while ($newsrow=mysql_fetch_array($result)) {
- $nid = $newsrow[nid];
- $comefrom = $newsrow[comefrom];
- $ntopic = $newsrow[ntopic];
- $nread = $newsrow[nread];
- $edu_data .= "<tr ";
- if(!$a){
- $edu_data .= "bgcolor=\"#e7f3fa\"";
- } else {
- $edu_data .= "bgcolor=\"#FFFFFF\"";
- }
- $edu_data .= " >";
- $edu_data .= " ";
- $edu_data .= "<IMG SRC=\"images2/ci_insert.gif\" BORDER=\"0\" > ";
- $edu_data .= "<FONT COLOR=\"#606060\">";
- //$edu_data .= " <font size=2 face=MS sans serif color=#FF0000>�ѹ��� ".$db->DateStrThai($ndate);
- //$edu_data .= " ".$db->DateStrThai($ndate)."\" ";
- $edu_data .= " <A HREF=\"education_detail.php?topic=".$nid."\"target=\"bank\">";
- $edu_data .= $ntopic."</A>";
- $edu_data .= " <font size=2 face=MS sans serif color=#CC00FF>��ҹ ".$nread." ��</FONT><br>";
- $edu_data .= "</td>";
- $edu_data .= "</tr>";
- $a=!$a;
- }
- //===========��ǹ�ͧ�Ţ˹��
- $edu_data .= "</TABLE>";
- $objResponse->addAssign("form_data", "innerHTML",$edu_data);
- return $objResponse;
- $db->close();
- }
- function Show_News($id){
- $db = new ConnectMySQL;
- $db->connect();
- //$objResponse = new xajaxResponse();
- $objResponse = new xajaxResponse("TIS-620");
- //$objResponse->addScriptCall("dbconnect");
- $news_data .= "<TABLE width=100% class=bul>";
- $news_data .= "<TR>";
- $news_data .= "<TD align=right bgcolor=#FFFFFF><input type=button onclick = xajax_FormAddNews(); name=Submit value=�������ǻ�Ъ�����ѹ������ /> <input type=button onclick = showdivnonenews(); return false; name=Submit value=�Դ˹�ҵ�ҧ�������ǻ�Ъ�����ѹ�� /><TD>";
- $news_data .= "</TR>";
- $news_data .= "<TR>";
- $news_data .= "<TD bgcolor=#FFCCFF><CENTER><B>���ǻ�Ъ�����ѹ�������</B></CENTER><TD>";
- $news_data .= "</TR>";
- $news_data .= "</TABLE>";
- $news_data .= "<TABLE width=100% class=bul>";
- $newsinfirst=80; //�ӹǹ��Ǣ�͢����˹���á
- $newinpage=50; //�ӹǹ��Ǣ�͢��ǵ��˹��˹��
- $sql="select nid,typeid,ndate,ntopic,comefrom,nread,status from news where status='1' and typeid='$id' order by nid desc limit 0,$newsinfirst";
- $result = mysql_query($sql);
- while ($newsrow=mysql_fetch_array($result)) {
- $nid = $newsrow[nid];
- $ndate = $newsrow[ndate];
- $comefrom = $newsrow[comefrom];
- $ntopic = $newsrow[ntopic];
- $nread = $newsrow[nread];
- $news_data .= "<tr ";
- if(!$a){
- $news_data .= "bgcolor=\"#e7f3fa\"";
- } else {
- $news_data .= "bgcolor=\"#FFFFFF\"";
- }
- $news_data .= " >";
- $news_data .= " ";
- $news_data .= "<IMG SRC=\"images2/ci_insert.gif\" BORDER=\"0\" > ";
- $news_data .= "<FONT COLOR=\"#606060\">";
- //$edu_data .= " <font size=2 face=MS sans serif color=#FF0000>�ѹ��� ".$db->DateStrThai($ndate);
- $news_data .= " ".$db->DateStrThai($ndate)."\" ";
- $news_data .= " <A HREF=\"official_government_news_detail.php?news=".$nid."\"target=\"bank\">";
- $news_data .= $ntopic."</A>";
- $news_data .= " <font size=2 face=MS sans serif color=#CC00FF>��ҹ ".$nread."</FONT>/<font size=2 face=MS sans serif color=#FF9900>";
- $sqlnum="select * from newsdetail where ncode = '$nid'";
- $resultnum = mysql_query($sqlnum);
- $news_data .= $num_rows = mysql_num_rows($resultnum);
- $news_data .= "</FONT> <br></td>";
- $news_data .= "</tr>";
- $a=!$a;
- }
- //===========��ǹ�ͧ�Ţ˹��
- $news_data .= "</TABLE>";
- $objResponse->addAssign("form_data", "innerHTML",$news_data);
- //$objResponse->addScriptCall("showdivnonenews");
- return $objResponse;
- $db->close();
- }
- function FormAddNews(){
- $db = new ConnectMySQL;
- $db->connect();
- $objResponse = new xajaxResponse("TIS-620");
- $objResponse->addScriptCall("showdivblocknews");
- $template = new Template_all;
- $data = $template->GetTemplate('addnews_template.tpl');
- $objResponse->addAssign("form_add_news", "innerHTML",$data);
- return $objResponse;
- }
- function InsertForm_News($frm_action){
- $db = new ConnectMySQL;
- $db->connect();
- $checkemail = new Class_Form;
- $objResponse = new xajaxResponse("TIS-620");
- $board_subject = $frm_action["board_subject"];
- $txttype = $frm_action["txttype"];
- $txtcomefrom = $frm_action["txtcomefrom"];
- $board_email = $frm_action["board_email"];
- $txtdetail = $frm_action["txtdetail"];
- if ($checkemail->check_email($board_email) == TRUE)
- {
- if (($txtcomefrom == "") or ($board_subject == "") or ($board_email == "")){
- $objResponse->Addalert("��سҡ�͡���������ú ��ǹ");
- }
- else
- {
- $ndate=date("Y/m/d");
- if ($board_name == "Viagra")
- {
- $data .="<CENTER>�ѹ�֡�������������</CENTER><br>";
- }
- else
- {
- $sql1= "INSERT INTO news (nid,typeid, ntopic, ndetail, ndate,nread,comefrom,status,email) VALUES ('NULL','$txttype','$board_subject','$txtdetail','$ndate','0','$txtcomefrom','0','$board_email')";
- $dbquery1 = mysql_query($sql1);
- if (!$dbquery1)
- {
- $objResponse->Addalert("�ѹ�֡�������������");
- }
- else
- {
- $objResponse->addAssign("board_name", "value","");
- $objResponse->addAssign("board_subject", "value","");
- $objResponse->addAssign("board_email", "value","");
- $objResponse->addAssign("txtcomefrom", "value","");
- $objResponse->Addalert("�ѹ�֡���������º�������� ��س��͡����ѵ��ѡ����");
- $objResponse->redirect("add_news.php");
- }
- }
- }
- }
- else
- {
- $objResponse->Addalert("��سҡ�͡�ٻẺ E-Mail ���١��ͧ���¤�Ѻ");
- }
- return $objResponse;
- $db->close();
- }
- function FormAddBoard(){
- $db = new ConnectMySQL;
- $db->connect();
- $objResponse = new xajaxResponse("TIS-620");
- $objResponse->addScriptCall("showdivblocknews");
- $template = new Template_all;
- $data = $template->GetTemplate('addboard_template.tpl');
- $objResponse->addAssign("form_data", "innerHTML",$data);
- return $objResponse;
- }
- function InsertForm_Board($frm_action,$edittor){
- $db = new ConnectMySQL;
- $db->connect();
- $checkemail = new Class_Form;
- $objResponse = new xajaxResponse("TIS-620");
- $board_subject = $frm_action["board_subject"];
- $txtgroup = $frm_action["txtgroup"];
- $txtcomefrom = $frm_action["txtcomefrom"];
- if (($txtcomefrom == "") or ($board_subject == "")){
- $objResponse->Addalert("��سҡ�͡���������ú ��ǹ");
- }
- else
- {
- $msg_new=$checkemail->CheckRude($edittor);
- $ndate=date("Y/m/d");
- $sql1= "INSERT INTO board (nid, ntopic, ndetail, ndate,nread,comefrom,unit) VALUES ('NULL','$board_subject','$msg_new','$ndate','0','$txtcomefrom','$txtgroup')";
- $dbquery1 = mysql_query($sql1);
- if (!$dbquery1)
- {
- $objResponse->Addalert("�ѹ�֡�������������");
- }
- else
- {
- $objResponse->addAssign("board_name", "value","");
- $objResponse->addAssign("board_subject", "value","");
- $objResponse->addAssign("txtcomefrom", "value","");
- $objResponse->Addalert("�ѹ�֡���������º��������");
- $objResponse->addScriptCall("clear_ed_text","News_Editor"); //��ҧ������� edittor
- }
- }
- return $objResponse;
- $db->close();
- }
- function Show_Board(){
- $db = new ConnectMySQL;
- $db->connect();
- //$objResponse = new xajaxResponse();
- $objResponse = new xajaxResponse("TIS-620");
- //$objResponse->addScriptCall("dbconnect");
- $edu_data .= "<TABLE width=100% class=bul>";
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>���ǡ���֡�ҷ�����</B></CENTER><TD>";
- $edu_data .= "</TR>";
- $edu_data .= "</TABLE>";
- $edu_data .= "<TABLE width=100% class=bul>";
- $newsinfirst=30; //�ӹǹ��Ǣ�͢����˹���á
- $newinpage=50; //�ӹǹ��Ǣ�͢��ǵ��˹��˹��
- $sql="select nid,ndate,ntopic,nread from board order by nid desc limit 0,$newsinfirst";
- $result = mysql_query($sql);
- while ($newsrow=mysql_fetch_array($result)) {
- $nid = $newsrow[nid];
- //$ndate = $newsrow[ndate];
- $ntopic = $newsrow[ntopic];
- $nread = $newsrow[nread];
- $edu_data .= "<tr ";
- if(!$a){
- $edu_data .= "bgcolor=\"#e7f3fa\"";
- } else {
- $edu_data .= "bgcolor=\"#FFFFFF\"";
- }
- $edu_data .= " >";
- $edu_data .= " ";
- $edu_data .= "<IMG SRC=\"images2/ci_insert.gif\" BORDER=\"0\" > ";
- $edu_data .= "<FONT COLOR=\"#606060\">";
- //$edu_data .= " <font size=2 face=MS sans serif color=#FF0000>�ѹ��� ".$db->DateStrThai($ndate);
- //$edu_data .= " ".$db->DateStrThai($ndate)."\" ";
- $edu_data .= " <A HREF=\"education_detail.php?topic=".$nid."\"target=\"bank\">";
- $edu_data .= $ntopic."</A>";
- $edu_data .= " <font size=2 face=MS sans serif color=#CC00FF>��ҹ ".$nread." ��</FONT><br>";
- $edu_data .= "</td>";
- $edu_data .= "</tr>";
- $a=!$a;
- }
- //===========��ǹ�ͧ�Ţ˹��
- $edu_data .= "</TABLE>";
- $objResponse->addAssign("form_data", "innerHTML",$edu_data);
- return $objResponse;
- $db->close();
- }
- function Show_StatusVIP_Expert(){
- $db = new ConnectMySQL;
- $db->connect();
- //$objResponse = new xajaxResponse();
- $objResponse = new xajaxResponse("TIS-620");
- $news_data .= "<TABLE width=100% class=bul>";
- $news_data .= "<TR>";
- $news_data .= "<TD bgcolor=#FFCCFF><CENTER><B>��ª�����Ҫԡ VIP ��������������</B></CENTER><TD>";
- $news_data .= "</TR>";
- $news_data .= "</TABLE>";
- $news_data .= "<TABLE width=100% class=bul>";
- $today = date("Y-m-d");
- $newsinfirst=30; //�ӹǹ��Ǣ�͢����˹���á
- $newinpage=50; //�ӹǹ��Ǣ�͢��ǵ��˹��˹��
- $sql="select * from tviptest order by UserID desc";
- $result = mysql_query($sql);
- while ($row=mysql_fetch_array($result)) {
- $UserID = $row["UserID"];
- $name = $row["name"];
- $province = $row["province"];
- $email = $row["email"];
- $tel = $row["tel"];
- $ndatestart = $row["ndatestart"];
- $ndateend = $row["ndateend"];
- $news_data .= "<tr ";
- if(!$a){
- $news_data .= "bgcolor=\"#e7f3fa\"";
- } else {
- $news_data .= "bgcolor=\"#FFFFFF\"";
- }
- $news_data .= " >";
- $news_data .= "<td> ";
- $news_data .= "<IMG SRC=\"images2/ci_insert.gif\" BORDER=\"0\" > ";
- $news_data .= "<A Href=# onclick = xajax_Show_Detail_VIP(".$UserID.");>$name</a></td>";
- $news_data .= "<td><A Href=# onclick = xajax_Show_Detail_VIP(".$UserID.");>$email</a></td>";
- $news_data .= "<td><A Href=# onclick = xajax_Show_Detail_VIP(".$UserID.");>$tel</a></td>";
- $news_data .= "<td align=center>";
- if ($ndateend < $today) {
- $news_data .= "<FONT SIZE=2 COLOR=#FF0000>�����������</FONT>";
- }
- else {
- $news_data .= "��ҹ����";
- }
- $news_data .= "</td>";
- $news_data .= "</tr>";
- $a=!$a;
- }
- //===========��ǹ�ͧ�Ţ˹��
- $news_data .= "</TABLE>";
- $objResponse->addAssign("form_data", "innerHTML",$news_data);
- return $objResponse;
- $db->close();
- }
- function Show_Detail_VIP_Expert($id){
- $db = new ConnectMySQL;
- $db->connect();
- $objResponse = new xajaxResponse("TIS-620");
- $edu_data .= "<Form name=frmVIP id =frmVIP>";
- $edu_data .= "<TABLE width=100% class=bul >";
- $edu_data .= "<TR>";
- $edu_data .= "<td colspan=2 align=right><input type=button onclick = xajax_FormAddVIP(); name=Submit value=�Դ������ѹ�֡��������Ҫԡ VIP > <input type=button onclick = showdivnoneeditvip(); return false; name=Submit value=�Դ������ѹ�֡��������Ҫԡ VIP></td>";
- $edu_data .= "</TR>";
- $edu_data .= "<TR>";
- $edu_data .= "<TD bgcolor=#FFCCFF><CENTER><B>��������´��������Ҫԡ VIP</B></CENTER><TD>";
- $edu_data .= "</TR>";
- $edu_data .= "</TABLE>";
- $edu_data .= "<TABLE width=100% class=bul border=0 background=images4/bg.gif>";
- $sql = "select * from tviptest where UserID = '$id' ";
- $result = mysql_query($sql) or die(mysql_error());
- $row=mysql_fetch_array($result);
- $UserID = $row["UserID"];
- $name = $row["name"];
- $province = $row["province"];
- $email = $row["email"];
- $tel = $row["tel"];
- $UserName = $row["UserName"];
- $Pass = $row["Pass"];
- $ndatestart = $row["ndatestart"];
- $ndateend = $row["ndateend"];
- $edu_data .= "<tr><td align=right><B>���� : </B></td><td><INPUT TYPE=text NAME=UserID size=20 value=$UserID readonly></td></tr>";
- $edu_data .= "<tr><td align=right><B>����-ʡ�� : </B></td><td><INPUT TYPE=text NAME=txtname value=$name></td></tr>";
- $edu_data .= "<tr><td align=right><B>E-mail : </B></td><td><INPUT TYPE=text NAME=email value=$email size=40></td></tr>";
- $edu_data .= "<tr><td align=right><B>Tel : </B></td><td><INPUT TYPE=text NAME=tel value=$tel></td></tr>";
- $edu_data .= "<tr><td align=right><B>�ѧ��Ѵ : </B></td><td><INPUT TYPE=text NAME=province value=$province></td></tr>";
- $edu_data .= "<tr><td align=right><B>UserName : </B></td><td><INPUT TYPE=text NAME=UserName value=$UserName></td></tr>";
- $edu_data .= "<tr><td align=right><B>Password : </B></td><td><INPUT TYPE=text NAME=Pass value=$Pass></td></tr>";
- $edu_data .= "<tr><td align=right><B>�ѹ�����Ѥ� : </B></td><td><INPUT TYPE=text NAME=ndatestart value=$ndatestart></td></tr>";
- $edu_data .= "<tr><td align=right><B>�ѹ���������� : </B></td><td><INPUT TYPE=text NAME=ndateend value=$ndateend></td></tr>";
- $edu_data .= "<tr><td align=right height=20></td><td><input type=button name=Submit value=�ѹ�֡��� onclick=xajax_UpdateDataDetail_Vip(xajax.getFormValues('frmVIP')); return false;></td></tr>";
- $edu_data .= "<tr><td align=right height=40></td><td></td></tr>";
- $edu_data .= "<tr><td align=right><B> </B></td><td><A Href=# onclick = xajax_Show_StatusVIP();>����Ѻ</a></td></tr>";
- $edu_data .= "</TABLE>";
- $edu_data .= "</Form>";
- $objResponse->addAssign("form_data", "innerHTML",$edu_data);
- return $objResponse;
- $db->close();
- }
- }
- ?>
- <div id="teaser3" style="float:right;position:absolute;top:0;">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- 120x600 -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:120px;height:600px"
- data-ad-client="ca-pub-4312695197724803"
- data-ad-slot="7154503891"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script><br>
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- 120x600 -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:120px;height:600px"
- data-ad-client="ca-pub-4312695197724803"
- data-ad-slot="7154503891"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement