Exemple #1
0
    include "header.php";
    title("{$sitename}: " . _ARTICLERATING . "");
    OpenTable();
    if ($rated == 0) {
        $row = $db->sql_fetchrow($db->sql_query("SELECT title FROM " . $prefix . "_stories WHERE sid='{$sid}'"));
        $row['title'] = filter($row['title'], "nohtml");
        echo "<center><a href=\"modules.php?name={$module_name}&file=article&sid={$sid}{$r_options}\"><b>" . $row['title'] . "</b></a><br>" . _YOURATEDARTICLE . ": <img src=\"images/articles/stars-{$score}.gif\" border=\"0\" alt=\"{$score}/5\" title=\"{$score}/5\"> ({$score}/5)<br><br>";
        echo "<center>" . _THANKSVOTEARTICLE . "<br><br>" . "[ <a href=\"modules.php?name={$module_name}&amp;file=article&amp;sid={$sid}{$r_options}\">" . _BACKTOARTICLEPAGE . "</a> ]</center>";
    } elseif ($rated == 1) {
        echo "<center>" . _ALREADYVOTEDARTICLE . "<br><br>" . "[ <a href=\"modules.php?name={$module_name}&amp;file=article&amp;sid={$sid}{$r_options}\">" . _BACKTOARTICLEPAGE . "</a> ]</center>";
    }
    CloseTable();
    include "footer.php";
}
if (!isset($new_topic)) {
    $new_topic = 0;
}
if (!isset($op)) {
    $op = "";
}
switch ($op) {
    default:
        theindex($new_topic);
        break;
    case "rate_article":
        rate_article($sid, $score, $random_num, $gfx_check);
        break;
    case "rate_complete":
        rate_complete($sid, $rated, $score);
        break;
}
            $r_options .= "&amp;mode={$cookie['4']}";
        }
        if (isset($cookie[5])) {
            $r_options .= "&amp;order={$cookie['5']}";
        }
        if (isset($cookie[6])) {
            $r_options .= "&amp;thold={$cookie['6']}";
        }
    }
    include "header.php";
    title("{$sitename}: " . _ARTICLERATING . "");
    OpenTable();
    if ($rated == 0) {
        echo "<center>" . _THANKSVOTEARTICLE . "<br><br>" . "[ <a href=\"modules.php?name=News&amp;file=article&amp;sid={$sid}{$r_options}\">" . _BACKTOARTICLEPAGE . "</a> ]</center>";
    } elseif ($rated == 1) {
        echo "<center>" . _ALREADYVOTEDARTICLE . "<br><br>" . "[ <a href=\"modules.php?name=News&amp;file=article&amp;sid={$sid}{$r_options}\">" . _BACKTOARTICLEPAGE . "</a> ]</center>";
    }
    CloseTable();
    include "footer.php";
}
switch ($op) {
    default:
        theindex($new_topic);
        break;
    case "rate_article":
        rate_article($sid, $score);
        break;
    case "rate_complete":
        rate_complete($sid, $rated);
        break;
}
Exemple #3
0
 case "comment_abuse":
     comment_abuse($_REQUEST['comment_id']);
     $response = '{"success":"1","message":"success"}';
     //$callback = trim(@$_REQUEST['callback']);
     /*  $json = $callback . '({
             "proposals": 
         ';    */
     $json .= $response;
     /*    $json .= '})';      */
     echo $json;
     break;
     //**********************RATING******************************************************************************
 //**********************RATING******************************************************************************
 case "rate_article":
     //http://www.jeelplus.com/appstreamig/streaming/api/index.php?action=rate_article&uid=55&aid=44&rate=5
     rate_article($_REQUEST['aid'], $_REQUEST['rate'], $_REQUEST['uid']);
     $response = '{"success":"1","message":"success"}';
     //$callback = trim(@$_REQUEST['callback']);
     /* $json = $callback . '({
            "proposals": 
        ';         */
     $json .= $response;
     /*$json .= '})';    */
     echo $json;
     break;
 case "get_user_rate":
     //http://www.jeelplus.com/appstreamig/streaming/api/index.php?action=get_user_rate&aid=44&uid=234
     $rate = get_user_rate($_REQUEST['aid'], $_REQUEST['uid']);
     $response = '{"success":"1","message":"success", "rate":"' . $rate . '"}';
     //$callback = trim(@$_REQUEST['callback']);
     /* $json = $callback . '({