View access
Public
Alias
e-gp
Captcha
captcha
Category (main)
Created by alias
Disable comments
disable_comments
Displaying parameters
display_params
ID
188
Version information
item_screen
JImages
jimages
JUrls
jurls
Language
All
Language associations
lang_assocs
Layout parameters
layout_params
Layout selection
layout_selection
META data
{"robots":null,"xreference":"","author":"","rights":""}
Notify owner
notify_owner
Notify subscibers
notify_subscribers
Permissions
perms
Publish down (date)
0000-00-00 00:00:00
Publish up (date)
2020-07-06 02:03:25
SEO configuration
seoconf
Timezone info
timezone_info
Versions
versions
Publish changes
vstate
$depid = "5520801"; $aType = array('P0', '15', 'B0', 'D0', 'W0', 'D1', 'W1', 'D2', 'W2'); $aCat = array(11, 12, 13, 14, 15, 16, 17, 18, 19); //รหัสหมวดหมู่ สำหรับแยกประเภทประกาศ anounceType date_default_timezone_set('Asia/Bangkok'); $begintime1 = strtotime("12:01:01"); $endtime1 = strtotime("12:59:00"); $begintime2 = strtotime("17:01:01"); $endtime2 = strtotime("24:00:00"); $begintime3 = strtotime("00:00:01"); $endtime3 = strtotime("08:59:59"); $now = time(); if (($now >= $begintime1 && $now <= $endtime1) || ($now >= $begintime2 && $now <= $endtime2) || ($now >= $begintime3 && $now <= $endtime3)) { $i = 0; foreach ($aType as $newsType) { //ประเภทประกาศ $url = "http://process3.gprocurement.go.th/EPROCRssFeedWeb/egpannouncerss.xml?deptId=" . $depid . "&anounceType=" . $newsType; libxml_use_internal_errors(true); $doc = simplexml_load_string(file_get_contents($url)); if ($doc === false) { libxml_clear_errors(); libxml_use_internal_errors($doc); } else { $items = $doc->xpath("/rss/channel/item"); foreach ($items as $item) { $db = & JFactory::getDBO(); $sql = "SELECT * FROM #__content WHERE `introtext` LIKE '%" . TRIM($item->link) . "%' AND catid = " . $aCat[$i]; $db->setQuery($sql); $db->query(); if (!$db->getNumRows()) { $item_title = $item->title; $item_alias = preg_replace("/\s+/", "_", $item_title); $item_content = "link) . "\" targer=\"_blank\">\"Readmore?\""; $article['title'] = $item_title; $article['alias'] = $item_alias; $article['introtext'] = $item_content; $article['catid'] = $aCat[$i]; $article['created'] = JFactory::getDate()->format('Y-m-d-H-i-s'); $article['created_by_alias'] = 'Super User'; $article['state'] = 1; $article['access'] = 1; $article['metadata'] = '{"page_title":"","author":"","robots":""}'; $article['language'] = '*'; if (version_compare(JVERSION, '3.0', 'lt')) { JTable::addIncludePath(JPATH_PLATFORM . 'joomla/database/table'); } $table = JTable::getInstance('Content', 'JTable', array()); $table->bind($article); $table->check(); $store = $table->store(); if ($store == true) { $db = & JFactory::getDBO(); $sql = "UPDATE #__content SET `title`='" . $item_title . "' WHERE id = " . $table->id; $db->setQuery($sql); $db->query(); } } } $i++; } } } else { } //********************************//

Demo ข่าวสารความเคลื่อนไหว

ข้อมูลข่าวสารอัพเดทของหน่วยงานของเรา

Text Here

 

สนใจติดต่อโฆษณา

086-1902513

085-7081347

083-5371127

 

หรือ

 

ส่งข่าวประชาสัมพันธ์ หน่วยงาน ร้านค้า

https://www.facebook.com/patiwat.toom

 

ID Line1 :Pattoom

Text Here
Text Here

จำนวนผู้เยี่ยมชม

วันนี้ 7

วันนี้ 35

สัปดาห์นี้ 140

เดือนนี้ 851

รวม 33110

Currently are 10 guests and no members online

Kubik-Rubik Joomla! Extensions

มี 243 ผู้มาเยือน และ ไม่มีสมาชิกออนไลน์ ออนไลน์