Hi Again
How do I put a text color in case option? Eg I want the case:ALL the text will be red, case Dialogue the text is yellow, case Montage the text is blue and so on. What is the best way to modify these codes below?
Thnaks
nma
[PHP]
$events = (isset($_REQUEST['events']))?$_REQUEST['events']:"All";
switch($events) {
case "All":
$allEvents = $db->get_results("SELECT * FROM EventsShotsStartAndStopFrames where movieID='$movieID' order by startShot");
foreach($allEvents as $event)
{
$shotStartTime = $event->shotStartFrame/29.97;
if(is_int($event->shotStartFrame)) {
$shotStopTime = $event->shotStopFrame/29.97;
}
else {
$shotStopTime = 0;
}
$numberOfShotsInEvent = $event->endShot - $event->startShot;
$eventInformation = "$event->eventCategory <br />($numberOfShotsInEvent shots)<br />";
$eventInformation .= '<em style="font-size:smaller;">' . sec2hms($shotStartTime) . " - " . sec2hms($shotStopTime).'</em>';
insertEventTableRow($_GET['movieID'], $event->eventID, $event->imgSelectedKeyfrm, $shotStartTime, $shotStopTime, $eventInformation);
}
break;
case "Dialogue":
case "Montage":
case "Exciting":
$db->query("INSERT INTO LogsTable (page, action, userID, type, date) VALUES ('MB2eventlist', '$events categories', " . $_SESSION['user']->userID . ", '', getDate())");
$allEvents = $db->get_results("SELECT * FROM EventsShotsStartAndStopFrames where movieID='$movieID' and eventCategory = '$events' order by eventNo");
foreach($allEvents as $event)
{
$shotStartTime = $event->shotStartFrame/29.97;
if(is_int($event->shotStartFrame)) {
$shotStopTime = $event->shotStopFrame/29.97;
}
else {
$shotStopTime = 0;
}
$numberOfShotsInEvent = $event->endShot - $event->startShot;
$eventInformation = "<b>$events " . $event->eventNo . "</b><br />($numberOfShotsInEvent shots)<br />";
$eventInformation .= '<em style="font-size:smaller;">' . sec2hms($shotStartTime) . " - " . sec2hms($shotStopTime).'</em>';
insertEventTableRow($_GET['movieID'], $event->eventID, $event->imgSelectedKeyfrm, $shotStartTime, $shotStopTime, $eventInformation);
}
break;
default:
die("Invalid Event!");
break;
}
[/PHP]