Esempio n. 1
0
            echo $row['first_name'] . ' ' . $row['last_name'] . '<br />';
        }
        if (!empty($row['city']) && !empty($row['state'])) {
            echo $row['city'] . ' ' . $row['state'] . '<br />';
        }
        echo '</td><td>';
        if (!empty($row['picture'])) {
            echo '<img src="' . MM_UPLOADPATH . $row['picture'] . '" alt="Profile Picture" /><br />';
        }
        echo '</td><tr></table>';
        echo '<h4>You are mismatched on the following ' . count($mismatch_topic) . ' topics:</h4>';
        foreach ($mismatch_topic as $tpc) {
            echo $tpc . '<br />';
        }
        echo '<h4>Mismatched category breakdown:</h4>';
        draw_bar_graph(480, 240, $category_total, 5, MM_UPLOADPATH . $_SESSION['user_id'] . '_mymismatchgraph.png');
        echo '<img src="' . MM_UPLOADPATH . $_SESSION['user_id'] . '_mymismatchgraph.png" alt="Mismatch category graph"/><br />';
        echo '<h4>View <a href=viewprofile.php?user_id=' . $mismatch_user_id . '>' . $row['first_name'] . '\'s Profile</a>.</h4>';
    }
}
?>

<?php 
mysqli_close($dbc);
?>

<?php 
require_once 'footer.php';
?>

Esempio n. 2
0
                if (++$i > 3) {
                    echo '</tr><tr>';
                    $i = 0;
                }
            }
            echo '</tr></table>';
            // Calculate the mismatched category totals
            $category_totals = array(array($mismatch_categories[0], 0));
            foreach ($mismatch_categories as $category) {
                if ($category_totals[count($category_totals) - 1][0] != $category) {
                    array_push($category_totals, array($category, 1));
                } else {
                    $category_totals[count($category_totals) - 1][1]++;
                }
            }
            // Generate and display the mismatched category bar graph image
            echo '<h4>Mismatched category breakdown:</h4>';
            draw_bar_graph(480, 240, $category_totals, 5, MM_UPLOADPATH . 'mymismatchgraph.png');
            echo '<img src="' . MM_UPLOADPATH . 'mymismatchgraph.png" alt="Mismatch category graph" /><br />';
            // Display a link to the mismatch user's profile
            echo '<h4>View <a href=viewprofile.php?user_id=' . $mismatch_user_id . '>' . $row['first_name'] . '\'s profile</a>.</h4>';
        }
        // End of check for a single row of mismatch user results
    }
    // End of check for a user mismatch
} else {
    echo '<p>You must first <a href="questionnaire.php">answer the questionnaire</a> before you can be mismatched.</p>';
}
mysqli_close($dbc);
// Insert the page footer
require_once 'footer.php';
Esempio n. 3
0
    $stmt->store_result();
    $stmt->bind_result($disid, $disname, $distext, $disrating);
    $i = 0;
    while ($i < 5 && $stmt->fetch()) {
        //$dis_names[] = $disname;
        //$dis_ratings[] = $disrating;
        $graph_array[$i][0] = $disname;
        $graph_array[$i][1] = $disrating;
        $i++;
    }
    /*$graph_array[0][0] = "value1";
      $graph_array[0][1] = 2;
      $graph_array[1][0] = "value2";
      $graph_array[1][1] = 4;*/
    echo "<br>";
    draw_bar_graph(480, 240, $graph_array, 40, "img/graph_pic.png");
    echo "<img src= 'img/graph_pic.png'/>";
    ?>
    </div>
</div>

<?php 
}
?>

    <script src="js/vendor/jquery.js"></script>
    <script src="js/foundation.min.js"></script>
    <!---<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>-->
    <script type="text/javascript" src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="slick/slick.min.js"></script>
    <script type="text/javascript">