Esempio n. 1
0
function view_article()
{
    do_header();
    include "templates/index_viewarticle.inc.php";
    build_matrix('news', $_REQUEST['id']);
    do_footer();
}
Esempio n. 2
0
 function main()
 {
     global $db;
     if (isset($_REQUEST['id'])) {
         $result = $db->Execute("SELECT * FROM `Obsedb_Mods` WHERE `id` = '{$_REQUEST['id']}' LIMIT 1");
         while ($row = $result->FetchNextObject()) {
             do_header();
             $header = new Template();
             $header->open_template('cheats_header');
             $header->addvar('{id}', $row->ID);
             $header->addvar('{title}', stripslashes($row->TITLE));
             $header->parse_template();
             $header->print_template();
             $cheats = $db->Execute("SELECT id,Modid,title,cheat FROM `Obsedb_cheats` WHERE `Modid` = '{$_REQUEST['id']}' ORDER BY `title`");
             while ($cheat = $cheats->FetchNextObject()) {
                 // CHEAT HTML
                 echo "<b>" . clean($cheat->TITLE) . "</b><br />\n      \t\t\t        " . stripslashes($cheat->CHEAT) . "<br /><br />";
                 // END CHEAT HTML
             }
             do_footer();
         }
     } else {
         do_header();
         echo "<b>System Error Message</b><br />";
         echo "You cannot access this page directly, please go back and select a Mod.<br />";
         echo "If the problem persists, please contact the webmaster.";
         do_footer();
     }
 }
Esempio n. 3
0
function awshit($deathmessage)
{
    global $headerisprinted;
    if (!$headerisprinted) {
        do_header('Barf Report', true);
    }
    printf('<div class="message_box">%s</div>', $deathmessage);
    do_footer();
    exit;
}
function _display_password_form()
{
    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    do_header('Postfixadmin Squirrelmail - Login');
    echo _('The PostfixAdmin plugin needs your current mailbox password');
    echo "<form action='' method='post'>";
    echo _('Password for');
    echo " " . $_SESSION['username'] . " :";
    echo "<input type='password' name='password' value=''>";
    echo "<input type='submit' value='" . _('Submit') . "'></form>";
    do_footer();
}
Esempio n. 5
0
File: go.php Progetto: neiko/nsamblr
function handle_error($status = '404 Not Found', $header, $text)
{
    global $config;
    header('HTTP/1.0 ' . $status);
    header('Status: ' . $status);
    do_header();
    echo '<h3>' . $header . '</h3>';
    echo '<p class="warning">Sorry :-(</p>';
    echo '<p>' . $text . '</p>';
    echo '<p class="leave"><a href="' . $config['base'] . '">Go to ' . $config['shortener'] . '</a></p>';
    do_footer();
    die;
}
Esempio n. 6
0
 function view()
 {
     global $db;
     if (!is_numeric($_REQUEST['id'])) {
         die("Critical Error: Aborting script operations.");
     }
     $result = $db->Execute("SELECT * FROM Obsedb_companies WHERE id = {$_REQUEST['id']} LIMIT 1");
     $company = array();
     $company['title'] = stripslashes($result->fields['title']);
     $company['description'] = clean($result->fields['description']);
     if (!empty($result->fields['homepage'])) {
         $company['homepage'] = '<a href="' . stripslashes($result->fields['homepage']) . '" target="_blank">' . stripslashes($result->fields['homepage']) . '</a>';
     }
     if (!empty($result->fields['logo'])) {
         $company['logo'] .= "<img src=\"";
         $company['logo'] .= stripslashes($result->fields['logo']);
         $company['logo'] .= "\" alt=\"" . $company['title'] . " align=\"right\" hspace=\"2\" vspace=\"2\">";
     }
     $result = $db->Execute("\n\t\t\tSELECT id, title, section, developer\n\t\t\tFROM Obsedb_Mods\n\t\t\tWHERE developer = " . $_REQUEST['id'] . "\n\t\t\tORDER BY title;");
     while ($row = $result->FetchNextObject()) {
         $company['dev_links'] .= '<a href="Moddetails.php?id=' . $row->ID . '">' . stripslashes($row->TITLE) . '</a><br />';
     }
     $result = $db->Execute("\n\t\t\tSELECT id, title, section, publisher\n\t\t\tFROM Obsedb_Mods\n\t\t\tWHERE publisher = " . $_REQUEST['id'] . "\n\t\t\tORDER BY title;");
     while ($row = $result->FetchNextObject()) {
         $company['pub_links'] .= '<a href="Moddetails.php?id=' . $row->ID . '">' . stripslashes($row->TITLE) . '</a><br />';
     }
     do_header();
     $template = new Template();
     $template->open_template('company_profile');
     $template->addvar('{title}', $company['title']);
     $template->addvar('{homepage}', $company['homepage']);
     $template->addvar('{logo}', $company['logo']);
     $template->addvar('{description}', $company['description']);
     $template->parse_template();
     $template->print_template();
     if (!empty($company['dev_links'])) {
         $company_profile_devlinks = new Template();
         $company_profile_devlinks->open_template('company_profile_devlinks');
         $company_profile_devlinks->addvar('{links}', $company['dev_links']);
         $company_profile_devlinks->parse_template();
         $company_profile_devlinks->print_template();
     }
     if (!empty($company['pub_links'])) {
         $company_profile_publinks = new Template();
         $company_profile_publinks->open_template('company_profile_publinks');
         $company_profile_publinks->addvar('{links}', $company['pub_links']);
         $company_profile_publinks->parse_template();
         $company_profile_publinks->print_template();
     }
     do_footer();
 }
