Ejemplo n.º 1
0
<?php

require '../include/core/common.php';
require PATHS_LIBRARIES . 'poll.lib.php';
header('Content-type: application/javascript');
echo 'document.write(\'<script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/javascripts/womlib.js"></script>\');' . "\n\n";
echo 'document.write(\'<script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/javascripts/xmlhttp.js"></script>\');' . "\n\n";
echo 'document.write(\'<script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/javascripts/scripts.js"></script>\');' . "\n\n";
echo 'document.write(\'<script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/javascripts/poll.js"></script>\');' . "\n\n";
echo 'document.write(\'<link rel="stylesheet" type="text/css" href="http://www.hamsterpaj.net/stylesheets/poll.css" />\');' . "\n\n";
$poll = poll_fetch(array('id' => $_GET['poll']));
$poll_output = poll_render($poll[0]);
$poll_output = htmlentities($poll_output, ENT_QUOTES, 'UTF-8');
$healthy = array('&lt;', '&gt;', '&quot;', "\n");
$yummy = array('<', '>', '\\"', '');
$poll_output = str_replace($healthy, $yummy, $poll_output);
echo 'document.write("' . $poll_output . '");' . "\n";
//echo 'document.write("<a href=\\"http://www.hamsterpaj.net/poll/\\" target=\\"_blank\\">Gratis unders&ouml;kning</a> fr&aring;n Hamsterpaj");';
Ejemplo n.º 2
0
function discussion_forum_insert_poll($matches)
{
    $poll = poll_fetch(array('id' => $matches[1]));
    if (count($poll) == 1) {
        return poll_render($poll[0]);
    }
}
Ejemplo n.º 3
0
<?php

require '../include/core/common.php';
require PATHS_INCLUDE . 'libraries/comments.lib.php';
require PATHS_INCLUDE . 'libraries/schedule.lib.php';
$ui_options['menu_path'] = array('chat', 'statistik');
$ui_options['title'] = 'Undersökningar på Hamsterpaj';
$ui_options['stylesheets'][] = 'comments.css';
$ui_options['javascripts'][] = 'comments.js';
$request = poll_get_action($_SERVER['REQUEST_URI']);
switch ($request['action']) {
    case 'view_poll':
        $output .= poll_render($request['poll']);
        $output .= '<h2>Visa undersökningen i forumet</h2>' . "\n";
        $output .= '<p>Använd detta ID-nummer om du vill infoga undersökningen i vårt forum: <strong>' . $request['poll']['id'] . '</strong></p>' . "\n";
        $output .= '<h2>Lägg till på din blogg eller websida</h2>' . "\n";
        $output .= '<p>Du kan lägga till denna omröstning på din blogg eller hemsida. Kopiera bara koden nedanför och klistra in den där du vill ha undersökningen. <strong>Denna kod fungerar inte i vårt forum!</strong></p>' . "\n";
        $output .= '<input type="text" class="poll_embed_code" value=\'&lt;script type="text/javascript" language="javascript" src="http://www.hamsterpaj.net/poll/embed.php?poll=' . $request['poll']['id'] . '"&gt;&lt;/script&gt;\' />' . "\n";
        $output .= '<h2>Kommentera omröstningen</h2>' . "\n";
        $output .= comments_input_draw($request['poll']['id'], 'poll');
        $output .= comments_list($request['poll']['id'], 'poll');
        break;
    case 'index':
        $output .= '<h1>Här kan man göra sina enga undersökningar</h1>' . "\n";
        if (login_checklogin()) {
            $output .= '<h2>Gör en ny undersökning</h2>';
            $output .= poll_form();
            $polls = poll_fetch(array('author' => $_SESSION['login']['id'], 'limit' => 100));
            if (count($polls) > 0) {
                $output .= '<h1>Dina undersökningar</h1>' . "\n";
                $output .= '<ul class="poll_list">' . "\n";
Ejemplo n.º 4
0
function profile_presentation_poll_tag_callback($matches)
{
    $poll = poll_fetch(array('id' => $matches[1]));
    if (count($poll) == 1) {
        return poll_render($poll[0]);
    }
}
Ejemplo n.º 5
0
        $age_min = $age - 1;
        $age_max = $age + 2;
    }
    $label = $gender == 'f' ? 'Tjejer' : 'Killar';
    $output .= '<input type="submit" value="' . $label . ' på karta" class="button_120" />&nbsp;&nbsp;' . "\n";
    $output .= '</form>' . "\n";
    unset($map_points);
}
/* Downloads ad */
$output .= '<div class="fp_column_ad">' . "\n";
$output .= '<a href="/mattan/ladda_ner_program.php"><img src="' . IMAGE_URL . 'fp_column_ads/downloads.png" /></a>' . "\n";
$output .= '</div>' . "\n";
$output .= '</div>' . "\n";
/* Poll */
$poll = poll_fetch(array('type' => 'daily'));
if ($poll[0]['handle'] == 'skulle_du_kunna_taenka_dig_att_dejta_rojk') {
    $poll[0]['question'] = 'Skulle du kunna tänka dig att dejta <a href="http://www.hamsterpaj.net/traffa/profile.php?id=65654" style="border-bottom: 1px dashed #aaaaaa;">Rojk</a> <img src="http://images.hamsterpaj.net/rojk/rojk.gif" alt="Rojk" />?';
}
if ($poll[0]['can_answer'] == 1 && false) {
    echo '<a name="poll"></a>' . poll_render($poll[0]);
} else {
    $output .= '<br style="clear: both;" /><a name="poll"></a>' . poll_render($poll[0]);
}
$output .= isset($_GET['ilovemarquee']) ? '</div></marquee>' : '';
echo $output;
/*echo '<img src="http://bloggsok.se/BlogPortal/view/SearchEntry?searchText=fra-lagen" width="0" height="0" />';
	echo '<img src="http://bloggsok.se/BlogPortal/view/SearchEntry?searchText=string" width="0" height="0" />';
	echo '<img src="http://bloggsok.se/BlogPortal/view/SearchEntry?searchText=marijuana" width="0" height="0" />';
	echo '<img src="http://bloggsok.se/BlogPortal/view/SearchEntry?searchText=stay-ups" width="0" height="0" />';
	*/
ui_bottom();