Ejemplo n.º 1
0
function getMosaicItems($qstId)
{
    //echo "getMosaicItems()";
    $items = getItems($qstId);
    // filter 'more' item
    $more = getItemMore($items);
    //if(is_object($more))  $more = (Array)$more;
    if (count($items) > 0 && empty($more)) {
        echo "QST ID " . $qstId . " | MORE ({$more}) ID " . $more["item"]["id"];
        print_r($items);
        die("ERROR > Warning, no more item returned");
    }
    $list = array();
    foreach ($items as $item) {
        //if(is_object($item))  $item = (Array)$item;
        //echo $item["id"].",".$more["id"];
        if ($item->id != $more["id"]) {
            $list[] = $item;
        }
        //else echo "found item more id : ".$more["id"];
    }
    return $list;
}
Ejemplo n.º 2
0
<!DOCTYPE html>
<html>
  <?php 
include "includes.php";
$question = getCurrentQuestion();
//MC-bJSOzCRo-V
$moreItem = getItemMore(getItems($question["id"]));
$moreId = $moreItem["id"];
$url = getItemMediaId($moreItem);
$info = $moreItem["description"];
// echo($moreId . "--> url" . $url . "--> description" . $info);
$temp = explode("-", $info);
$author = $temp[0];
$description = $temp[1];
//echo "MORE ID = ".$moreId;
?>
<head>
    <title>Question : <?php 
echo $question["content"];
?>
</title>
    <?php 
include "head.php";
?>
    <link rel="stylesheet" type="text/css" href="styles/mosaicQuestion.css?v=1" />
    <script type="text/javascript" src="js/loading.js?v=1"></script>
</head>
<body>
<div class="all" id="all-question">
	<?php 
displayMenuHeader($question, $question["content"]);
Ejemplo n.º 3
0
foreach ($qsts as $q) {
    var_dump($q["id"]);
    echo "<br/>";
}
echo "<hr>QUESTION 76<hr>";
var_dump(getQuestion(76));
echo "<hr>CURRENT QUESTION<hr>";
var_dump(getCurrentQuestion());
echo "<hr>ITEMS<hr>";
$items = getItems(76);
var_dump($items);
echo "<hr>ITEM index 2<hr>";
$item = $items[2];
var_dump($item);
echo "<hr>ITEM MORE OF ITEMS<hr>";
$more = getItemMore($items);
var_dump($more);
echo "<hr>ITEM RATE<hr>";
$voteCount = getItemRate($item);
var_dump($voteCount);
echo "<hr>ITEM COMMENTS<hr>";
$voteCount = getItemComments($item);
var_dump($voteCount);
echo "<hr>SPECIFIC ITEM COMMENTS<hr>";
$item = getItem(79, 1367);
var_dump($item);
$comments = getItemComments($item);
if (count($comments) < 1) {
    echo "Pas de coms";
} else {
    foreach ($comments as $com) {