Esempio n. 7
0
 function main()
 {
     global $db;
     do_header();
     if (!empty($_REQUEST['id'])) {
         $poll = $db->Execute("\n\t\t\t\tSELECT id,title\n\t\t\t\tFROM `Obsedb_polls`\n\t\t\t\tWHERE `id` = '" . $_REQUEST['id'] . "'");
         $result = $db->Execute("SELECT * FROM Obsedb_polls_options WHERE poll_id = '{$_REQUEST['id']}' ORDER BY id");
         while ($row = $result->FetchNextObject()) {
             $poll_options .= "<tr><td bgcolor='#FFFFFF'>" . stripslashes($row->TEXT) . " - {$row->COUNT} votes</td></tr>";
         }
         if ($poll->RecordCount() < 1) {
             include "templates/poll_error.inc.php";
         } else {
             include "templates/poll_view.inc.php";
         }
     }
     do_footer();
 }
Esempio n. 8
0
 function main()
 {
     global $db;
     // Get Mod Info
     if (isset($_REQUEST['id'])) {
         $result = $db->Execute("SELECT * FROM `Obsedb_Mods` WHERE `id` = '{$_REQUEST['id']}' LIMIT 1");
         while ($row = $result->FetchNextObject()) {
             $cheats = $db->Execute("SELECT id,Modid FROM `Obsedb_cheats` WHERE Modid = {$_REQUEST['id']} LIMIT 1");
             if ($cheats->RecordCount() >= 1) {
                 $cheat_link = "<a href=\"cheats.php?id={$row->ID}\">Cheats</a>";
             } else {
                 $cheat_link = "Cheats";
             }
             do_header();
             $tplHeader = new Template();
             $tplHeader->open_template('downloads_header');
             $tplHeader->addvar('{title}', stripslashes($row->TITLE));
             $tplHeader->addvar('{id}', $row->ID);
             $tplHeader->addvar('{cheat_link}', $cheat_link);
             $tplHeader->parse_template();
             $tplHeader->print_template();
             $downloads = $db->Execute("SELECT id,Modid,title,download FROM `Obsedb_downloads` WHERE `Modid` = '{$_REQUEST['id']}' ORDER BY `title`");
             while ($download = $downloads->FetchNextObject()) {
                 // DOWNLOAD HTML
                 echo "<a href='" . stripslashes($download->DOWNLOAD) . "'>" . clean($download->TITLE) . "</a><br /><br />";
                 // END DOWNLOAD HTML
             }
             $tplFooter = new Template();
             $tplFooter->open_template('downloads_footer');
             $tplFooter->parse_template();
             $tplFooter->print_template();
             do_footer();
         }
     } else {
         do_header();
         echo "<b>System Error Message</b><br />";
         echo "You cannot access this page directly, please go back and select a Mod.<br />";
         echo "If the problem persists, please contact the webmaster.";
         do_footer();
     }
 }
Esempio n. 9
0
function mailbag_main()
{
    global $db;
    do_header();
    $tplHeader = new Template();
    $tplHeader->open_template('mailbag_header');
    $tplHeader->print_template();
    $tplItem = new Template();
    $tplItem->open_template('mailbag_item');
    $result = $db->Execute("SELECT * FROM `Obsedb_mailbag` ORDER BY `id` DESC");
    while ($row = $result->FetchNextObject()) {
        $tplItem->addvar('{title}', stripslashes($row->TITLE));
        $tplItem->addvar('{message}', clean($row->MESSAGE));
        $tplItem->addvar('{reply}', clean($row->REPLY));
        $tplItem->parse_template();
        $tplItem->print_template();
    }
    $tplFooter = new Template();
    $tplFooter->open_template('mailbag_footer');
    $tplFooter->print_template();
    do_footer();
}
Esempio n. 10
0
}
do_modified_headers($link->modified, $current_user->user_id . '-' . $globals['link_id'] . '-' . $link->comments . '-' . $link->modified);
// Enable user AdSense
// do_user_ad: 0 = noad, > 0: probability n/100
if ($link->status == 'published' && $link->user_karma > 7 && !empty($link->user_adcode)) {
    $globals['do_user_ad'] = $link->user_karma;
    $globals['user_adcode'] = $link->user_adcode;
    $globals['user_adchannel'] = $user->adchannel;
}
if ($link->status != 'published') {
    $globals['do_vote_queue'] = true;
}
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:
Esempio n. 11
0
// 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');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');

force_authentication();



do_header(_("editar noticia"), "post");
do_navbar(_('editar noticia'));


echo '<div id="genericform-contents">'."\n";

