Example #1
0
function JB_display_motd($type, $width = 100)
{
    if ($type != 'E' && $type != 'U') {
        return false;
    }
    $data = JB_load_motd($type);
    if ($data['display'] == 'YES') {
        JB_render_box_top($width, $data['title']);
        echo $data['message'];
        JB_render_box_bottom();
        return true;
    }
    return false;
}
Example #2
0
</form>


<?php 
if ($_REQUEST['save'] != '') {
    JB_save_motd($_REQUEST['type'], $_REQUEST['title'], $_REQUEST['message'], $_REQUEST['display']);
    $JBMarkup->ok_msg('MOTD Saved.');
}
if ($_REQUEST['type'] == '') {
    ?>
<p>
Please select: <a href='motd.php?type=E'>MOTD for Employers</a> or <a href="motd.php?type=U">MOTD for Job Seekers</a>.
</p>
<?php 
} else {
    $data = JB_load_motd($_REQUEST['type']);
    ?>

	<form method="post" action="motd.php">
	Display MOTD: <input type="radio" value="YES" <?php 
    if ($data['display'] == 'YES') {
        echo " checked ";
    }
    ?>
 name="display"> Yes <input type="radio" value="NO" <?php 
    if ($data['display'] == 'NO') {
        echo " checked ";
    }
    ?>
 name="display"> No<br>
	<input type="hidden" name="type" value="<?php