function detailAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(TRUE); $folderGuid = $this->_getParam('folderGuid') ? $this->_getParam('folderGuid') : ''; $start = $this->_getParam('start') ? $this->_getParam('start') : 0; $limit = $this->_getParam('limit') ? $this->_getParam('limit') : 0; $rowset = App_Model_Show_Catalog::show()->fetchFromFolder($folderGuid, $start, $limit); $content = 0; $data = array(); $array_hari = array(1 => "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"); $a['folderGuid'] = $folderGuid; $a['totalCount'] = count($rowset); $ii = 0; if ($a['totalCount'] != 0) { foreach ($rowset as $row) { $registry = Zend_Registry::getInstance(); $config = $registry->get(Pandamp_Keys::REGISTRY_APP_OBJECT); $cdn = $config->getOption('cdn'); $sDir = $cdn['static']['url']['images']; $smg = $cdn['static']['images']; $thumb = ""; $rowsetRelatedItem = App_Model_Show_RelatedItem::show()->getDocumentById($row['guid'], 'RELATED_IMAGE'); $itemGuid = isset($rowsetRelatedItem['itemGuid']) ? $rowsetRelatedItem['itemGuid'] : ''; if ($itemGuid) { if (Pandamp_Lib_Formater::thumb_exists($sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".jpg")) { $thumb = $sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".jpg"; } if (Pandamp_Lib_Formater::thumb_exists($sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".gif")) { $thumb = $sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".gif"; } if (Pandamp_Lib_Formater::thumb_exists($sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".png")) { $thumb = $sDir . "/" . $rowsetRelatedItem['relatedGuid'] . "/" . $itemGuid . ".png"; } } if ($thumb == "") { $thumb = $sDir . "/slider/image1.jpg"; } $screenshot = "<img src=\"" . $thumb . "\" vspace=\"0\" width=\"104\" border=\"0\" hspace=\"0\" align=\"left\" />"; $a['index'][$ii]['title'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $a['index'][$ii]['shortTitle'] = $row['shortTitle']; $a['index'][$ii]['guid'] = $row['guid']; $a['index'][$ii]['realprice'] = $row['price']; $a['index'][$ii]['price'] = 'Rp ' . number_format($row['price'], 0, ',', '.'); $a['index'][$ii]['desc'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $hari = $array_hari[date("N", strtotime($row['publishedDate']))]; $a['index'][$ii]['publish'] = $hari . ', ' . date("d F Y", strtotime($row['publishedDate'])); $a['index'][$ii]['images'] = '<div class="width1 column first ta-center">' . $screenshot . '</div>'; $ii++; } } if ($a['totalCount'] == 0) { $a['index'][0]['title'] = "-"; $a['index'][0]['shortTitle'] = "-"; $a['index'][0]['guid'] = "-"; $a['index'][0]['publish'] = "-"; $a['index'][0]['desc'] = "-"; } echo Zend_Json::encode($a); }
public function getFotoAttributeName($catalogGuid) { $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if (isset($rowset)) { $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedTitle'); } return $title; }
public function getCatalogShortTitle($guid) { $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($guid); if ($rowset) { return $rowset['shortTitle']; } else { return 'no-title'; } }
function pokrolAction() { $ct = $this->_getParam('ko') ? $this->_getParam('ko') : ''; $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid("lt4b457ff0c3e1b"); $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedTitle'); $content = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedContent'); $this->view->title = $title; $this->view->content = $content; $this->view->catalogGuid = "lt4b457ff0c3e1b"; $this->view->ct = $ct; }
public function getCatalogAttribute($catalogGuid, $value) { $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if ($rowset) { $attr = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], $value); if (isset($attr) && !empty($attr)) { return $attr; } else { return 'No-Title'; } } }
/** * Add link to sitemap */ public function addAction() { $this->_helper->getHelper('layout')->disableLayout(); $this->_helper->getHelper('viewRenderer')->setNoRender(); $config = Pandamp_Config::getConfig(); $file = ROOT_DIR . DS . 'sitemap_news.xml'; $output = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">' . PHP_EOL; //$folderGuid = array('fb16','lt4a0a533e31979','fb29'); $profileGuid = array('article', 'klinik', 'kutu_peraturan'); $rowset = App_Model_Show_Catalog::show()->fetchNewsCatalog($profileGuid, 0, 50); foreach ($rowset as $row) { if ($row['profileGuid'] == 'klinik') { $clinicTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedCommentTitle'); $url = $config->web->url->base . DS . 'klinik' . DS . 'detail' . DS . $row['guid'] . DS . App_Model_Show_CatalogAttribute::show()->getFormatedURLForKlinikTitle($clinicTitle); } else { if ($row['profileGuid'] == 'kutu_peraturan') { $peraturanTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $peraturanSubTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedSubTitle'); $url = $config->web->url->base . DS . 'pusatdata' . DS . 'detail' . DS . $row['guid'] . DS . 'node' . DS . $row['folderGuid'] . DS . App_Model_Show_CatalogAttribute::show()->getFormatedURLForDetalPeraturan($peraturanTitle, $peraturanSubTitle); } else { $url = $config->web->url->base . DS . 'berita' . DS . 'baca' . DS . $row['guid'] . DS . $row['shortTitle']; } } $loc = $url; $pubDate = date('D, d M Y h:i:s O', strtotime($row['publishedDate'])); $keywords = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedKeywords'); //$item = new Pandamp_Seo_Sitemap_Item($loc, $pubDate); //Pandamp_Seo_Sitemap::addToSitemap($file, $item); $output .= "\t<url>" . "\n"; $output .= "\t\t<loc>" . "\n"; $output .= "\t\t\t{$loc}" . "\n"; $output .= "\t\t</loc>" . "\n"; $output .= "\t\t<news:news>" . "\n"; $output .= "\t\t\t<news:publication_date>" . "\n"; $output .= "\t\t\t\t{$pubDate}" . "\n"; $output .= "\t\t\t</news:publication_date>" . "\n"; if ($keywords) { $output .= "\t\t\t<news:keywords>" . "\n"; $output .= "\t\t\t\t{$keywords}" . "\n"; $output .= "\t\t\t</news:keywords>" . "\n"; } $output .= "\t\t</news:news>" . "\n"; $output .= "\t</url>" . "\n"; } $output .= '</urlset>'; /** * Write to file */ $f = fopen($file, 'w'); fwrite($f, $output); fclose($f); return true; }
function indextalksAction() { $folderGuid = $this->_getParam('folderGuid') ? $this->_getParam('folderGuid') : 'lt4a607b5e3c2f2'; $data = array(); $rowset = $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4a607b5e3c2f2'); $num_rows = count($rowset); $limit = 10; $data['folderGuid'] = $folderGuid; $data['totalCount'] = $num_rows; $data['totalCountRows'] = $num_rows; $data['limit'] = $limit; $this->view->aData = $data; }
public function getClinicCategory($catalogGuid) { $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if ($rowset) { $category = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedKategoriKlinik'); /* Get Category from profile clinic_category */ $findCategory = App_Model_Show_Catalog::show()->getCatalogByGuid($category); if (isset($findCategory)) { $category = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($findCategory['guid'], 'fixedTitle'); } return $category; } }
public function selectProfile($attributes = array()) { $selectedId = isset($attributes['selected']) ? $attributes['selected'] : null; $disableId = isset($attributes['disable']) ? $attributes['disable'] : null; $output = "<select class='{$attributes['class']}' name='{$attributes['name']}' id='{$attributes['id']}'>" . self::EOL . '<option value="">---</option>' . self::EOL; $profile = App_Model_Show_Catalog::show()->getProfile(); foreach ($profile as $p) { $selected = $selectedId == null || $selectedId != $p['guid'] ? '' : ' selected="selected"'; $disable = $disableId == null || $disableId != $p['guid'] ? '' : ' disabled'; $output .= sprintf('<option value="%s"%s%s>%s</option>', $p['guid'], $selected, $disable, $p['guid']) . self::EOL; } $output .= '</select>' . self::EOL; return $output; }
public function selectYear($attributes = array()) { $selectedId = isset($attributes['selected']) ? $attributes['selected'] : null; $disableId = isset($attributes['disable']) ? $attributes['disable'] : null; $output = "<select onchange='javascript:document.report.submit();' class='{$attributes['class']}' name='{$attributes['name']}' id='{$attributes['id']}'>" . self::EOL . '<option value="">---</option>' . self::EOL; $year = App_Model_Show_Catalog::show()->getYear(); foreach ($year as $p) { $selected = $selectedId == null || $selectedId != $p['cd'] ? '' : ' selected="selected"'; $disable = $disableId == null || $disableId != $p['cd'] ? '' : ' disabled'; $output .= sprintf('<option value="%s"%s%s>%s</option>', $p['cd'], $selected, $disable, $p['cd']) . self::EOL; } $output .= '</select>' . self::EOL; return $output; }
function fgalAction() { //$rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4d5ca623676b2',0,5); $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4d92a915a8760', 0, 5); $content = 0; $data = array(); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['guid']; $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
function indexAction() { $this->_helper->layout->disableLayout(); $this->getHelper('viewRenderer')->setNoRender(true); $registry = Zend_Registry::getInstance(); $config = $registry->get(Pandamp_Keys::REGISTRY_APP_OBJECT); $cdn = $config->getOption('cdn'); $sDir = $cdn['static']['url']['images']; $content = 0; $entries = array(); $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4aaa29322bdbb', 0, 10); foreach ($rowset as $row) { $rowsetRelatedItem = App_Model_Show_RelatedItem::show()->getDocumentById($row['guid'], 'RELATED_IMAGE'); $itemGuid = isset($rowsetRelatedItem['itemGuid']) ? $rowsetRelatedItem['itemGuid'] : ''; $chkDir = $sDir . "/" . $row['guid'] . "/" . $itemGuid; if (@getimagesize($chkDir)) { $pict = $sDir . "/" . $row['guid'] . "/" . $itemGuid; } else { $pict = $sDir . "/" . $itemGuid; } if (Pandamp_Lib_Formater::thumb_exists($pict . ".jpg")) { $thumb = $pict . ".jpg"; } if (Pandamp_Lib_Formater::thumb_exists($pict . ".gif")) { $thumb = $pict . ".gif"; } if (Pandamp_Lib_Formater::thumb_exists($pict . ".png")) { $thumb = $pict . ".png"; } $entries[$content]['title'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $entries[$content]['link'] = ROOT_URL . '/berita/baca/' . $row['guid'] . '/' . $row['shortTitle']; $entries[$content]['guid'] = ROOT_URL . '/berita/baca/' . $row['guid'] . '/' . $row['shortTitle']; $entries[$content]['pubDate'] = strtotime($row['publishedDate']); if (!empty($thumb)) { $d = "<img src=\"" . $thumb . "\" align=\"left\" hspace=\"7\" width=\"100\" />" . $this->limitword(2, App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedContent')); $entries[$content]['description'] = $d; $size = getimagesize($thumb); $entries[$content]['enclosure'] = array(array('url' => $thumb, 'type' => $size['mime'], 'length' => '10240')); } else { $d = $this->limitword(2, App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedContent')); $entries[$content]['description'] = $d; } $content++; } $feed = Zend_Feed::importArray(array('title' => 'Hukumonline Warta', 'link' => ROOT_URL, 'description' => 'hukumonline.com sindikasi', 'image' => $cdn['static']['images'] . '/logo.gif', 'charset' => 'UTF-8', 'entries' => $entries), 'rss'); $feed->send(); }
function terbaruAction() { $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('fb16', 0, 5); $content = 0; $data = array(); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['shortTitle']; $data[$content][2] = date("d/m/y", strtotime($row['createdDate'])); $data[$content][3] = $row['guid']; $data[$content][4] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
public function selectBy($attributes = array()) { $selectedId = isset($attributes['selected']) ? $attributes['selected'] : null; $disableId = isset($attributes['disable']) ? $attributes['disable'] : null; $output = "<select onchange='javascript:document.peraturan.submit();' class='{$attributes['class']}' name='{$attributes['name']}' id='{$attributes['id']}'>" . self::EOL . '<option value="">All</option>' . self::EOL; $rowset = App_Model_Show_Catalog::show()->getCatalogBy($attributes['profile']); foreach ($rowset as $v) { if (empty($v['createdBy'])) { continue; } $selected = $selectedId == null || $selectedId != $v['createdBy'] ? '' : ' selected="selected"'; $disable = $disableId == null || $disableId != $v['createdBy'] ? '' : ' disabled'; $output .= sprintf('<option value="%s"%s%s>%s</option>', $v['createdBy'], $selected, $disable, $v['createdBy']) . self::EOL; } $output .= '</select>' . self::EOL; return $output; }
function headerAction() { $r = $this->getRequest(); $node = $r->getParam('node') ? $r->getParam('node') : 'root'; $menuFolder = App_Model_Show_Folder::show()->getMenu($node); $this->view->menuFolder = $menuFolder; $rowset = App_Model_Show_Catalog::show()->getCatalogByProfile("kategoriklinik"); $content = 0; $data = array(); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['guid']; $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
function foseAction() { $r = $this->getRequest(); $notGuid = $r->getParam('guid') ? $r->getParam('guid') : ''; $array_hari = array(1 => "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"); $rowset = App_Model_Show_Catalog::show()->fetchFromFolderException('lt4de5c32a53bd4', $notGuid, 0, 7); $content = 0; $data = array(); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['guid']; $data[$content][2] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedContent'); $hari = $array_hari[date("N", strtotime($row['publishedDate']))]; $data[$content][3] = $hari . ' ' . date("d/m/y H:i", strtotime($row['publishedDate'])); $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
function utamaAction() { $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4aaa29322bdbb', 0, 4); $content = 0; $data = array(); foreach ($rowset as $row) { $rowSumComment = App_Model_Show_Comment::show()->getParentCommentCount($row['guid']); $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = strftime("%H:%M", strtotime($row['createdDate'])); $data[$content][2] = $row['guid']; $data[$content][3] = $row['shortTitle']; $data[$content][4] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedAuthor'); $data[$content][5] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $data[$content][6] = $rowSumComment; $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
public function selectAuthor($attributes = array()) { $selectedId = isset($attributes['selected']) ? $attributes['selected'] : null; $disableId = isset($attributes['disable']) ? $attributes['disable'] : null; $config = Pandamp_Config::getConfig(); $cache = Pandamp_Cache::getInstance(); $output = "<select onchange='javascript:document.peraturan.submit();' class='{$attributes['class']}' name='{$attributes['name']}' id='{$attributes['id']}'>" . self::EOL . '<option value="">All</option>' . self::EOL; $author = App_Model_Show_Catalog::show()->getAuthor($attributes['profile']); for ($i = 0; $i < count($author); $i++) { if (empty($author[$i]['author'])) { continue; } if (isset($author[$i]['author'])) { $selected = $selectedId == null || $selectedId != $author[$i]['author'] ? '' : ' selected="selected"'; $disable = $disableId == null || $disableId != $author[$i]['author'] ? '' : ' disabled'; $output .= sprintf('<option value="%s"%s%s>%s</option>', $author[$i]['author'], $selected, $disable, $author[$i]['author']) . self::EOL; } } $output .= '</select>' . self::EOL; return $output; }
function browseAction() { $r = $this->getRequest(); $page = $r->getParam('page'); $rowset = App_Model_Show_Catalog::show()->fetchFromFolder($page); $content = 0; $data = array(); foreach ($rowset as $row) { $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $description = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $data[$content][0] = $title; $data[$content][1] = $row['createdDate']; $data[$content][2] = $description; $data[$content][3] = $row['guid']; $data[$content][4] = $row['shortTitle']; $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
public function getCountCatalog($catalogGuid, $type) { $catalogs = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if ($catalogs && !in_array($catalogs['profileGuid'], array('partner', 'author', 'kategoriklinik'))) { switch ($type) { case 'desktop': if (in_array($catalogs['profileGuid'], array('article', 'talks', 'isuhangat', 'kutu_agenda', 'video', 'infografis'))) { $valueText = 'TICKER'; } else { if ($catalogs['profileGuid'] == 'klinik') { $valueText = 'klinik'; } else { if (in_array($catalogs['profileGuid'], array('kutu_peraturan', 'kutu_rancangan_peraturan', 'kutu_peraturan_kolonial', 'kutu_putusan'))) { $valueText = 'pusatdata'; } } } break; case 'mobile': if (in_array($catalogs['profileGuid'], array('article', 'talks', 'isuhangat', 'kutu_agenda', 'video', 'infografis'))) { $valueText = 'TICKER-MOBILE'; } else { if ($catalogs['profileGuid'] == 'klinik') { $valueText = 'klinik-mobile'; } else { if (in_array($catalogs['profileGuid'], array('kutu_peraturan', 'kutu_rancangan_peraturan', 'kutu_peraturan_kolonial', 'kutu_putusan'))) { $valueText = 'pusatdata-mobile'; } } } break; } $assetDb = new App_Model_Db_Table_AssetSetting(); $assets = $assetDb->fetchRow("guid='{$catalogGuid}' AND valueText='{$valueText}'"); if ($assets) { return $assets->valueInt; } } return; }
function terbaruAction() { $zl = Zend_Registry::get('Zend_Locale'); if ($zl->getLanguage() == "id") { $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('fb16', 0, 5); } else { $rowset = App_Model_Show_Catalog::show()->fetchFromFolderEn('lt481074ef14e7a', 0, 5); } $content = 0; $data = array(); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['shortTitle']; $data[$content][2] = date("d/m/y", strtotime($row['createdDate'])); $data[$content][3] = $row['guid']; $data[$content][4] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
public function clickAction() { $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $request = $this->getRequest(); $click = App_Model_Mongodb_RequestLog::click($request->getParam('periode')); foreach ($click['result'] as $key => $val) { $furl = $val['_id']; $url = pathinfo($furl); $guid = basename($url['dirname']); $title = basename($val['_id']); $catalogDb = App_Model_Show_Catalog::show()->getCatalogByGuid($guid); if ($catalogDb) { if ($catalogDb['profileGuid'] == 'klinik') { $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedCommentTitle'); } else { $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedTitle'); } } $click['result'][$key]['title'] = $title; } $this->getResponse()->setBody(Zend_Json::encode($click)); }
public function getShareCount($catalogGuid, $social) { $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); if (null === $viewRenderer->view) { $viewRenderer->initView(); } $view = $viewRenderer->view; $config = Pandamp_Config::getConfig(); $catalogs = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if ($catalogs && !in_array($catalogs['profileGuid'], array('partner', 'author', 'kategoriklinik'))) { if (in_array($catalogs['profileGuid'], ['article', 'isuhangat'])) { $uri = "berita/baca/" . $catalogs['guid'] . "/" . $catalogs['shortTitle']; } else { if ($catalogs['profileGuid'] == 'klinik') { $uri = "klinik/detail/" . $catalogs['guid'] . "/" . $catalogs['shortTitle']; } else { if (in_array($catalogs['profileGuid'], array('kutu_putusan', 'kutu_peraturan', 'kutu_rancangan_peraturan', 'kutu_peraturan_kolonial'))) { $node = $view->getNode($catalogs['guid']); $lnode = $view->getLabelNode($node); $uri = "pusatdata/detail/" . $catalogs['guid'] . "/" . $lnode . "/" . $node . "/" . $catalogs['shortTitle']; } } } $url = $config->web->url->base . DS . $uri; $sharecount = new Pandamp_Lib_ShareCount($url); switch ($social) { case 'facebook': return $sharecount->get_fb(); break; case 'twitter': return $sharecount->get_tweets(); break; } } return; }
public function getPrice($catalogGuid) { $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($catalogGuid); if ($rowset) { return $rowset['price']; } else { return 0; } }
function detailIndexWartaWComAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(TRUE); $folderGuid = $this->_getParam('folderGuid') ? $this->_getParam('folderGuid') : ''; $start = $this->_getParam('start') ? $this->_getParam('start') : 0; $limit = $this->_getParam('limit') ? $this->_getParam('limit') : 0; $a = array(); $rowset = App_Model_Show_Catalog::show()->fetchFromFolder($folderGuid, $start, $limit); $a['folderGuid'] = $folderGuid; $a['totalCount'] = App_Model_Show_Catalog::show()->getWartaCount($folderGuid); $ii = 0; if ($a['totalCount'] != 0) { foreach ($rowset as $row) { $a['indexcom'][$ii]['title'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $a['indexcom'][$ii]['shortTitle'] = $row['shortTitle']; $a['indexcom'][$ii]['createdDate'] = date("d/m/y", strtotime($row['createdDate'])); $a['indexcom'][$ii]['guid'] = $row['guid']; $ii++; } } if ($a['totalCount'] == 0) { $a['indexcom'][0]['title'] = "-"; $a['indexcom'][0]['shortTitle'] = "-"; $a['indexcom'][0]['createdDate'] = "-"; $a['indexcom'][0]['guid'] = "-"; } echo Zend_Json::encode($a); }
function pengasuhAction() { $author = $this->_getParam('guid') ? $this->_getParam('guid') : ''; $rowset = App_Model_Show_Catalog::show()->getCatalogByGuid($author); $this->view->author = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedTitle'); $this->view->description = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowset['guid'], 'fixedSubTitle'); }
function ueventAction() { $rowset = App_Model_Show_Catalog::show()->fetchFromFolder('lt4c93230c9d0a5', 0, 10); $content = 0; $data = array(); $array_hari = array(1 => "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"); foreach ($rowset as $row) { $data[$content][0] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedTitle'); $data[$content][1] = $row['guid']; $data[$content][2] = $row['shortTitle']; $data[$content][3] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedDescription'); $hari = $array_hari[date("N", strtotime($row['publishedDate']))]; $data[$content][4] = $hari . ', ' . date("d F Y", strtotime($row['publishedDate'])); $data[$content][5] = $row['price']; $content++; } $num_rows = count($rowset); $this->view->numberOfRows = $num_rows; $this->view->data = $data; }
function browseAction() { $this->_helper->layout->setLayout('layout-clinic'); $r = $this->getRequest(); $node = $r->getParam('node') ? $r->getParam('node') : 'root'; $modDir = $this->getFrontController()->getModuleDirectory(); require_once $modDir . '/components/Menu/ViewFolder.php'; $w = new Dms_Menu_ViewFolder($node); $this->view->widget1 = $w; $modDir = $this->getFrontController()->getModuleDirectory(); require_once $modDir . '/components/Menu/FolderBreadcrumbs.php'; $w = new Dms_Menu_FolderBreadcrumbs($node); $this->view->widget2 = $w; $modDir = $this->getFrontController()->getModuleDirectory(); require_once $modDir . '/components/Menu/TreeSlideMenu.php'; $w3 = new Dms_Menu_TreeSlideMenu(); $this->view->slideMenu = $w3; $this->view->currentNode = $node; $limit = $r->getParam('limit') ? $r->getParam('limit') : 25; $this->view->limit = $limit; $itemsPerPage = $limit; $this->view->itemsPerPage = $itemsPerPage; $offset = $r->getParam('offset') ? $r->getParam('offset') : 0; $this->view->offset = $offset; $sort = $r->getParam('sort') ? $r->getParam('sort') : "publishedDate"; $this->view->sort = $sort; $sortBy = $r->getParam('by') ? $r->getParam('by') : "desc"; $this->view->sortBy = $sortBy; $withSelected = $r->getParam('ws') ? $r->getParam('ws') : "withselected"; $this->view->withSelected = $withSelected; $status = $r->getParam('status') ? $r->getParam('status') : 0; $this->view->statusClinic = $status; // $rowset = App_Model_Show_Catalog::show()->fetchCatalogByStatus($status); $rowset = App_Model_Show_Catalog::show()->fetchFromFolderAdminClinic($status, $offset, $limit, $sort, $sortBy); // $solrAdapter = Pandamp_Search::manager(); //$numOfRows = App_Model_Show_CatalogFolder::show()->getCountCatalogGuidByFolderGuid($node); $numOfRows = App_Model_Show_Catalog::show()->countCatalogsInFolderClinic($status); // $numi = count($rowset); // $sSolr = "id:("; // for($i=0;$i<$numi;$i++) // { // $row = $rowset[$i]; // $sSolr .= $row['guid'] .' '; // } // $sSolr .= ')'; // // if(!$numi) $sSolr="id:(hfgjhfdfka)"; // // $solrResult = $solrAdapter->findAndSort($sSolr,$offset,$limit, array($sort.' '.$sortBy)); // $solrNumFound = count($solrResult->response->docs); // $this->view->totalItems = $solrResult->response->numFound; $this->view->totalItems = $numOfRows; // $this->view->hits = $solrResult; $this->view->hits = $rowset; $this->_helper->layout()->headerTitle = "Clinic"; }
function ibgAction() { set_time_limit(0); ini_set('max_execution_time', '0'); $this->_helper->viewRenderer->setNoRender(TRUE); $title = "<h4>HUKUMONLINE INDONESIA: <small>search</small></h4><hr/>"; echo $title . '<br>'; $solr = new Apache_Solr_Service('202.153.129.35', '8983', '/solr/core-catalog'); if (!$solr->ping()) { echo 'Solr service not responding.'; exit; } $indexingEngine = Pandamp_Search::manager(); $db = Zend_Registry::get('db1'); $query = "SELECT * FROM KutuCatalog WHERE guid IN ('lt5211a9dc6dda3','lt5211a831ab303','lt5211a6dbc1fd7','lt521182ee9af96','lt52117c0a1da99','lt5211b4d284ae1')"; $results = $db->query($query); $rowset = $results->fetchAll(PDO::FETCH_OBJ); $rowCount = count($rowset); echo $rowCount . '<br><br>'; for ($iCount = 0; $iCount < $rowCount; $iCount++) { $row = $rowset[$iCount]; $nextRow = $rowset[$iCount + 1]; $indexingEngine->indexCatalog($row->guid); $modelCatalog = App_Model_Show_Catalog::show()->getCatalogByGuid($row->guid); if ($modelCatalog['profileGuid'] == "klinik") { $sTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row->guid, "fixedCommentTitle"); } else { $sTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row->guid, "fixedTitle"); } $message = "\n \t\t<div class='box box-info closeable'>\n \t\t<b>[urutan:{$iCount}]</b> id : <abbr>" . $row->guid . " - " . $sTitle . "</abbr> data has been successfully indexed.\n <b>[next guid: " . $nextRow->guid . "]</b> - <i>" . $modelCatalog['profileGuid'] . "</i></div>"; echo $message . '<br>'; flush(); //sleep(30); } }
function detailIndexKlinikAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(TRUE); $dateDiff = new Pandamp_Lib_DateDiff(); $folderGuid = $this->_getParam('folderGuid') ? $this->_getParam('folderGuid') : ''; $start = $this->_getParam('start') ? $this->_getParam('start') : 0; $limit = $this->_getParam('limit') ? $this->_getParam('limit') : 0; $a = array(); $rowset = App_Model_Show_Catalog::show()->fetchFromFolder($folderGuid, $start, $limit); $a['folderGuid'] = $folderGuid; $a['totalCount'] = App_Model_Show_Catalog::show()->getWartaCount($folderGuid); $ii = 0; if ($a['totalCount'] != 0) { foreach ($rowset as $row) { $arraypictureformat = array("jpg", "jpeg", "gif"); $txt_allowedformat = implode('; ', $arraypictureformat); $registry = Zend_Registry::getInstance(); $config = $registry->get(Pandamp_Keys::REGISTRY_APP_OBJECT); $cdn = $config->getOption('cdn'); $sDir = $cdn['static']['dir']['photo']; $sDir2 = $cdn['static']['url']['photo'] . '/'; $smg = $cdn['static']['images']; $modelUser = App_Model_Show_User::show()->getUserByName($row['createdBy']); $x = 0; foreach ($arraypictureformat as $key => $val) { if (is_file($sDir . "/" . $modelUser['kopel'] . "." . $val)) { $myphoto = $sDir . "/" . $modelUser['kopel'] . "." . $val; $myext = $val; $x = 1; break; } } if ($x == 1) { $myphotosize = getimagesize($myphoto); $dis = ""; if (isset($myext) && is_file($sDir . "/" . $modelUser['kopel'] . "." . $myext)) { $txt_existence = "<img src=\"" . $sDir2 . $modelUser['kopel'] . "." . $myext . "\" class=\"avatar\" width=\"38\" height=\"38\" />"; } } else { $txt_existence = "<img src=\"" . $smg . "/gravatar-140.png\" width=\"38\" height=\"38\" class=\"avatar\" border=\"0\" />"; } $rowCatalogTitle = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedCommentTitle'); $rowCatalogQuestion = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedCommentQuestion'); $rowCatalogSelectCat = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedKategoriKlinik'); $author = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedSelectNama'); $source = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($row['guid'], 'fixedSelectMitra'); $a['index'][$ii]['title'] = $rowCatalogTitle; $a['index'][$ii]['question'] = $rowCatalogQuestion; $a['index'][$ii]['secat'] = $rowCatalogSelectCat; $a['index'][$ii]['category'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($rowCatalogSelectCat, 'fixedTitle'); $a['index'][$ii]['guid'] = $row['guid']; $a['index'][$ii]['createdBy'] = $row['createdBy']; $a['index'][$ii]['author'] = isset($author) ? $author : ''; if (isset($source)) { $a['index'][$ii]['source'] = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($source, 'fixedTitle'); $a['index'][$ii]['sid'] = $source; } else { $a['index'][$ii]['source'] = ''; $a['index'][$ii]['sid'] = ''; } $a['index'][$ii]['publishedDate'] = $dateDiff->ago(strftime('%Y-%m-%d %H:%M:%S', strtotime($row['publishedDate']))); $a['index'][$ii]['existence'] = '<div style="float:left;padding:2px;margin: 1px 10px 10px 0px;"><a href="">' . $txt_existence . '</a></div>'; $ii++; } } if ($a['totalCount'] == 0) { $a['index'][0]['title'] = "-"; $a['index'][0]['question'] = "-"; $a['index'][0]['category'] = "-"; $a['index'][0]['guid'] = "-"; $a['index'][0]['createdBy'] = "-"; $a['index'][0]['author'] = "-"; $a['index'][0]['source'] = "-"; $a['index'][0]['publishedDate'] = "-"; } echo Zend_Json::encode($a); }