if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { 
	$linkres=new Link;
	$linkres->id=$link_id = intval($_REQUEST['id']);
	$linkres->read();
	if (!$linkres->is_editable() || intval($_GET['user'] != $current_user->user_id)) {
		echo '<div class="form-error-submit">&nbsp;&nbsp;'._("noticia no modificable").'</div>'."\n";
		return;
	} 
	if ($_POST['phase'] == "1") 
		do_save();
Esempio n. 12
0
<?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') . '&nbsp;<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 '&nbsp;&nbsp;&nbsp;';
echo '<label>' . _('pendientes') . '&nbsp;<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 '&nbsp;&nbsp;&nbsp;';
echo '<label>' . _('autores') . '&nbsp;<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>';
Esempio n. 13
0
    do_submit_cancel('', __('Regresar'), $return_url);
} elseif (!empty($CFG->public_proposals) && preg_match('#^general/proposals/\\d+$#', $q)) {
    define('Context', 'main');
    define('Action', 'viewproposal');
    $return_url = get_url('general/proposals');
    do_header(__('Detalles de propuesta'));
    include $CFG->comdir . 'prop_view.php';
} elseif (!empty($CFG->public_proposals) && preg_match('#^general/proposals/\\d+/files/\\d+/?.*$#', $q)) {
    define('Context', 'main');
    define('Action', 'downloadfile');
    include $CFG->comdir . 'prop_files_download.php';
} elseif (preg_match('#^general/information$#', $q)) {
    do_header(__('Modalidades de participación'));
    include $CFG->tpldir . 'proposals_info.tmpl.php';
    do_submit_cancel('', __('Regresar'), get_url());
} elseif (preg_match('#^admin/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'admin_views.php';
} elseif (preg_match('#^speaker/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'speaker_views.php';
} elseif (preg_match('#^person/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'person_views.php';
} else {
    do_header(__('Página no encontrada'));
    include $CFG->tpldir . 'error_404.tmpl.php';
    do_submit_cancel('', __('Regresar'));
}
// finally
do_footer();
Esempio n. 14
0
$words_limit = 100;
$line_height = $max_pts * 0.75;
$range_names = array(_('48 horas'), _('última semana'), _('último mes'), _('último año'), _('todas'));
$range_values = array(172800, 604800, 2592000, 31536000, 0);
if (($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0) {
    $from_time = time() - $range_values[$from];
    $from_where = "FROM tags, links WHERE  tag_lang='{$dblang}' and tag_date > FROM_UNIXTIME({$from_time}) and link_id = tag_link_id and link_status != 'discard'";
    $time_query = "&amp;from={$from_time}";
} else {
    $from_where = "FROM tags, links WHERE tag_lang='{$dblang}' 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'));
do_navbar(_('etiquetas'));
echo '<div id="contents">';
echo '<h2>+ ' . $words_limit . '</h2>';
echo '<div style="margin: 20px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 100px;">';
$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;
    }
    ksort($words);
    foreach ($words as $word => $count) {
        $size = intval($min_pts + ($count - 1) * $coef);
        echo '<span style="font-size: ' . $size . 'pt"><a href="index.php?search=tag:' . urlencode($word) . $time_query . '">' . $word . '</a></span>&nbsp;&nbsp; ';
    }
}
Esempio n. 15
0
<?php

include '../inc/header.php';
do_header('Thanks');
$thanks = array('commit' => array('Thank you', 'Thank you for committing to vote November 3!'), 'contrib' => array('Thank you', 'Thank you for your contribution!'), 'vol' => array('Thank you', 'Thank you for signing up to volunteer!'), 'signup' => array('Thank you!', 'Please check your inbox for an email and click the link to confirm your email address.'), 'confirm' => array('Thank you', 'Thank you for confirming your email address!'));
?>

<div class="container-12">
    <div class="row">
        <div class="grid-12 alpha omega">
            <h1><?php 
echo $thanks[$_GET['ty']][0];
?>
</h1>
            <h2><?php 
echo $thanks[$_GET['ty']][1];
?>
</h2>
        </div>
    </div>
    <div class="row module-container">
        <div class="endorse-module grid-4 alpha">
            <h3 class="module-header">Endorsements</h3>
            <?php 
include '../inc/endorse-list.php';
endorseList(true);
?>
        </div>
        <div class="twitter-module grid-4 omega push-4">
            <script>
                !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
Esempio n. 16
0
}
/*****  WARNING
		this function is to redirect to feed burner
		comment it out
		You have been warned 

	if (!$search && empty($_REQUEST['category'])) {
		check_redirect_to_feedburner($status);
	}
	
	END WARNING ******/
if ($last_modified <= $if_modified) {
    header('HTTP/1.1 304 Not Modified');
    exit;
}
do_header($title);
$comment = new Comment();
$link = new Link();
$comments = $db->get_col($sql);
if ($comments) {
    foreach ($comments as $comment_id) {
        $comment->id = $comment_id;
        $comment->read();
        $content = save_text_to_html($comment->content);
        echo "\t<item>\n";
        $link_id = $link->id = $comment->link;
        $link->read();
        $link_title = $db->get_var("select link_title from links where link_id = {$link_id}");
        // Title must not carry htmlentities
        echo "\t\t<title><![CDATA[" . html_entity_decode($link_title) . "]]></title>\n";
        echo "\t\t<link>" . $link->get_permalink() . "#comment-" . $comment->order . "</link>\n";
Esempio n. 17
0
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&eacute;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";
Esempio n. 18
0
$range_values = array(1, 2, 7, 30, 365, 0);
$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) {
Esempio n. 19
0
<?php

include 'inc/header.php';
do_header('Home');
?>

<div class="container-12">
    <div class="row">
        <div class="feature-image grid-8 alpha">
            <h2>Valley Values</h2>
        </div>
        <div class="grid-4 omega non-mobile">
            <h3>Join Us</h3>
            <?php 
include 'inc/mailchimp.php';
?>
        </div>
    </div>
    <div class="row module-container">
        <div class="about-module grid-4 alpha">
            <h3 class="module-header">About Adam</h3>
            <?php 
include 'inc/bio-text.php';
bioText(true);
?>
        </div>
        <div class="endorse-module grid-4">
            <h3 class="module-header">Endorsements</h3>
            <?php 
include 'inc/endorse-list.php';
endorseList(true);
Esempio n. 20
0
function do_error($mess = false, $error = false, $send_status = true)
{
    global $globals;
    $globals['ads'] = false;
    if (!$mess) {
        $mess = _('algún error nos ha petado');
    }
    if ($error && $send_status) {
        header("HTTP/1.0 {$error} {$mess}");
        header("Status: {$error} {$mess}");
    }
    do_header(_('error'));
    echo '<STYLE TYPE="text/css" MEDIA=screen>' . "\n";
    echo '<!--' . "\n";
    echo '.errt { text-align:center; padding-top:50px; font-size:300%; color:#FF6400;}' . "\n";
    echo '.errl { text-align:center; margin-top:50px; margin-bottom:100px; }' . "\n";
    echo '-->' . "\n";
    echo '</STYLE>' . "\n";
    echo '<p class="errt">' . $mess . '<br />' . "\n";
    if ($error) {
        echo '(' . _('error') . ' ' . $error . ')</p>' . "\n";
    }
    echo '<div class="errl"><img src="' . $globals['base_url'] . 'img/mnm/lame_excuse_01.png" width="362" height="100" alt="ooops logo" /></div>' . "\n";
    do_footer_menu();
    do_footer();
    die;
}
Esempio n. 21
0
header('Cache-Control: max-age=30');

$offset=(get_current_page()-1)*$page_size;
$globals['ads'] = true;


$search = get_search_clause();
$search_txt = htmlspecialchars(strip_tags($_REQUEST['search']));
if($search) {
	do_header(_('búsqueda de'). ' "'.$search_txt.'"');
	do_navbar(_('noticias en la cola') . ' &#187; ' . _('búsqueda'));
	echo '<div id="contents">'."\n";
	echo '<h2>'._('búsqueda en pendientes'). ': "'.$search_txt.'" </h2>';
	$order_by = '';
} else {
	do_header(_('noticias pendientes'));
	do_navbar(_('noticias en la cola'));
	echo '<div id="contents">'."\n";
	echo '<h2>'._('noticias pendientes').'</h2>'."\n";
	$order_by = " ORDER BY link_date DESC ";
}


// tabs

echo '<div class="sub-nav">'."\n";
// echo '<div class="shakeit-nav">'."\n";
echo '<ul class="shakeit-sub-nav">'."\n";

$view = preg_replace('/ /', '', $_REQUEST['view']);
$cat = check_integer('category');
Esempio n. 22
0
<?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';
$globals['ads'] = false;
promote_style();
do_header(_('promote') . ' | ' . _('menéame'));
echo '<div id="singlewrap">' . "\n";
$site_id = SitesMgr::my_parent();
$annotation = new Annotation("promote-{$site_id}");
$annotation->text = $output;
if ($annotation->read()) {
    echo $annotation->text;
}
echo '</div>' . "\n";
do_footer_menu();
do_footer();
function promote_style()
{
    global $globals;
    $globals['extra_head'] = '
<style type="text/css">
p {
	font-family: Bitstream Vera Sans, Arial, Helvetica, sans-serif;
	font-size: 90%;
Esempio n. 23
0
    die;
}
// Don't allow to be called bypassing dispatcher
if (isset($_GET['all'])) {
    $option = 2;
    // Show all subs
} elseif (!$current_user->user_id || isset($_GET['active'])) {
    $option = 1;
    // Show active
} else {
    $option = 0;
    // Show suscribed
}
$char_selected = $chars = false;
// User for index by first letter
do_header(_("subs menéame"), 'm/');
print_tabs($option);
/*** SIDEBAR ****/
echo '<div id="sidebar">';
do_banner_right();
do_banner_promotions();
echo '</div>';
/*** END SIDEBAR ***/
echo '<div id="newswrap">';
switch ($option) {
    case 0:
        $subs = SitesMgr::get_subscriptions($current_user->user_id);
        $template = 'subs_simple.html';
        $all = false;
        break;
    case 1:
Esempio n. 24
0
        $globals['noindex'] = true;
        break;
    case 'profile':
    case 'subs':
        $globals['noindex'] = false;
        break;
    default:
        do_error(_('opción inexistente'), 404);
        break;
}
// Add canonical address
$globals['extra_head'] = '<link rel="canonical" href="http://' . get_server_name() . get_user_uri($user->username) . '" />' . "\n";
if (!empty($user->names)) {
    do_header("{$login} ({$user->names})", 'profile', User::get_menu_items($view, $login));
} else {
    do_header($login, 'profile', User::get_menu_items($view, $login));
}
// Used to show the user the number of unread answers to her comments
if ($current_user->user_id == $user->id) {
    $globals['extra_comment_conversation'] = ' [' . Comment::get_unread_conversations($user->id) . ']';
} else {
    $globals['extra_comment_conversation'] = '';
}
echo '<div id="singlewrap">' . "\n";
$url_login = urlencode($login);
switch ($view) {
    case 'subs':
        do_subs();
        break;
    case 'history':
        do_history();
Esempio n. 25
0
        $from_where = " FROM links, users WHERE  link_status = 'published' AND link_author=user_id GROUP BY link_author";
        $order_by = " ORDER BY count DESC ";
        break;
    case 4:
        $select = "SELECT SQL_CACHE user_id, count(*) as count ";
        $from_where = " FROM comments, users WHERE comment_user_id=user_id GROUP BY comment_user_id";
        $order_by = " ORDER BY count DESC ";
        break;
    case 5:
        $select = "SELECT SQL_CACHE user_id, count(*) as count ";
        $from_where = " FROM votes, users WHERE vote_type='links' and vote_user_id=user_id GROUP BY vote_user_id";
        $order_by = " ORDER BY count DESC ";
        break;
}
// Sort by votes
do_header(_('usuarios') . ' | ' . _('menéame'));
echo '<div id="singlewrap">' . "\n";
echo '<div class="topheading"><h2>' . _('estadísticas de usuarios') . '</h2></div>';
echo '<table class="decorated"><tr>';
// Print headers
for ($i = 0; $i < count($items); $i++) {
    echo '<th class="short">';
    if ($i == $sortby) {
        echo '<span class="info_s">' . $items[$i] . '</span>';
    } elseif ($i <= 3) {
        // Don't show order by votes or comment
        // Too much CPU and disk IO consuption
        echo '<a href="topusers.php?sortby=' . $i . '">' . $items[$i] . '</a>';
    } else {
        echo $items[$i];
    }
Esempio n. 26
0
$comment->check_visibility();
if (!$comment->hide_comment) {
    $globals['description'] = _('Autor') . ": {$username}, " . _('Resumen') . ': ' . text_to_summary($comment->content, 250);
    if ($globals['media_public'] && $comment->media_size > 0) {
        $globals['thumbnail'] = Upload::get_url('comment', $comment->id, 0, $comment->media_date, $comment->media_mime);
    } elseif ($comment->avatar) {
        $globals['thumbnail'] = get_avatar_url($comment->author, $comment->avatar, 80);
    }
    $title = text_to_summary($comment->content, 120);
} else {
    $title = '';
}
if (isset($globals['canonical_server_name']) && !empty($globals['canonical_server_name'])) {
    $globals['extra_head'] = '<link rel="canonical" href="http://' . $globals['canonical_server_name'] . $comment->get_relative_individual_permalink() . '" />';
}
do_header($title . ' | ' . $globals['site_name']);
//do_subheader(_('comentario de') . ' ' . $username);
/*** SIDEBAR ****/
echo '<div id="sidebar">';
do_banner_right();
//do_best_stories();
do_best_comments();
do_banner_promotions();
echo '</div>' . "\n";
/*** END SIDEBAR ***/
echo '<div id="newswrap">' . "\n";
echo '<h3 style="text-shadow: 0 1px #ccc"><a href="' . $link->get_permalink() . '">' . $link->title . '</a></h3>';
echo '<ol class="comments-list">';
echo '<li>';
$comment->print_summary($link, 0, false);
echo '<div style="text-align:right">';
Esempio n. 27
0
<?
// 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');
include(mnminclude.'ts.php');

do_header(_("registro"), "post");
do_navbar(_("registro"));

echo '<div id="genericform-contents">'."\n";
echo '<div id="genericform">'."\n";

if(isset($_POST["process"])) {
	switch (intval($_POST["process"])) {
		case 1:
			do_register1();
			break;
		case 2:
			do_register2();
			break;
	}
} else {
	do_register0();
}
<?php

require_once 'functions.php';
require_once 'output_fns.php';
$db = db_connect();
// Start a secure session
sec_session_start();
do_header('Power Manager');
// Make a header with the title in quote marks.
if (login_check($db) == false) {
    // User is not logged in.
    do_login_page('Please login to use this site.');
    exit;
}
do_nav_bar();
start_content();
?>
<script type="text/javascript">
    $(document).ready(function() {
        // Set up AJAX requests
        $.ajaxSetup({
            cache: false,
            beforeSend: function() {
                // Dim ajax_content div while content loads
                $("#ajax_content").fadeTo('fast', 0.25);
                // Fade overlay div in
                $('#overlay').fadeIn('fast')
            },
            complete: function() {
                // Fade ajax_content div when content loads
                $("#ajax_content").fadeTo('fast', 1);
Esempio n. 29
0
                default:
                    $view = 0;
                    $page_title = sprintf(_('notas de %s'), $user->username);
                    $globals['search_options']['u'] = $user->username;
                    $where = "post_user_id={$user->id}";
                    $order_by = "ORDER BY post_id desc";
                    $limit = "LIMIT {$offset},{$page_size}";
                    $rows = $db->get_var("SELECT count(*) FROM posts WHERE post_user_id={$user->id}");
                    $rss_option = "sneakme_rss2.php?user_id={$user->id}";
            }
        }
}
if (isset($globals['canonical_server_name']) && $globals['canonical_server_name'] != get_server_name()) {
    $globals['noindex'] = true;
}
do_header($page_title, _('nótame'), get_posts_menu($tab_option, $user->username));
$conversation_extra = '';
if ($tab_option == 4) {
    if ($current_user->user_id == $user->id) {
        //$conversation_extra = ' ['.Post::get_unread_conversations($user->id).']';
        $conversation_extra = ' [<span id="p_c_counter">0</span>]';
        $whose = _('mías');
    } else {
        $whose = _('suyas');
    }
    $options = array($whose => post_get_base_url($user->username), _('amigos') => post_get_base_url("{$user->username}/_friends"), _('favoritos') => post_get_base_url("{$user->username}/_favorites"), _('conversación') . $conversation_extra => post_get_base_url("{$user->username}/_conversation"), sprintf(_('debates con %s'), $user->username) => $globals['base_url'] . "between.php?type=posts&amp;u1={$current_user->user_login}&amp;u2={$user->username}", sprintf(_('perfil de %s'), $user->username) => get_user_uri($user->username));
} elseif ($tab_option == 1 && $current_user->user_id > 0) {
    //$conversation_extra = ' ['.Post::get_unread_conversations($user->id).']';
    $conversation_extra = ' [<span id="p_c_counter">0</span>]';
    $view = 0;
    $options = array(_('todas') => post_get_base_url(''), _('amigos') => post_get_base_url("{$current_user->user_login}/_friends"), _('favoritos') => post_get_base_url("{$current_user->user_login}/_favorites"), _('conversación') . $conversation_extra => post_get_base_url("{$current_user->user_login}/_conversation"), _('últimas imágenes') => "javascript:fancybox_gallery('post');", _('debates') . '&nbsp;&rarr;' => $globals['base_url'] . "between.php?type=posts&amp;u1={$current_user->user_login}");
Esempio n. 30
0
<?php

include '../inc/header.php';
do_header('Voter Information');
?>

<div class="container-12">
    <div class="row">
        <div class="grid-8 alpha">
            <h1>Voter Information</h1>

            <dl class="faq">
                <dt>Am I registered to vote?</dt>
                <dd><a target="_blank" href="https://www.vote.virginia.gov/search">Check your registration status</a></dd>
                <dt>Where do I vote?</dt>
                <dd><a target="_blank" href="https://voterinfo.sbe.virginia.gov/PublicSite/Public/FT2/PublicPollingPlace.aspx">Confirm your polling place</a></dd>
                <dt>Oh no! I'm not registered to vote. How can I register?</dt>
                <dd><a target="_blank" href="https://www.vote.virginia.gov">Register to vote online.</a> The deadline to register to vote November 3 is October 13.</dd>
                <dt>I will not be able to vote in person November 3. How do I request an absentee ballot?</dt>
                <dd><a target="_blank" href="http://elections.virginia.gov/index.php/casting-a-ballot/absentee-voting/">Request an absentee ballot.</a>The deadline to apply for an absentee ballot is October 26.</dd>
            </dl>
        </div>
        <div class="grid-4 omega non-mobile">
            <?php 
include '../inc/sub-sidebar.php';
mailchimp();
twitter();
?>
        </div>
    </div>
</div>