$range_names = array(_('24 horas'), _('48 horas'), _('una semana'), _('un mes'), _('un año'), _('todas')); $range_values = array(1, 2, 7, 30, 365, 0); $site_id = SitesMgr::my_id(); if (($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0) { // we use this to allow sql caching $from_time = '"' . date("Y-m-d H:00:00", time() - 86400 * $range_values[$from]) . '"'; $from_where = "FROM blogs, links, sub_statuses WHERE id = {$site_id} and date > {$from_time} and status = 'published' and link = link_id and link_blog = blog_id"; } else { $from_where = "FROM blogs, links, sub_statuses WHERE id = {$site_id} and status = 'published' and link = link_id and link_blog = blog_id"; } $from_where .= " GROUP BY blog_id"; $max = max($db->get_var("select count(*) as count {$from_where} order by count desc limit 1"), 2); //echo "MAX= $max\n"; $coef = ($max_pts - $min_pts) / ($max - 1); do_header(_('nube de sitios web') . ' | ' . _('menéame')); do_tabs("main", _('+ webs'), true); print_period_tabs(); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; echo '<div class="topheading"><h2>Los sitios más enlazados</h2></div>'; echo '<div style="margin: 20px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 50px;">'; $res = $db->get_results("select blog_url, count(*) as count {$from_where} order by count desc limit {$limit}"); if ($res) { foreach ($res as $item) { $blogs[$item->blog_url] = $item->count; }
$page_size = 20; $current_page = get_current_page(); $offset = ($current_page - 1) * $page_size; if (!$current_user->user_id) { header("Location: " . $globals['base_url']); die; } $friends = $db->get_col("select friend_to from friends where friend_type = 'manual' and friend_from = {$current_user->user_id} and friend_value > 0"); if ($friends) { $friends_list = implode(',', $friends); $sql = "select distinct vote_link_id as link_id from votes where vote_type = 'links' and vote_user_id in ({$friends_list}) and vote_value > 0 order by vote_link_id desc"; $links = $db->get_results("{$sql} LIMIT {$offset},{$page_size}"); } do_header(_('votadas por amigos') . ' | ' . _('menéame')); $globals['tag_status'] = 'published'; do_tabs('main', 'friends'); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_banner_promotions(); do_best_comments(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; if ($links) { foreach ($links as $dblink) { $link = Link::from_db($dblink->link_id); $link->do_inline_friend_votes = true; $link->print_summary(); }
if ($rows > 0) { $links = $db->get_results("{$sql} LIMIT {$offset},{$page_size}"); if ($memcache_key) { if ($range_values[$from] > 2) { $ttl = 86400; } else { $ttl = 1800; } memcache_madd($memcache_key . 'rows', $rows, $ttl); memcache_madd($memcache_key, serialize($links), $ttl); } } } do_header(_('más votadas') . ' | ' . $globals['site_name'], _('populares')); $globals['tag_status'] = 'published'; do_tabs('main', 'popular'); print_period_tabs(); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_active_stories(); do_banner_promotions(); do_last_subs('published', 5, 'link_votes'); do_best_comments(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; if ($links) { $counter = 0; foreach ($links as $dblink) {
// It's not in cache, or memcache is disabled $rows = $db->get_var("SELECT count(*) FROM sub_statuses WHERE {$time_link} {$status}"); $rows = min(4 * $page_size, $rows); // Only up to 4 pages if ($rows > 0) { $links = $db->get_results("{$sql} LIMIT {$offset},{$page_size}"); if ($memcache_key) { $ttl = 1800; memcache_madd($memcache_key . 'rows', $rows, $ttl); memcache_madd($memcache_key, serialize($links), $ttl); } } } do_header(_('más visitadas') . ' | ' . $globals['site_name'], _('más visitadas')); $globals['tag_status'] = 'published'; do_tabs('main', 'topclicked'); print_period_tabs(); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_active_stories(); do_banner_promotions(); do_best_stories(); do_best_comments(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; if ($links) { $counter = 0; foreach ($links as $dblink) {
$from_time = '"' . date("Y-m-d H:00:00", $globals['now'] - $globals['time_enabled_votes']) . '"'; $from_where = "FROM links WHERE link_status='queued' and link_date > {$from_time} and link_category in (" . $globals['meta_categories'] . ") "; $tab = false; } else { //$from_where = "FROM links WHERE link_date > $from_time and link_status='queued'"; $from_where = "FROM links WHERE link_status='queued'"; $tab = 1; } break; } do_header(_('noticias pendientes') . ' // menéame'); do_banner_top(); echo '<div id="container">' . "\n"; do_sidebar(); echo '<div id="contents">' . "\n"; do_tabs("main", "shakeit"); print_shakeit_tabs($tab); do_mnu_categories_horizontal($_REQUEST['category']); // fora en posar dropdown echo '</div>'; // Left margin // end of tabs if ($cat) { $from_where .= " AND link_category={$cat} "; } $link = new Link(); $rows = $db->get_var("SELECT count(*) {$from_where}"); $links = $db->get_col("SELECT link_id {$from_where} {$order_by} LIMIT {$offset},{$page_size}"); if ($links) { foreach ($links as $link_id) { $link->id = $link_id; $link->read(); if ($offset < 1000) {
include('config.php'); include(mnminclude.'html1.php'); meta_get_current(); array_push($globals['post_js'], 'hoygan.js'); $page_size = 15; $page = get_current_page(); $offset=($page-1)*$page_size; $globals['ads'] = true; $cat=$_REQUEST['category']; do_header(_('últimas publicadas') . ' | menéame'); do_tabs('main','published'); if ($globals['meta_current'] > 0) { $from_where = "FROM links WHERE link_status='published' and link_category in (".$globals['meta_categories'].") "; print_index_tabs(); // No other view } elseif ($current_user->user_id > 0) { // Check authenticated users switch ($globals['meta']) { case '_personal': $from_time = '"'.date("Y-m-d H:00:00", $globals['now'] - $globals['time_enabled_comments']).'"'; $from_where = "FROM links WHERE link_date > $from_time and link_status='published' and link_category in (".$globals['meta_categories'].") "; //$from_where = "FROM links WHERE link_status='published' and link_category in (".$globals['meta_categories'].") "; print_index_tabs(7); // Show "personal" as default break; case '_friends': $from_time = '"'.date("Y-m-d H:00:00", $globals['now'] - 86400*4).'"'; $from_where = "FROM links, friends WHERE link_date > $from_time and link_status='published' and friend_type='manual' and friend_from = $current_user->user_id and friend_to=link_author and friend_value > 0"; print_index_tabs(1); // Friends
} if (!empty($link->tags)) { $globals['tags'] = $link->tags; } do_header($link->title, 'post'); // Show the error if the comment couldn't be inserted if (!empty($new_comment_error)) { echo '<script type="text/javascript">'; echo '$(function(){alert(\'' . _('comentario no insertado') . ": {$new_comment_error}" . '\')});'; echo '</script>'; } do_banner_top(); echo '<div id="container">' . "\n"; do_sidebar(false); echo '<div id="contents">'; do_tabs("main", _('noticia'), true); $link->print_summary(); switch ($tab_option) { case 1: case 2: echo '<div class="comments">'; // AdSense do_banner_story(); // Print tabs print_story_tabs($tab_option); // If option is "normal comments", show also last trackbakcs and pingbacks if ($tab_option == 1) { $trackbacks = $db->get_col("SELECT trackback_id FROM trackbacks WHERE trackback_link_id={$link->id} AND trackback_type='in' and trackback_status = 'ok' ORDER BY trackback_date DESC limit 10"); if ($trackbacks) { echo '<fieldset><legend><a href="' . $globals['link_permalink'] . '/trackbacks">' . _('últimas relacionadas') . '</a></legend>'; echo '<ul class="tab-trackback">';
foreach ($fields as $field) { $code .= do_tabs() . 'protected $' . $field . ";" . jump(); } $code .= jump(); foreach ($fields as $field) { $code .= do_tabs() . 'public function get' . ucfirst($field) . "()" . jump(); $code .= do_tabs() . "{" . jump(); $code .= do_tabs(1) . 'return $this->' . $field . ";" . jump(); $code .= do_tabs() . "}" . jump(2); $code .= do_tabs() . 'public function set' . ucfirst($field) . '($' . $field . ")" . jump(); $code .= do_tabs() . "{" . jump(); $code .= do_tabs(1) . '$this->' . $field . ' = $' . $field . ";" . jump(); $code .= do_tabs() . "}" . jump(2); } $code .= do_tabs() . "public function save()" . jump(); $code .= do_tabs() . "{" . jump(); $code .= do_tabs(1) . '$this->persist($this) ' . ";" . jump(); $code .= do_tabs() . "}" . jump(2); $code .= do_tabs() . "public static function factory()" . jump(); $code .= do_tabs() . "{" . jump(); $code .= do_tabs(1) . 'return new ' . ucfirst($className) . ";" . jump(); $code .= do_tabs() . "}" . jump(2); $code .= do_tabs() . "public static function countItem()" . jump(); $code .= do_tabs() . "{" . jump(); $code .= do_tabs(1) . '$self = self::factory()' . ";" . jump(); $code .= do_tabs(1) . '$result = $self::countItems($self)' . ";" . jump(); $code .= do_tabs(1) . 'return $result' . ";" . jump(); $code .= do_tabs() . "}" . jump(2); $code .= "}\n"; file_put_contents($className . ".php", $code); // Do some magic here
// You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1-mobile.php'; include mnminclude . 'linkmobile.php'; include mnminclude . 'search.php'; $page_size = 10; $offset = (get_current_page() - 1) * $page_size; $globals['ads'] = false; $globals['noindex'] = true; $_REQUEST['q'] = trim(stripslashes($_REQUEST['q'])); $response = do_search(false, $offset, $page_size); $search_txt = htmlspecialchars($_REQUEST['q']); do_header(sprintf(_('búsqueda de «%s»'), $search_txt)); do_tabs('main', _('búsqueda'), htmlentities($_SERVER['REQUEST_URI'])); echo '<div id="newswrap">' . "\n"; if (!empty($_REQUEST['q'])) { echo '<div style="background:#FFE2C5;margin: 4px; padding:4px;">' . _('búsqueda') . ': <em>' . $search_txt . '</em>'; echo ' ' . _('encontrados') . ': ' . $response['rows'] . ', ' . _('tiempo total') . ': ' . sprintf("%1.3f", $response['time']) . ' ' . _('segundos') . '</div>'; } echo '<form action="' . $globals['base_url'] . 'search.php" method="get">' . "\n"; echo '<fieldset>'; echo '<label for="search">' . _('búsqueda') . '</label>' . "\n"; echo '<div><input type="text" name="q" id="search" value="' . htmlspecialchars(strip_tags($_REQUEST['q'])) . '" /></div>'; echo '<input type="submit" value="' . _('buscar') . '" />' . "\n"; echo '</fieldset>'; echo '</form>'; $link = new LinkMobile(); if ($response['ids']) { $rows = min($response['rows'], 1000);
// You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1-mobile.php'; include mnminclude . 'linkmobile.php'; include mnminclude . 'search.php'; $page_size = 10; $offset = (get_current_page() - 1) * $page_size; $globals['ads'] = false; $globals['noindex'] = true; $_REQUEST['q'] = trim(stripslashes($_REQUEST['q'])); $response = do_search(false, $offset, $page_size); $search_txt = htmlspecialchars($_REQUEST['q']); do_header(sprintf(_('búsqueda de «%s»'), $search_txt)); do_tabs('main', _('búsqueda'), __($_SERVER['REQUEST_URI'])); echo '<div id="newswrap">' . "\n"; if (!empty($_REQUEST['q'])) { echo '<div style="background:#FFE2C5;margin: 4px; padding:4px;">' . _('búsqueda') . ': <em>' . $search_txt . '</em>'; echo ' ' . _('encontrados') . ': ' . $response['rows'] . ', ' . _('tiempo total') . ': ' . sprintf("%1.3f", $response['time']) . ' ' . _('segundos') . '</div>'; } echo '<form action="' . $globals['base_url'] . 'search.php" method="get">' . "\n"; echo '<fieldset>'; echo '<label for="search">' . _('búsqueda') . '</label>' . "\n"; echo '<div><input type="text" name="q" id="search" value="' . htmlspecialchars(strip_tags($_REQUEST['q'])) . '" /></div>'; echo '<input type="submit" value="' . _('buscar') . '" />' . "\n"; echo '</fieldset>'; echo '</form>'; if ($response['ids']) { $rows = min($response['rows'], 1000); foreach ($response['ids'] as $link_id) {
<?php // The source code packaged with this file is Free Software, Copyright (C) 2007 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; include mnminclude . 'geo.php'; geo_init('onLoad', false, 3); do_header(_('geovisión')); do_tabs('main', _('geovisión'), true); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_vertical_tags(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap"><!-- geovision.php -->' . "\n"; echo '<div class="topheading"><h2>actividad de los usuarios geolocalizados</h2></div>'; echo '<div id="map" style="width: 95%; height: 500px;margin:0 0 0 20px"></div></div>'; ?> <script type="text/javascript"> //<![CDATA[ var timestamp = 0; var period = 10000; var persistency = 300000; var counter=0;
$globals['tags'] = $link->tags; } // Add canonical address $globals['extra_head'] = '<link rel="canonical" href="' . $globals['link_permalink'] . '" />' . "\n"; // add also a rel to the comments rss $globals['extra_head'] .= '<link rel="alternate" type="application/rss+xml" title="' . _('comentarios esta noticia') . '" href="http://' . get_server_name() . $globals['base_url'] . 'comments_rss2.php?id=' . $link->id . '" />' . "\n"; $globals['thumbnail'] = $link->has_thumb(); $globals['description'] = _('Autor') . ": {$link->username}, " . _('Resumen') . ': ' . text_to_summary($link->content, 250); do_header($link->title, 'post'); // Show the error if the comment couldn't be inserted if (!empty($new_comment_error)) { echo '<script type="text/javascript">'; echo '$(function(){mDialog.notify(\'' . _('Aviso') . ": {$new_comment_error}" . '\', 5)});'; echo '</script>'; } do_tabs("main", _('club'), true); echo '<div id="newswrap">' . "\n"; $link->print_summary_club(); switch ($tab_option) { case 1: echo '<div class="comments">'; if ($tab_option == 1) { do_comment_pages($link->comments, $current_page); } $comments = $db->object_iterator("SELECT" . Comment::SQL . "WHERE comment_link_id={$link->id} ORDER BY {$order_field} {$limit}", "Comment"); if ($comments) { echo '<ol class="comments-list">'; foreach ($comments as $comment) { echo '<li>'; $comment->print_summary_club($link, 2500, true); echo '</li>';
<?php // The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; do_header(_('mejores comentarios en 24 horas') . ' | ' . $globals['site_name']); do_tabs('main', '+ ' . _('comentarios'), true); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_best_stories(); do_best_comments(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; echo '<div class="topheading"><h2>' . _('comentarios más valorados 24 horas') . '</h2></div>'; $last_link = 0; $counter = 0; echo '<div class="comments">'; $min_date = date("Y-m-d H:00:00", time() - 86000); // about 24 hours $comments = $db->get_results("SELECT comment_id, link_id FROM comments, links WHERE comment_date > '{$min_date}' and link_id=comment_link_id ORDER BY comment_karma desc, link_id asc limit 25"); if ($comments) { foreach ($comments as $dbcomment) { $link = Link::from_db($dbcomment->link_id, null, false);
// Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; include mnminclude . 'link.php'; include mnminclude . 'comment.php'; $globals['ads'] = true; do_header(_('mejores comentarios en 24 horas') . ' // menéame'); do_banner_top(); echo '<div id="container">' . "\n"; do_sidebar(); echo '<div id="contents">'; do_tabs('main', _('+ comentarios'), true); echo '<div class="topheading"><h2>' . _('comentarios más valorados 24 horas') . '</h2></div>'; $last_link = 0; $counter = 0; $comment = new Comment(); $link = new Link(); echo '<div class="comments">'; $min_date = date("Y-m-d H:00:00", time() - 86000); // about 24 hours $comments = $db->get_results("SELECT comment_id, link_id FROM comments, links WHERE comment_date > '{$min_date}' and link_id=comment_link_id ORDER BY comment_karma desc, link_id asc limit 25"); if ($comments) { foreach ($comments as $dbcomment) { $link->id = $dbcomment->link_id; $comment->id = $dbcomment->comment_id; $link->read(); $comment->read();
//$range_values = array(1, 2, 7, 30, 365, 0); $range_names = array(_('24 horas'), _('48 horas'), _('una semana')); $range_values = array(1, 2, 7); $from = check_integer('range'); if ($from > count($range_values) || !$range_values[$from]) { $from = 0; } // we use this to allow sql caching $from_time = '"' . date("Y-m-d H:00:00", time() - 86400 * $range_values[$from]) . '"'; $from_where = "FROM tags, links WHERE tag_lang='{$dblang}' and tag_date > {$from_time} and link_id = tag_link_id and link_status != 'discard'"; $from_where .= " GROUP BY tag_words"; $max = max($db->get_var("select count(*) as words {$from_where} order by words desc limit 1"), 2); //echo "MAX= $max\n"; $coef = ($max_pts - $min_pts) / ($max - 1); do_header(_('nube de etiquetas') . ' | ' . _('menéame')); do_tabs('main', _('etiquetas'), true); print_period_tabs(); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_best_stories(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; echo '<div class="topheading"><h2>+ ' . $words_limit . '</h2></div>'; echo '<div style="margin: 0px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 25px;">'; $res = $db->get_results("select tag_words, count(*) as count {$from_where} order by count desc limit {$words_limit}"); if ($res) { foreach ($res as $item) { $words[$item->tag_words] = $item->count; }
// The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; $globals['ads'] = false; $rows = -1; $page_size = $globals['page_size']; $page = get_current_page(); $offset = ($page - 1) * $page_size; $globals['extra_head'] .= '<link rel="alternate" type="application/rss+xml" title="' . _('blogs de Menéame') . '" href="http://' . get_server_name() . $globals['base_url_general'] . 'blogs_rss2.php" />' . "\n"; do_header(_('apuntes de blogs') . ' | ' . _('menéame')); do_tabs('main', _('apuntes'), true); /*** SIDEBAR echo '<div id="sidebar">'; do_banner_right(); do_best_stories(); do_best_posts(); do_best_comments(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="singlewrap">' . "\n"; echo '<div style="margin: 20px 0"><h2>' . _('apuntes de blogs') . ' <a href="' . $globals['base_url_general'] . 'blogs_rss2.php" title="blogs"><img src="' . $globals['base_static'] . 'img/common/feed-icon-001.png" width="18" height="18" alt="rss2"/></a></h2>'; echo '</div>'; echo '<table class="decorated">'; $entries = $db->get_results("select rss.blog_id, rss.user_id, title, url, user_login, user_avatar, blogs.blog_url, blogs.blog_title from rss, users, blogs where rss.blog_id = blogs.blog_id and rss.user_id = users.user_id order by rss.date desc limit {$offset},{$page_size}"); if ($entries) { foreach ($entries as $entry) {
$offset = (get_current_page() - 1) * $page_size; $from = intval($_GET['range']); if ($from >= count($range_values) || $from < 0) { $from = 0; } if ($range_values[$from] > 0) { // we use this to allow sql caching $from_time = '"' . date("Y-m-d H:00:00", time() - 86400 * $range_values[$from]) . '"'; $sql = "SELECT link_id, link_comments as comments FROM links WHERE link_date > {$from_time} ORDER BY link_comments DESC "; $time_link = "link_date > FROM_UNIXTIME({$from_time})"; } else { $sql = "SELECT link_id, link_comments as comments FROM links ORDER BY link_comments DESC "; $time_link = ''; } do_header(_('más comentadas') . ' | ' . _('menéame')); do_tabs('main', _('más comentadas'), true); print_period_tabs(); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_best_stories(); do_best_comments(); do_vertical_tags('published'); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; echo '<div class="topheading"><h2>' . _('noticias más comentadas') . '</h2></div>'; $link = new Link(); // Use memcache if available if ($globals['memcache_host'] && get_current_page() < 4) { $memcache_key = 'topcommented_' . $from . '_' . get_current_page();
$u1 = User::get_valid_username(clean_input_string($_REQUEST['u1'])); $u2 = User::get_valid_username(clean_input_string($_REQUEST['u2'])); $id1 = User::get_user_id($u1); $id2 = User::get_user_id($u2); switch ($_REQUEST['type']) { case 'comments': $type = 'comments'; $prefix = 'comment'; break; case 'posts': default: $type = 'posts'; $prefix = 'post'; } do_header(sprintf(_('debate entre %s y %s'), $u1, $u2)); do_tabs('main', _('debate'), $globals['uri']); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ $options = array('u1' => $u1, 'u2' => $u2, 'type' => $type, 'types' => array('posts', 'comments')); echo '<div id="newswrap"><!-- between.php -->'; Haanga::Load('between.html', compact('options')); if ($id1 > 0 && $id2 > 0) { $all = array(); $to = array(); $sorted = array(); $rows = 0; if (isset($_GET['id']) && !empty($_GET['id'])) { $sorted = explode(',', @gzuncompress(@base64_decode($_GET['id'])));
<?php // The source code packaged with this file is Free Software, Copyright (C) 2007 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; include mnminclude . 'geo.php'; geo_init('onLoad', false, 2); array_push($globals['extra_js'], 'markermanager.js'); do_header(_('mapa de las últimas noticias') . ' | ' . _('menéame')); do_tabs('main', 'map'); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_vertical_tags(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; echo '<div class="topheading"><h2>' . _('noticias de las últimas 24 horas') . '</h2></div>'; echo '<div style="margin:0 0 10px 20px; text-align:center">'; echo '<form action="" id="map-control" name="map-control">'; echo '<label>' . _('publicadas') . ' <img src="' . $globals['base_static'] . 'img/geo/common/geo-published01.png" width="20" height="25" alt="' . _('publicadas') . '" title="' . _('publicadas') . '"/><input type="checkbox" checked="checked" id="published" onclick="toggle(\'published\')" /></label>'; echo ' '; echo '<label>' . _('pendientes') . ' <img src="' . $globals['base_static'] . 'img/geo/common/geo-new01.png" width="20" height="25" alt="' . _('pendientes') . '" title="' . _('pendientes') . '"/><input type="checkbox" checked="checked" id="queued" onclick="toggle(\'queued\')" /></label>'; echo ' '; echo '<label>' . _('autores') . ' <img src="' . $globals['base_static'] . 'img/geo/common/geo-user01.png" width="20" height="25" alt="' . _('autores') . '" title="' . _('autores') . '"/><input type="checkbox" id="author" onclick="toggle(\'author\')" /></label>'; echo '</form>';
<?php // The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include 'config.php'; include mnminclude . 'html1.php'; do_header(_('destacadas') . ' | ' . $globals['site_name'], _('destacadas')); $globals['tag_status'] = 'published'; do_tabs('main', 'active'); /*** SIDEBAR ****/ echo '<div id="sidebar">'; do_banner_right(); do_best_stories(); do_banner_promotions(); do_best_comments(); echo '</div>' . "\n"; /*** END SIDEBAR ***/ echo '<div id="newswrap">' . "\n"; $top = new Annotation('top-actives-' . $globals['site_shortname']); if ($top->read() && ($links = explode(',', $top->text))) { $counter = 0; foreach ($links as $id) { $link = Link::from_db($id); $link->show_clicks = true; $link->print_summary(); $counter++; Haanga::Safe_Load('private/ad-interlinks.html', compact('counter', 'page_size'));
} var_dump($fields); function do_tabs($tabs) { $ret = ''; for ($i = 0; $i < $tabs; $i++) { $ret .= ' '; } return $ret; } $className = $argv[5]; $tabs = 2; $code = "<?php\n\nnamespace table;\n\n"; $code .= "class {$className} \n{\n"; $code .= "\n"; foreach ($fields as $field) { $code .= do_tabs($tabs) . 'protected $' . $field . ";\n"; } $code .= "\n"; foreach ($fields as $field) { $code .= do_tabs($tabs) . 'public function get' . ucfirst($field) . "()\n"; $code .= do_tabs($tabs) . "{\n"; $code .= do_tabs($tabs + 2) . 'return $this->' . $field . ";\n"; $code .= do_tabs($tabs) . "}\n\n"; $code .= do_tabs($tabs) . 'public function set' . ucfirst($field) . '($' . $field . ")\n"; $code .= do_tabs($tabs) . "{\n"; $code .= do_tabs($tabs + 2) . '$this->' . $field . ' = $' . $field . ";\n"; $code .= do_tabs($tabs) . "}\n\n"; } $code .= "}\n"; file_put_contents($className . ".php", $code);
$code = "<?php\n\n"; $code .= "namespace Model;\n\n"; $code .= "class {$className}\n{\n"; foreach ($fields as $field) { $code .= do_tabs($space) . 'protected $' . $field . ";\n"; } $code .= "\n"; $code .= do_tabs($space) . 'public function getProperties' . '()' . "\n"; $code .= do_tabs($space) . "{\n"; $code .= do_tabs($space + 2) . 'return get_object_vars($this);' . "\n"; $code .= do_tabs($space) . "}\n"; $code .= "\n"; $code .= do_tabs($space) . 'public function getTableNameBdd' . '()' . "\n"; $code .= do_tabs($space) . "{\n"; $code .= do_tabs($space + 2) . 'return ' . "'" . $tableName . "'" . ";\n"; $code .= do_tabs($space) . "}\n"; $code .= "\n"; foreach ($fields as $field) { $code .= do_tabs($space) . 'public function set' . ucfirst($field) . '($' . $field . ")\n"; $code .= do_tabs($space) . "{\n"; $code .= do_tabs($space + 2) . 'return $this->' . $field . ' = $' . $field . ";\n"; $code .= do_tabs($space) . "}\n"; $code .= "\n"; $code .= do_tabs($space) . 'public function get' . ucfirst($field) . '()' . "\n"; $code .= do_tabs($space) . "{\n"; $code .= do_tabs($space + 2) . 'return $this->' . $field . ";\n"; $code .= do_tabs($space) . "}\n"; $code .= "\n"; } $code .= "}\n"; file_put_contents('Model/' . $className . ".php", $code);