<div class=" col-md-4 col-sm-6"> <h3 class="header" > <a href="general.php?sec=Young"> لجنة الشباب </a></h3> <?php $data = retrieve_data("alcYoungTable", 4); list($header, $text, $imgLink, $id) = $data; news_list("Young", $id, $header, $imgLink); ?> </div> <div class=" col-md-4 col-sm-6"> <h3 class="header"><a href="general.php?sec=School">مدرسة الكوثر</a></h3> <?php $data = retrieve_data("alcSchoolTable", 4); list($header, $text, $imgLink, $id) = $data; news_list("School", $id, $header, $imgLink); ?> </div> </div> <!-- ********* footer **************** --> <?php include "htmlPieces/footer.php"; ?> </div> <script src="js/jquery-2.1.4.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/script.js"></script>
function render_newsitem($news, $mode = 'default', $n_restrict = '', $NEWS_TEMPLATE = '', $param = array()) { global $NEWSSTYLE, $NEWSLISTSTYLE; if ($override_newsitem = e107::getSingleton('override', true)->override_check('render_newsitem')) { $result = call_user_func($override_newsitem, $news, $mode, $n_restrict, $NEWS_TEMPLATE, $param); if ($result == 'return') { return; } } if ($n_restrict == 'userclass') { $news['news_id'] = 0; $news['news_title'] = LAN_NEWS_1; $news['data'] = LAN_NEWS_2; $news['news_extended'] = ""; $news['news_allow_comments'] = 1; $news['news_start'] = 0; $news['news_end'] = 0; $news['news_render_type'] = 0; $news['comment_total'] = 0; } $tmp = array(); $tmp['caticon'] = defset('ICONSTYLE'); $tmp['commentoffstring'] = defset('COMMENTOFFSTRING'); $tmp['commentlink'] = defset('COMMENTLINK'); $tmp['trackbackstring'] = defset('TRACKBACKSTRING'); $tmp['trackbackbeforestring'] = defset('TRACKBACKBEFORESTRING'); $tmp['trackbackafterstring'] = defset('TRACKBACKAFTERSTRING'); $tmp['itemlink'] = defset('NEWSLIST_ITEMLINK'); $tmp['thumbnail'] = defset('NEWSLIST_THUMB', "border:0px"); $tmp['catlink'] = defset('NEWSLIST_CATLINK'); $tmp['caticon'] = defset('NEWSLIST_CATICON', defset('ICONSTYLE')); if (!$param) { $param = array(); } $param = array_merge($tmp, $param); // Next three images aren't always defined by the caller, even if most of $param is. //XXX All of this should be done via CSS from v2 on. if (!isset($param['image_nonew_small'])) { if (!defined("IMAGE_nonew_small")) { define("IMAGE_nonew_small", file_exists(THEME . "images/nonew_comments.png") ? "<img src='" . THEME_ABS . "images/nonew_comments.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/nonew_comments.png' alt='' />"); } $param['image_nonew_small'] = IMAGE_nonew_small; } if (!isset($param['image_new_small'])) { if (!defined("IMAGE_new_small")) { define("IMAGE_new_small", file_exists(THEME . "images/new_comments.png") ? "<img src='" . THEME_ABS . "images/new_comments.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/new_comments.png' alt='' /> "); } $param['image_new_small'] = IMAGE_new_small; } if (!isset($param['image_sticky'])) { if (!defined("IMAGE_sticky")) { define("IMAGE_sticky", file_exists(THEME . "images/sticky.png") ? "<img src='" . THEME_ABS . "images/sticky.png' alt='' /> " : "<img src='" . e_IMAGE_ABS . "generic/sticky.png' alt='' style='width: 14px; height: 14px; vertical-align: bottom' /> "); } $param['image_sticky'] = IMAGE_sticky; } cachevars('current_news_item', $news); cachevars('current_news_param', $param); if ($news['news_render_type'] == 1 && $mode != "extend") { if (function_exists("news_list")) { $NEWS_PARSE = news_list($news); } else { if ($NEWSLISTSTYLE) { $NEWS_PARSE = $NEWSLISTSTYLE; } else { $NEWS_PARSE = "{NEWSICON} <b>{NEWSTITLELINK}</b><div class='smalltext'>{NEWSAUTHOR} " . LAN_NEWS_100 . " {NEWSDATE} | {NEWSCOMMENTS}</div>"; } } } else { if ($NEWS_TEMPLATE) { $NEWS_PARSE = $NEWS_TEMPLATE; } else { if (function_exists("news_style")) { $action = varset($param['current_action'], 'default'); $NEWS_PARSE = news_style($news, $action, $param); } else { $NEWS_PARSE = $NEWSSTYLE; } } } //$loop_uid = $news['news_author']; - no references found //require_once(e_CORE.'shortcodes/batch/news_shortcodes.php'); /* DEPRECATED setScVar('news_shortcodes', 'news_item', $news); setScVar('news_shortcodes', 'param', $param); */ // Set the Values for the social shortcode usage. $tp = e107::getParser(); $socialArray = array('url' => e107::getUrl()->create('news/view/item', $news, 'full=1'), 'title' => $tp->toText($news['news_title']), 'tags' => $news['news_meta_keywords']); $socialObj = e107::getScBatch('social'); if (is_object($socialObj)) { $socialObj->setVars($socialArray); } // Retrieve batch sc object, set required vars $sc = e107::getScBatch('news')->wrapper('news/view/item')->setScVar('news_item', $news)->setScVar('param', $param); $text = e107::getParser()->parseTemplate($NEWS_PARSE, true, $sc); if ($mode == 'return') { return $text; } else { echo $text; return TRUE; } }
protected function _make_feed_from_pager($title, $link, $pager, $context = null) { // setlocale(LC_TIME, 'it_IT'); sfLoader::loadHelpers(array('Tag', 'Url', 'DeppNews')); $feed = new sfRss2ExtendedFeed(); $feed->initialize(array('title' => $title, 'link' => url_for($link, true), 'feedUrl' => $this->getRequest()->getURI(), 'siteUrl' => 'http://' . sfConfig::get('sf_site_url'), 'image' => 'http://' . sfConfig::get('sf_site_url') . '/images/logo-openparlamento.png', 'language' => 'it', 'authorEmail' => '*****@*****.**', 'authorName' => 'Openparlamento', 'description' => "Openparlamento.it - il progetto Openpolis per la trasparenza del Parlamento", 'sy_updatePeriod' => 'daily', 'sy_updateFrequency' => '1', 'sy_updateBase' => '2000-01-01T12:00+00:00')); foreach ($pager->getGroupedResults() as $date_ts => $news) { $item = new sfRss2ExtendedItem(); $item->initialize(array('title' => 'Notizie del ' . strftime("%d/%m/%Y", $date_ts), 'link' => url_for($link, true) . '#' . strftime('%Y%m%d%H', $date_ts), 'permalink' => url_for($link, true) . '#' . strftime('%Y%m%d%H', $date_ts), 'pubDate' => date("U", $date_ts), 'uniqueId' => $date_ts, 'description' => news_list($news, null, $context), 'authorEmail' => '*****@*****.**', 'authorName' => 'Openparlamento')); $feed->addItem($item); } return $feed; }
} $links[] = array('text' => 'News List', 'href' => 'news.php?act=list'); if ($_REQUEST['act'] == 'insert') { $sql = "insert into news (title,content,addtime) values ('{$title}', '{$content}','{$nowtime}')"; $db->query($sql); clear_all_files(); sys_msg('News is added!', 0, $links); } else { $id = isset($_POST['id']) ? intval($_POST['id']) : 0; $sql = "update news set title='{$title}',content='{$content}' where id='{$id}'"; $db->query($sql); clear_all_files(); sys_msg('News is updated!', 0, $links); } } elseif ($_REQUEST['act'] == 'query') { $news_list = news_list(); $smarty->assign('news_list', $news_list['news']); $smarty->assign('filter', $news_list['filter']); $smarty->assign('record_count', $news_list['record_count']); $smarty->assign('page_count', $news_list['page_count']); make_json_result($smarty->fetch('news_list.tpl'), '', array('filter' => $news_list['filter'], 'page_count' => $news_list['page_count'])); } elseif ($_REQUEST['act'] == 'remove') { $id = intval($_REQUEST['id']); $db->query("delete from news where id='{$id}'"); clear_all_files(); $url = 'news.php?act=query&' . str_replace('act=remove', '', $_SERVER['QUERY_STRING']); header("Location: {$url}\n"); exit; } function news_list() {
</section> <section id="news" class="frame" data-frame="3"> <div class="container-fluid"> <header class="clearfix"> <h1 class="main-title">The news.</h1> </header> <div class="content row-fluid"> <div class="span6"> <?php echo last_news_item('news'); ?> </div> <div class="span6"> <?php echo news_list('news', 4); ?> </div> </div> </div> <footer> <a class="next" data-target="+" href="#contact">v</a> </footer> </section> <section id="contact" class="frame" data-frame="4"> <div class="container-fluid"> <header class="clearfix"> <h1 class="main-title">Let's get in touch !</h1> </header> <div class="content row-fluid">
} ?> <?php include "htmlPieces/header.php"; ?> <!--************* header ***************--> <?php navbar(0); ?> <!--************* navbar ***************--> <aside class="col-sm-4 hidden-xs"> <!-- get and dispaly data --> <?php $data = retrieve_data("alcHeadNewsTable", 5); list($as_header, $text, $imgLink, $id) = $data; news_list("HeadNews", $id, $as_header, $imgLink); ?> <!-- Facebook--> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div class="fb-page" data-href="https://www.facebook.com/%D9%85%D8%A4%D8%B3%D8%B3%D8%A9-%D8%A7%D9%84%D9%83%D9%88%D8%AB%D8%B1-%D8%A7%D9%84%D8%AB%D9%82%D8%A7%D9%81%D9%8A%D8%A9-125618677510352/" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"></div> <!-- Facebook--> </aside> <!--************* the report ***************-->
private function helpers_visitor($string, $i) { $result = FALSE; $params = $this->function_match_tree[6][$i]; switch ($this->function_match_tree[4][$i]) { case 'print_form': $this->CI->load->helper('/contact/contact'); $result = print_form($params); break; case 'print_contact_info_list': $this->CI->load->helper('/contact/contact'); $result = print_contact_info_list($params); break; case 'banner_zone': $this->CI->load->helper('/banners/banners'); $result = banner_zone($params); break; case 'portfolio_categories_list': $this->CI->load->helper('/portfolio/portfolio'); $result = portfolio_categories_list(); break; case 'portfolio_thumb_list': $this->CI->load->helper('/portfolio/portfolio'); $result = portfolio_thumb_list($params); break; case 'last_news_item': $this->CI->load->helper('/news/news'); $result = last_news_item($params); break; case 'news_list': $this->CI->load->helper('/news/news'); $params = explode(',', $params); $result = news_list($params[0], intval($params[1])); break; case 'menu': $this->CI->load->helper('/pages/menus'); $result = print_menu($params); break; case 'sub_menu': $this->CI->load->helper('/pages/menus'); $params = explode(',', $params); $result = print_menu($params[0], intval($params[1])); break; } if ($result) { $string = str_replace($this->function_match_tree[0][$i], $result, $string); } return $string; }