Can you use if statements for css classes?

I'm trying to make a table field change color depending on what info the field is pulling from the database.  Here is my code:
<table>
<?php do { ?>
      <tr>
        <td><input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_getSystems['path_id']; ?>" />
          <strong><?php echo $row_getSystems['system']; ?></strong></td>
        <td><?php echo $row_getSystems['jumps']; ?></td>
<?php
  if ($row_getSystems['security'] < 0.5) {
  ?>
  <td class="alert"><?php echo $row_getSystems['security']; ?></td> <? ;}
  elseif ($row_getSystems['security'] < 0.7)  {
  ?>
        <td class="noalert"><?php echo $row_getSystems['security']; ?></td> <? ;}
  else {
  ?>
  <td class="good"><?php echo $row_getSystems['security']; ?></td> <? ;} ?>
        <td><?php echo $row_getSystems['belts']; ?></td>
        <td><?php echo $row_getSystems['station']; ?></td>
        <td><?php echo $row_getSystems['deadend']; ?></td>
        </tr>
      <?php } while ($row_getSystems = mysql_fetch_assoc($getSystems)); ?>
  </table>
I added the spaces to make the part I wrote stand out better.
When I try to view it live - it says:
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\mining\systems.php on line 101
Any ideas on how to do this?  Cause clearly, I'm not doing it correctly. 
Thanks!

