Location: PHPKode > projects > T-77.com Operational Management System > omis/companies.php
<?php require_once('Connections/t77_connect.php'); ?>
<?php
mysql_select_db($database_t77_connect, $t77_connect);
$query_companies = "SELECT * FROM t77_bill_companies ORDER BY t77_bill_companies.company_name";
$companies = mysql_query($query_companies, $t77_connect) or die(mysql_error());
$row_companies = mysql_fetch_assoc($companies);
$totalRows_companies = mysql_num_rows($companies);
?>
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<?
if(isset($_GET['reload'])) {
if($_GET['reload'] == 'yes') {
	$command = "MM_goToURL('parent.frames[\'menu\']','menu/menu.htm');return document.MM_returnValue";
} }?>
	
<body onLoad="<? echo $command; ?>">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="lineleft">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="31" align="left" valign="top"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="20"><img src="images/tabletopstart.gif" width="20" height="31" /></td>
              <td><table width="100%" height="30" border="0" cellpadding="5" cellspacing="0">
                  <tr>
                    <td><p><strong>Companies</strong></p>
                    </td>
                    <td><table border="0" align="right" cellpadding="0" cellspacing="0">
                        <tr>
                            <td><a href="javascript:;" onClick="MM_openBrWindow('company_add.php?ref=<? echo $_SERVER['PHP_SELF']; ?>&amp;quer=<? echo $_SERVER['QUERY_STRING']; ?>','companyAdd','scrollbars=yes,width=500,height=150')"><img src="images/toolbar/add_small.gif" alt="nieuw item op deze order zetten" width="20" height="20" border="0" /></a></td>
                          </tr>
                      </table>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="20">
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="0" class="tableBorder">
              <tr>
                <td class="tableTop"><h1>Company name </h1>
                </td>
                <td class="tableTop">&nbsp;</td>
              </tr>
              <?php 
				$i = 0;
				do { 
				$i++;
				if(is_int($i/2)) {
					$bgcolor = "#ffffff";
				} else {
					$bgcolor = "#eeeeee";
				}
				?>
              <tr bgcolor="<? echo $bgcolor; ?>">
                <td bgcolor="<? echo $bgcolor; ?>"><p><?php echo $row_companies['company_name']; ?></p>
                </td>
                <td align="right"><table width="41" border="0" align="right" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="17"><a href="javascript:;" onClick="MM_openBrWindow('company_edit.php?comID=<?php echo $row_companies['company_id']; ?>&ref=<? echo $_SERVER['PHP_SELF']; ?>&quer=<? echo $_SERVER['QUERY_STRING']; ?>','companyAdd','scrollbars=yes,width=500,height=200')"><img src="images/toolbar/edit_small_white.gif" alt="nieuw item op deze order zetten" width="17" height="17" border="0" /></a></td>
                      <td>&nbsp;</td>
                      <td width="17"><a href="delete.php?comID=<?php echo $row_companies['company_id']; ?>&delete=company" onClick="GP_popupConfirmMsg('Weet u zeker dat u <?php echo $row_companies['company_name']; ?> wilt wissen? Dit is niet ongedaan te maken.');return document.MM_returnValue"><img src="images/toolbar/delete_small_white.gif" width="17" height="17" border="0" /></a></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <?php } while ($row_companies = mysql_fetch_assoc($companies)); ?>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result($companies);
?>
Return current item: T-77.com Operational Management System