function get_more_articles() { $offset = $_POST['offset']; $status = $_POST['status']; ob_start(); get_articles($offset, $status); $out = ob_get_contents(); ob_end_clean(); echo $out; die; }
echo "<li><a href='login.php'>setari profil</a></li>"; } else { echo "<li><a href='login.php'>logare</a></li>"; echo "<li><a href='register.php'>inregistrare</a></li>"; } ?> <li><a href="../en/blog.php">en</a></li> </ul> <div id="logo"><a href="index.php"><img src="img/provisory-logo.gif"></a></div> </nav> <div id="page_wrapper"> <div id="page_content"> <div id="google_translate_element"></div> <?php echo list_articles(get_articles($dbCon)); if (logged_in() === true) { if (empty($_POST) === false) { $required_fields = array('comments', 'username'); foreach ($_POST as $key => $value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'Campurile marcate cu * sunt obligatorii'; break 1; } } if ($_POST['username'] != $user_data['username']) { $errors[] = 'Nu poti posta sub un alt nume de utilizator'; } if (empty($_POST['captcha_results']) === true) { $errors[] = 'Te rugam sa introduci captcha.'; } else {
function do_menus() { global $context, $scripturl, $smcFunc; $mid = isset($_GET['mid']) && is_numeric($_GET['mid']) ? $_GET['mid'] : 0; // first check any link stuff if (isset($_GET['linkon'])) { checksession('get'); $what = is_numeric($_GET['linkon']) ? $_GET['linkon'] : 0; if ($what > 0) { $smcFunc['db_query']('', ' UPDATE {db_prefix}tp_variables SET value5 = {int:val5} WHERE id = {int:varid}', array('val5' => 0, 'varid' => $what)); } redirectexit('action=tpadmin;sa=menubox;mid=' . $mid); } elseif (isset($_GET['linkoff'])) { checksession('get'); $what = is_numeric($_GET['linkoff']) ? $_GET['linkoff'] : '0'; if ($what > 0) { $smcFunc['db_query']('', ' UPDATE {db_prefix}tp_variables SET value5 = {int:val5} WHERE id = {int:varid}', array('val5' => 1, 'varid' => $what)); } redirectexit('action=tpadmin;sa=menubox;mid=' . $mid); } elseif (isset($_GET['linkdelete'])) { checksession('get'); $what = is_numeric($_GET['linkdelete']) ? $_GET['linkdelete'] : '0'; if ($what > 0) { $smcFunc['db_query']('', ' DELETE FROM {db_prefix}tp_variables WHERE id = {int:varid}', array('varid' => $what)); } redirectexit('action=tpadmin;sa=menubox;mid=' . $mid); } $context['TPortal']['menubox'] = array(); $context['TPortal']['editmenuitem'] = array(); $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_variables WHERE type = {string:type} ORDER BY subtype + 0 ASC', array('type' => 'menubox')); if ($smcFunc['db_num_rows']($request) > 0) { while ($row = $smcFunc['db_fetch_assoc']($request)) { if ($row['value5'] == '-1') { $p = 'off'; $status = '1'; } else { $status = '0'; $p = $row['value5']; } $mtype = substr($row['value3'], 0, 4); $idtype = substr($row['value3'], 4); if ($mtype != 'cats' && $mtype != 'arti' && $mtype != 'head' && $mtype != 'spac') { $mtype = 'link'; $idtype = $row['value3']; } if ($row['value2'] == '') { $newlink = '0'; } else { $newlink = $row['value2']; } if ($mtype == 'head') { $mtype = 'head'; $idtype = $row['value1']; } $context['TPortal']['menubox'][$row['subtype2']][] = array('id' => $row['id'], 'menuID' => $row['subtype2'], 'name' => $row['value1'], 'pos' => $p, 'type' => $mtype, 'IDtype' => $idtype, 'off' => $row['value5'], 'sub' => $row['value4'], 'subtype' => $row['subtype'], 'newlink' => $newlink); if ($context['TPortal']['subaction'] == 'linkmanager') { $menuid = $_GET['linkedit']; if ($menuid == $row['id']) { $context['TPortal']['editmenuitem'] = array('id' => $row['id'], 'menuID' => $row['subtype2'], 'name' => $row['value1'], 'pos' => $p, 'type' => $mtype, 'IDtype' => $idtype, 'off' => $status, 'sub' => $row['value4'], 'subtype' => $row['subtype'], 'newlink' => $newlink); } } } $smcFunc['db_free_result']($request); } $request = $smcFunc['db_query']('', ' SELECT * FROM {db_prefix}tp_variables WHERE type = {string:type} ORDER BY value1 ASC', array('type' => 'menus')); $context['TPortal']['menus'] = array(); $context['TPortal']['menus'][0] = array('id' => 0, 'name' => 'Internal', 'var1' => '', 'var2' => ''); if ($smcFunc['db_num_rows']($request) > 0) { while ($row = $smcFunc['db_fetch_assoc']($request)) { $context['TPortal']['menus'][$row['id']] = array('id' => $row['id'], 'name' => $row['value1'], 'var1' => $row['value2'], 'var2' => $row['value3']); } } get_articles(); // collect categories $request = $smcFunc['db_query']('', ' SELECT id, value1 as name, value2 as parent FROM {db_prefix}tp_variables WHERE type = {string:type}', array('type' => 'category')); $context['TPortal']['editcats'] = array(); $allsorted = array(); if ($smcFunc['db_num_rows']($request) > 0) { while ($row = $smcFunc['db_fetch_assoc']($request)) { $row['indent'] = 0; $allsorted[$row['id']] = $row; } $smcFunc['db_free_result']($request); if (count($allsorted) > 1) { $context['TPortal']['editcats'] = chain('id', 'parent', 'name', $allsorted); } else { $context['TPortal']['editcats'] = $allsorted; } } // add to linktree if (isset($_GET['mid'])) { TPadd_linktree($scripturl . '?action=tpadmin;sa=menubox;mid=' . $_GET['mid'], $context['TPortal']['menus'][$_GET['mid']]['name']); } elseif (isset($_GET['linkedit']) && is_numeric($_GET['linkedit'])) { TPadd_linktree($scripturl . '?action=tpadmin;sa=menubox;mid=' . $context['TPortal']['editmenuitem']['menuID'], $context['TPortal']['menus'][$context['TPortal']['editmenuitem']['menuID']]['name']); TPadd_linktree($scripturl . '?action=tpadmin;linkedit=' . $_GET['linkedit'], $context['TPortal']['editmenuitem']['name']); } }
// get valid podcast attachment formats $podcast_formats = $config['files']['podcast_formats']; /* if(!empty($podcast_formats)) { $podcast_formats = explode(',',$podcast_formats); } */ // get complete or partial article $config['layout']['list_style'] = !empty($config['admin']['complete_feed']) ? 'full' : 'summary'; // determine what feed to display if ($_GET['feed'] == 'comments') { $article_id = isset($_GET['article_id']) ? (int) $_GET['article_id'] : 0; $feed_content = get_feed_comments($article_id); $feed_description = "comments feed"; } elseif ($_GET['feed'] == 'articles' || $_GET['feed'] == 'podcast') { $feed_content = $_GET['feed'] == 'podcast' ? get_podcasts($config['layout'], $podcast_formats) : get_articles($config['layout']); // default description $feed_description = $_GET['feed'] == 'podcast' ? "The " . $config['site']['title'] . " podcast" : "All articles posted on " . $config['site']['title']; // category if (isset($_GET['category_id']) && isset($_GET['category_url'])) { $details = get_category_details($_GET['category_id']); // default description $feed_description = !empty($details['description']) ? $details['description'] : "Articles filed under the category " . $details['title']; // podcast description if ($_GET['feed'] == 'podcast') { $feed_description = !empty($details['description']) ? $details['description'] : "The " . $details['title'] . " podcast - hosted by " . $config['site']['title']; } } // author if (isset($_GET['author_id']) && isset($_GET['author_url'])) { $details = get_author_details($_GET['author_id']);
function list_action() { $posts = get_articles(); require 'vue/blog/index.php'; }
// single article if ($_GET['page_name'] == 'article') { $article = get_article($_GET['article_id']); } // multiple articles - either a search or listings request if ($_GET['page_name'] == 'listing') { if (isset($_GET['feed_listing'])) { // for a list of all available feeds we'll borrow the listing page $feeds = get_feeds($config['admin']['show_all_feeds']); $articles = format_feeds_list($feeds); } elseif (!empty($_GET['search'])) { // run a search $articles = search_articles($_GET['search'], $config['layout']); } else { // standard article listing $articles = get_articles($config['layout']); } } // allowed pages array - redirect to 404 if any other page name is attempted $allowed_pages = array('feed', 'front', '404', 'article', 'listing'); $_GET['page_name'] = in_array($_GET['page_name'], $allowed_pages) ? $_GET['page_name'] : '404'; // get content partial - checking for theme versions as well $theme_content_folder = WW_ROOT . '/ww_view/themes' . $config['site']['theme'] . '/_content'; $content_partial = file_exists($theme_content_folder . '/_' . $_GET['page_name'] . '.php') ? $theme_content_folder . '/_' . $_GET['page_name'] . '.php' : WW_ROOT . '/ww_view/_content/_' . $_GET['page_name'] . '.php'; // at this point we could look for a custom 'builder' file in the theme folder /* reference: $body_content['header'] = ''; $body_content['nav'] = ''; $body_content['main'] = ''; $body_content['aside'] = ''; $body_content['footer'] = '';
function get() { $articles = get_articles(); include "views/articles.php"; }
} else { $numberOfJobsInOtherCities = $job->GetNumberOfJobsInOtherCities(); $smarty->assign('jobs_count_in_other_cities', $numberOfJobsInOtherCities); $smarty->assign('hide_other_cities_in_sidebar', $numberOfJobsInOtherCities < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS); $jobsCountPerCity = $job->GetJobsCountPerCity(); // exclude the cities that don't have at least the specified number of jobs foreach ($jobsCountPerCity as $index => $jobsPerCity) { if ($jobsPerCity['jobs_in_city'] < SIDEBAR_ONLY_CITIES_WITH_AT_LEAST_NUMBER_OF_JOBS) { unset($jobsCountPerCity[$index]); } } $smarty->assign('jobs_count_per_city', $jobsCountPerCity); } // get job categories and cities $smarty->assign('categories', get_categories()); $smarty->assign('articles', get_articles()); $smarty->assign('navigation', get_navigation()); // list of available languages $smarty->assign('languages', $translator->getLanguages()); // translations $smarty->assign('translator', $translator); $smarty->assign('translations', $translations); // create a JSON string from the translations array, but only for the "js" section $smarty->assign('translationsJson', iniSectionsToJSON(array('js' => $translations['js']))); $smarty->assign('THEME', $settings['theme']); $smarty->assign('CURRENT_PAGE', $page); $smarty->assign('CURRENT_ID', $id); $smarty->assign('BASE_URL', BASE_URL); $smarty->assign('HTTP_REFERER', $_SERVER['HTTP_REFERER']); //Add the dynamic URL defitions to SMARTY $smarty->assign('URL_JOB', URL_JOB);
<?php require_once 'modele/model.php'; $posts = get_articles(); require 'vue/blog/index.php';
<?php require_once 'settings.php'; require_once 'admin/models/site_news.model.php'; $articles = array(); $public_articles = array(); $articles = get_articles((int) $_GET['id']); foreach ($articles as $id => $lan) { if ($lan[strtolower($lang['LANG'])] == NULL) { $public_articles[$id] = array_shift($lan); } else { $public_articles[$id] = $lan[strtolower($lang['LANG'])]; } } require_once 'admin/templates/site_news.template.php';
<img src="img/icons/yeu.svg" alt="" width="30px" style="vertical-align: middle"> Instagram #relache2015 </a> </h3> <div id="instafeed"></div> </section> </aside> <article class="article-actualite col-10 col-m-5 col-offset-1"> <h2 class="titre-blog">Carnet de voyage</h2> <?php $articles = get_articles(); foreach ($articles as $article) { $thumbnail = get_thumbnail($article['ID']); $author = get_author($article['post_author']); ?> <section class="article-blog col-m-12"> <div class="row"> <div class="thumbnail col-m-4"> <?php if ($thumbnail['guid']) { ?>
<?php global $bp, $post, $wpdb, $socialArticles; ?> <section id="articles-container"> <?php if (bp_displayed_user_id() == bp_loggedin_user_id()) { ?> <div class="articles-container"> <?php get_articles(0, 'draft', true); ?> </div> <?php } ?> </section>
<?php get_articles('type', 'webinar'); ?> </ul> </div> </div> <div style="clear:both;"></div> <div class="channel-section"> <div class="channel-header white-paper"> <div class="box-top-corners"><div class="box-corner-top-left"></div></div> <div class="channel-header-content"> <h3>WHITE PAPERS</h3><div class="title-right"><a href="">view all »</a></div> <div style="clear:both;"></div> </div> </div> <div class="channel-content"> <ul class="white-papers"> <?php get_articles('type', 'white-paper'); ?> </ul> </div> </div> <div style="clear:both;"></div> </div> </div>
if ($directWorkflow) { $postCount = $draftCount + $publishCount; } else { $postCount = count_user_posts(bp_displayed_user_id()); } ?> <section id="articles-container"> <?php if ($publishCount > 0 || bp_displayed_user_id() == bp_loggedin_user_id()) { ?> <div class="publish-container"> <?php get_articles(0, 'publish'); ?> <div id="more-container-publish"> </div> <?php if ($publishCount > $initialCount) { ?> <div class="more-articles-button-container"> <input type="submit" id="more-articles-button" class="button" onclick ="getMoreArticles('publish'); return false;" value="<?php _e("Load more articles", "social-articles"); ?> "/> <img id="more-articles-loader" src="<?php echo SA_BASE_URL . '/assets/images/bp-ajax-loader.gif'; ?> "/>
<?php global $bp, $post, $wpdb, $socialArticles; ?> <section id="articles-container"> <?php if (bp_displayed_user_id() == bp_loggedin_user_id()) { ?> <div class="articles-container"> <?php get_articles(0, 'pending', true); ?> </div> <?php } ?> </section>
<?php include BASE_PATH . 'app/utils/initialize.php'; $country_id = get_country_id($first); echo $twig->render('index.html', array('data' => $data, 'utils' => $utils, 'countries' => get_countries($first), 'articles' => get_articles($country_id), 'authors' => get_unique_authors($country_id), 'translations' => get_translations($country_id))); ?>