Nevermind, I figured out how to do it.  Here is the correct code.  I presume this is the best way.  Hopefully. 
<table>
  <?php do { ?>
      <tr>
        <td><input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_getSystems['path_id']; ?>" />
          <strong><?php echo $row_getSystems['system']; ?></strong></td>
        <td><?php echo $row_getSystems['jumps']; ?></td>
        <!-- Table Background Changes -->
                    <td style=" color: #fff;
                    <?php
                    if ($row_getSystems['security'] < 0.5) {
                    echo "background-color: #C00"; }
                    elseif  ($row_getSystems['security'] < 0.7) {
                    echo "background-color: #F90"; }
                    else {
                    echo "background-color: #060";
                    ?>
        ">
                      <strong><?php echo $row_getSystems['security']; ?></strong></td>
        <!-- End of Changes -->
        <td><?php echo $row_getSystems['belts']; ?></td>
        <td><?php echo $row_getSystems['station']; ?></td>
        <td><?php echo $row_getSystems['deadend']; ?></td>
        </tr>
      <?php } while ($row_getSystems = mysql_fetch_assoc($getSystems)); ?>
  </table>

Similar Messages

  • Can you use time capsule for your mac and have readynas backup your pc's on the same network

    Can you use time capsule for your mac and use readynas to back up your pc's on the same network

    Sure, that is trivial setup.. they both have different names and IP addresses.
    You should be able to use ReadyNas for TM backup but you should check the latest state of play for that.

  • Can you use one PC for 2 different Ipods, with out erasing the others music from Itunes?

    Can you use one PC for different Ipod touch's , with out erasing the other persons Itunes music?

    Yes.  See:
    How to use multiple iPods, iPads, or iPhones with one computer

  • Can you use a 3600 for an Ethernet bridge??

    Can you use a Cisco 3600 to do a P2P bridge? Using the MAP's ethernet port  to connect to a remote LAN?  On that remote LAN can you have  lightweight APs that connect to a controller on the RAP side?

    Can you use a 3600 for an Ethernet bridge??
    http://www.cisco.com/en/US/docs/wireless/controller/7.0MR1/configuration/guide/cg_mesh.pdf
    Check - Converting Indoor Access Points to Mesh Access Points
    Ethernet bridging has to be enabled for the following two scenarios:
    1. When you want to use the mesh nodes as bridges.
    2. When you want to connect Ethernet devices such as a video camera on the MAP using its Ethernet port.
    Wireless Backhaul:
    In a Cisco wireless backhaul network, traffic can be bridged between MAPs and RAPs. This traffic can
    be from wired devices that are being bridged by the wireless mesh or CAPWAP traffic from the mesh
    access points.
    Guidelines For Using Voice on the Mesh Network
    • Voice is supported only on indoor mesh networks in release 5.2, 6.0, 7.0, and 7.0.116.0. For
    outdoors, voice is supported on a best-effort basis on a mesh infrastructure.
    other factors to note:-
    #you would be running on backhaul using A radio which is prone to DFS.
    #CAPWAP may not tolerent enough with AWPP convergence on MAP roaming.
    #CAPWAP is more latency sensitive than voice.

  • Can we use Loop Statement for Ranges

    Hi Friends,
    I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
    I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
    But my question is .....
    My R_range has values as below
    'I' 'EQ' '001'
    'I' 'EQ' '002'
    'I' 'BT' '003' '007'
    'I' 'EQ' '008'
    I have to move all these values to R_New_range and my count of items should be '8'.
    How can i do that????????
    Expecting ur answers....
    Thanks in advance
    Cheers,
    R.Kripa.

    hey friends,
    Its nice to see the replies.... but i think i had confused u all with the question
    Now i'll explain u all in detail ....
    See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
    I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
    Description of the Dump is
    Error in the module RSQL accessing the database interface
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
    neither                                                                
    caught nor passed along using a RAISING clause, in the procedure        
    "GET_COSP_COSS" "(FORM)"                                               
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.                          
    The reason for the exception is:                                        
    The SQL statement generated from the SAP Open SQL Statement violates a  
    restriction imposed by the database system used in R/3.                                                                               
    Possible errors:                                                        
    o The maximum size of an SQL statement has been exceeded.              
    o The statement contains too many input variables.                     
    o The space needed for the input data exceeds the available memory.    
    o ...                                                                               
    You can usually find details in the system log (SM21) and in the        
    developer trace of the work process (ST11).                             
    If an error occurs the developer trace often informs you about the      
    current restrictions.                                                   
    So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
    Now :
    My Projects are stored in the form of a range R_Range
    I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
    I am clear till this .....
    If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
    But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
    Hope iam clear with my question
    If not do revert back ....
    Thanks in advance for the replies
    Cheers,
    R.Kripa.
    My Doubt is ....

  • Can you use same earphones for iPhone and iPad air

    Can you use the earphones from an iPhone on an iPad air

    Welcome to Apple Support Communities
    Of course. They are compatible with both iPhone and iPad Air

  • Can you use Crystal Reports for Enterprise to connect to BOE4 over the web?

    Hello,
    When I use Crystal Reports for Enterprise in BI Launchpad when I am connected on the LAN network it works.
    If I connect via the internet, it doesn't.
    I wanted to know if Crystal Reports for Enterprise only works if you are connected to Business Enterprise 4.0 on a LAN network and if it's not designed to work remotely, aka via the internet connection, like you can with Webi?
    regards
    Janetta

    Hello,
    We installed BOE4 on the server, it runs perfectly, no issues.
    Install Crystal Reports for Enterprise on a laptop. It's the latest one as I checked to see if there's any later versions or patches.
    I am able to log into the BOE Enterprise system as administrator.
    Namely I have setup the Server connections per the following:
    Server Name:   <IP address>
    The check box for SSL is unchecked.
    Server Port Number:   nnnn
    Server Context:  /dswsbobje
    System display name:   <my server> External Connection
    User Name : Administrator
    It connects successfully.
    I then go and create a report against a Universe that I can see listed on my BOE 4 server.
    It then comes up with this error message:
    "Unable to Logon: There is a problem logging on to SAP BusinessObjects Enterprise.
    Please check your logon credentials and make sure your nework is properly configured before trying again.
    If problems persist please contact your Administrator."
    Architecture: 
    BOE 4 sits on Windows 2008 Server SP2
    Laptops tried it on are Windows Vista and Windows 2003 Std.
    Thanks for looking into this for me.
    Edited by: Symonds Janetta on Oct 11, 2011 12:05 AM

  • Can you use home sharing for computers in different states or does it have to be in the same house on the same wifi network?

    I want to be able to share my library and access my fiance's as well, however currently he is in a different state. Do we have to be on the same network fo us to have access to our libraries or can it be done over the internet?

    That is really crappy. Oh well thank you

  • Can you use home sharing for photos?

    I just installed the app Remote by apple. It's for home sharing with iTunes or Apple TV. Can it be used for photos as well? I have an iMac OS X 10.6.8.
    Is there an app I can use for viewing and transferring photos over the Internet? Please help. Thank you.
    HM

    That is really crappy. Oh well thank you

  • How can you use the Keyboard for a JComboBox within a JTable without F2

    I am brand new to Java and I can't seem to figure this out. I have a JTable with 4 columns. The first column is a jCheckBox which is working fine. The other three are JComboBoxes. They work fine when you click them and select from the list, but our end users only want to navigate with the keyboard. They want to be able to tab to the column and just start typing the first letter of the item that they want to choose from the list and have that pop up the list and scroll to the first item in the list that starts with the letter the typed. Does anyone know how to do this? I have been playing with this for a week now and I can't seem to make it work. Please help. Below is the code for my table. Any help would be appreciated greatly. Thanks,
    Lisa
         private void LoadSTCGTable(){
         //Connect to database
            try {
                    connection = ConnecttoDB.connect();
                    // Tell me why I couldn't connect
                } catch (ClassNotFoundException ex) {
                    ex.printStackTrace();
                } catch (SQLException ex) {
                    ex.printStackTrace();
         try {
                // Get listing of Squad Types
                tblSTCG.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                    {new Boolean(false), null, null, null},
                new String [] {
                    "SELECT", "SQUAD TYPE", "SQUAD CLASS", "SQUAD GROUP"
              //Add Checkbox column
               tblSTCG.getColumnModel().getColumn(0).setCellEditor(tblSTCG.getDefaultEditor(Boolean.class));
               tblSTCG.getColumnModel().getColumn(0).setCellRenderer(tblSTCG.getDefaultRenderer(Boolean.class));      
               tblSTCG.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
               Whichquerytoread = 1;
               GetSql();
               sql = textfileinfo;
               stmt = connection.createStatement();
               rs = stmt.executeQuery(sql);
               md = rs.getMetaData();
               typelist = new ArrayList();
               // Loop Through Results
               typelist.add(new PairedDescriptionCodeDesc("",""));
               while (rs.next())
                  int i = 1;
                 typelist.add( new PairedDescriptionCodeDesc(rs.getString(2),rs.getString(1)));
              s1 = new TreeSet(typelist);
              typelist = new ArrayList(s1);
              AllTypeList = new PairedDescriptionCodeDesc[typelist.size()];
              for (int i = 0; i<typelist.size(); i++)
                 AllTypeList=(PairedDescriptionCodeDesc)typelist.get(i);
    rs.close();
    catch (SQLException ex) {
    ex.printStackTrace();
    Vector typedata = new Vector();
    for (int i=0;i<typelist.size();i++)
    typedata.addElement((PairedDescriptionCodeDesc)typelist.get(i));
    cmboType = new JComboBox();
    cmboType.setModel(new DefaultComboBoxModel(typedata));
    cmboType.putClientProperty("JComboBox.isTableCellEditor", Boolean.TRUE);
    cmboType = new JComboBox(AllTypeList);
    cmboType.setBorder(BorderFactory.createEmptyBorder());
    squadcol = tblSTCG.getColumnModel().getColumn(1);
    DefaultCellEditor cmboTypeEditor = new DefaultCellEditor(cmboType);
    cmboTypeEditor.addCellEditorListener(new NewRowCellEditorListener(tblSTCG));
    squadcol.setCellEditor(cmboTypeEditor);
    try {
    // Get listing of Squad Class
    Whichquerytoread = 2;
    GetSql();
    sql = textfileinfo;
    stmt = connection.createStatement();
    rs = stmt.executeQuery(sql);
    md = rs.getMetaData();
    classlist = new ArrayList();
    // Loop Through Results
    classlist.add(new PairedDescriptionCodeDesc("",""));
    while (rs.next())
    classlist.add(new PairedDescriptionCodeDesc(rs.getString(2),rs.getString(1)));
    s1 = new TreeSet(classlist);
    classlist = new ArrayList(s1);
    AllClassList = new PairedDescriptionCodeDesc[classlist.size()];
    for (int i = 1; i<classlist.size(); i++)
    AllClassList[i]=(PairedDescriptionCodeDesc)classlist.get(i);
    rs.close();
    catch (SQLException ex) {
    ex.printStackTrace();
    Vector classdata = new Vector();
    for (int i=0;i<classlist.size();i++)
    classdata.addElement((PairedDescriptionCodeDesc)classlist.get(i));
    cmboClass = new JComboBox();
    cmboClass.setModel(new DefaultComboBoxModel(classdata));
    cmboClass = new JComboBox(AllClassList);
    classcol = tblSTCG.getColumnModel().getColumn(2);
    DefaultCellEditor cmboClassEditor = new DefaultCellEditor(cmboClass);
    classcol.setCellEditor(new DefaultCellEditor(cmboClass));
    cmboClassEditor.addCellEditorListener(new NewRowCellEditorListener(tblSTCG));
    try {
    // Get listing of Squad Group
    Whichquerytoread = 3;
    GetSql();
    sql = textfileinfo;
    stmt = connection.createStatement();
    rs = stmt.executeQuery(sql);
    md = rs.getMetaData();
    grouplist = new ArrayList();
    // Loop Through Results
    grouplist.add(new PairedDescriptionCodeDesc("",""));
    while (rs.next())
    int i = 0;
    grouplist.add( new PairedDescriptionCodeDesc(rs.getString(2), rs.getString(1)));
    s1 = new TreeSet(grouplist);
    grouplist = new ArrayList(s1);
    AllGroupList = new PairedDescriptionCodeDesc[grouplist.size()];
    for (int i = 0; i<grouplist.size(); i++)
    AllGroupList[i]=(PairedDescriptionCodeDesc)grouplist.get(i);
    rs.close();
    catch (SQLException ex) {
    ex.printStackTrace();
    Vector groupdata = new Vector();
    for (int i=0;i<grouplist.size();i++)
    groupdata.addElement((PairedDescriptionCodeDesc)grouplist.get(i));
    cmboGroup = new JComboBox();
    cmboGroup.setModel(new DefaultComboBoxModel(groupdata));
    cmboGroup = new JComboBox(AllGroupList);
    groupcol = tblSTCG.getColumnModel().getColumn(3);
    DefaultCellEditor cmboEditor = new DefaultCellEditor(cmboGroup);
    cmboEditor.addCellEditorListener(new NewRowCellEditorListener(tblSTCG));
    groupcol.setCellEditor(cmboEditor);
    tblSTCG.setShowHorizontalLines(false);
    tblSTCG.setShowVerticalLines(false);
    TableColumnModel columnModel = tblSTCG.getColumnModel();
    TableColumn column;
    tblSTCG.getColumnModel().getColumn(0).setPreferredWidth(5);
    tblSTCG.getColumnModel().getColumn(1).setPreferredWidth(100);
    tblSTCG.getColumnModel().getColumn(2).setPreferredWidth(100);
    tblSTCG.getColumnModel().getColumn(3).setPreferredWidth(100);
    scpSTCG.setViewportView(tblSTCG);
    private class NewRowCellEditorListener implements CellEditorListener
    JTable editingTable;
    public NewRowCellEditorListener(JTable table)
    editingTable = table;
    public void editingStopped(ChangeEvent e)
    if(editingTable.getRowCount() == editingTable.getSelectedRow() + 1)
    ((DefaultTableModel)editingTable.getModel()).addRow(new Object [] {null, null, null, null});
    public void editingCanceled(ChangeEvent e)

    Final Cut Pro menu > Audio / Video Settings... (Cmd Opt Q) will show you al the various presets currently loaded
    Sequence menu > Settings... (Cmd Zero) will show you the current sequence's settings
    Edit > Item Properties > Format... (Cmd 9) will show you the selected clip's properties

  • Can you use Apple TV for a second monitor to a TV (Not mirroring)

    I'm thinking about buying an Apple TV so I can have a wireless second display for my MacBook Pro. Am I able to do this or can I only mirror the one display? Am also what is the minimum Internet speed needed for AirPlay

    OK - I now have the bits and have set up the system...
    Airparrot is great. It allows you to select which display to mirror on the Apple TV. It also allows you to send audio to the Apple TV.  I have EyeTV and Front Row set up to use the second dispaly and Airparrot successfully sends this to the Apple TV. However my audio synce problems  remain. Whenever I use digital (toslink) sound from the iMac the audio is out by several frames. Unfortunately this even happns if I send both the video and audio to the Apple TV. It is unwatchable. This means I will need to switch to the RCA audio output on the iMac (which is AUX in on the hifi) whenever I want to send video to the AppleTV.
    If I play video from the Apple TV (using home sharing) then the audio sync is much better. But this means that Eye TV wont be accessible from the Apple TV menu (now there is an opportunity for a clever programmer).
    I have used QT Sync to adjust the sync when sending video to the Apple TV via quicktime. In speech the lips sync at a difference of 8 frames. However QT Sync is no good for playing video from Front Row or EyeTV. There is another programming opportunity...(adjusting sync for all types of output - it would be a good addition to Airparrot).
    So in short, I cannot use Apple TV to play TV from the iMac. And the Apple TV menu is much more limited, in many ways, than Front Row.
    (the iMac is still running Snow Leopard - which may be partly causing the problems - but there are several reasons why I dont want to upgrade it to Mountain Lion)

  • Can you use multiple songs for a slide show in iphoto ios 2.0?

    I want to prepare a 10 minute slide show that uses more than one song.   It seems you can use a playlist using iphoto for mac (and I have seen that in other discussion threads) but what about iphoto for IOS on an ipad?   It seems to let me only use one song.   I am on IOS7 and using the lastest iphoto for ipad (v 2.0)Any suggestions out there?  Thanks

    You are welcome. Have a look at the GarageBand Help to get started.
    Basically you need to
    Create a new project - select an empty project template.
    Open the Media Browser and drag the songs from your iTunes playlist into the track area.
    Use the "Share" menu to send your new sound track to iTunes.
    This screenshot is from GarageBand 10.0, but in GarageBand '11 it would be similar.
    Just in case that you want to add some sound effects to the soundtrack, like rain or thunder, you will find the clips in the Loop Browser:
    Good luck for your slideshow

  • Configuring Filesystem Free Disks for ASM ? Can you use free space for ASM

    Is there a way to dedicate the available disk space for ASM in order to create a database under ASM?
    I was hoping that I would not have to reinstall the Linux OS Enterprise 5 (Red Hat). So I de-installed my 2-node RAC environment, installed the ASM required RPMs for Red Hat linux Enterperise 5 and then proceeded to reinstall 11g Clusterware and set "Configure Automatic Storage Management (ASM)".
    Did I miss something? THanks

    Thank you.
    I have 3 VM-Oracle guests running Oracle 11g. When I've used NFS as share that worked fine, however I was not using ASM. I know wish to get smart about ASM implementation.
    Server1(rac1) Linux E5 64bit
    Server2(rac2) Linux E5 64bit
    Server3(asm) Linux E5 64bit (I created four partitions
    ./oracleasm createdisk DATDISK /dev/xvda10 OK
    ./oracleasm createdisk VOTDISK /dev/xvda11 OK
    ./oracleasm createdisk OCRDISK /dev/xvda12 OK
    ./oracleasm createdisk OFRDISK /dev/xvda13 OK
    On Node1 and Node 2
    ./oracleasm scandisk
    Scanning the system for Oracle ASMLib disks: OK
    After this should I or how do you make a partition shared? Could I used NFS? so that I can proceed with the RAC install and then create database .

  • Can you use Attribute Dimensions for partitioning?

    if Yes then how.

    No, the 6.1 DBAG specifically states on page 10-8 that you can not partition along attribute dims.--Jeff McAhrenDallas, Texas

  • HT204380 can you use 3g network for facetime for iphone?

    can some one do video chat with 3G network with iphone4 and later??

    Like I said for a iphone 4 facetime over cellular network is not possible.  It can only be done over wifi on your.  I do not know what sort of an internet plan you have or how long the calls you might get will be so I have no way of knowing

Maybe you are looking for