So, I'm converting my hardcoded site over to PHPNuke 7.8.
I have a script that essentially inserts a rating into a database, and it has to have a userID to do so.
I currently use the
Index Login Mod to integrate my insert script with the PHPBB users table, but I'm not quite sure how I can get it working with Nuke. Suggestions?
Code:
<?
if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {
echo "<form name=\"theForm\" method=\"POST\" action=\"do_rating.php\">";
echo "<input type=\"hidden\" name=\"songID\" value=\"". $song["songID"] . "\">";
}
?>
<font color="045bc1">Rating (you):</font>
<?
if ($userdata['user_id'] >= 0) {
if ($song["songtype"] == 'S') {
$db->open("SELECT song_rating.rating FROM song_rating where song_rating.songID = " . $song["songID"] . " AND song_rating.userID = " . $userdata['user_id']);
$the_rating = $db->row();
if ($the_rating["rating"] == null)
$my_rating = 0;
else
$my_rating = $the_rating["rating"];
InputComboRating("rating",$my_rating,0,'0, 1, 2, 3, 4, 5');
}
else
echo "This cannot be rated";
}
else
include("ratings/please_login_short.php");
?>
<?
if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {
echo "</form>";
}
?>
</form>