Results 1 to 3 of 3

Thread: Java Alerts

  1. #1
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default Java Alerts

    On DJ Panels you have Alert.php with the following code
    Code:
      <form method='post' action='alert.php?act=create'>
    
      <table>
    
      <tr>
    
        <td>Message:</td>
    
        <td><textarea name='message' cols='30' rows='6'></textarea></td>
    
      </tr>
    
        <tr>
    
        <td></td>
    
        <td><input type='submit' value='Create'></td>
    
      </form>";
    
    break;
    
    
    
    case"create":
    
      $message = $_POST['message'];
    
      if(empty($message)){
    
        Echo"<b>Error:</b> Please fill out the message.";
    
        exit;
    
      }
    
        mysql_query("UPDATE alert SET active ='N'");
    
        mysql_query("INSERT INTO alert (message,name,active) VALUES ('$message', '$_SESSION[session_username]', 'Y')");
    
        
    
        Echo"<b>Alert Added Sucessfully</b><br>
    
        All other alerts have been deactivated. All users will recieve this alert
    
        once, until you deactivate it.";
    
    break;
    
    
    
    case"deactivate":
    
      mysql_query("UPDATE alert SET active ='N'");
    
      Echo"<b>Alerts Deactivated</b><br>
    
      All previous alerts have been deactivated.";
    
    break;
    
    
    
    }
    
    ?>
    How do you make these alerts appear on the site?
    +Rep for answer


  2. #2
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    HTML Code:
    <iframe name="I2" src="ALERTFILE" width="3%" height="1" frameborder="0" align="center"></iframe>
    Add that at the bottom of your index page and it should work.
    Last edited by Lysine; 10-01-2007 at 05:29 PM.
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  3. #3
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Well you need a file to pull it out of the DB then display it. Or more advanced set a cookie which means it only shows up once

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •