Online list moods

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

1 reply · 448 views · started 17 years ago · 1 min read

2 participants
riderz Lead · 975 posts #1

hey guys who can help me i found this code here i want the genproc and core for this

else if($action=="moods")
{
echo "<head>";
echo "<title>Set OnlineList Mood</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";

echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
$uid = getuid_sid($sid);
echo "<form action=\"genproc.php?action=upmood&sid=$sid\" method=\"post\">";
echo "<select name=\"Mood\">";
echo "<option value=\"01\">Im Sweet</option>";
echo "<option value=\"black\">Im Sexy</option>";
echo "<option value=\"red\">Im Angry</option>";
echo "<option value=\"blue\">Im Happy</option>";
echo "<option value=\"green\">Im Sad</option>";
echo "</select>";
echo "<input type=\"Submit\" name=\"submit\" Value=\"Submit\"></form>";

echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}

Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

something else Fellow · 2,296 posts #2

something like this in genproc:

else if($action=="moods")
{
?>
<head>
<title>Set OnlineList Mood</title>
<link rel="stylesheet" type="text/css" href="../themes/<?=$theme[0]?>">
</head>
<body>
<p align="center">
<?
  $mission = mysql_query("UPDATE ibwf_users SET mood='".mysql_escape_string($_POST["mood"])."' WHERE id='".$uid."'");
  if($mission)
        {
?>
           <img src="images/ok.gif" alt="o"/>Mood Updated Successfully<br/>
<?
        }else{
?>
         <img src="images/notok.gif" alt="x"/>Whoops there apears to be an error...lol<br/>
<?
        }

?>
<a href="index.php?action=main&sid=<?=$sid?>"><img src="images/home.gif" alt=""/>Home</a>
</p>
</body>
<?
}

as for part in core its a function that is waste of time as it is only really going to be called once or maybee twice So i would just delete $mmsg = htmlspecialchars(getsetmood(getuid_sid($sid))); As the string $mmsg isnt even used in the script you posted above.

So that would then leave 1 place to call the function so its a waste of time as you could just call it with the other online list fields eg: a.mood or b.mood (i cant remember which 1) 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close