Location: PHPKode > projects > NOLA > explain.php
<? include('includes/main.php'); ?>
<? //explain.php - copyright 2001 by Noguska - Fostoria, OH

     unset($sqlstr);
     unset($sqlstr2);
     if (!$extlogon) {
          if (!$usersupervisor) $sqlstr2.=' and supervisor=0';
          $mod=array('ap', 'ar', 'gl', 'pay', 'inv', 'est', 'fix', 'imp');
          foreach($mod as $data) {
              if ($usersupervisor) ${$data."_read"}=1;
              if (${$data."_read"}) {
                 if (($data=='ap'&&SOFTWARE_SHOW_AP)||($data=='ar'&&SOFTWARE_SHOW_AR)||($data=='gl'&&SOFTWARE_SHOW_GENERAL_LEDGER)||($data=='pay'&&SOFTWARE_SHOW_PAYROLL)||($data=='inv'&&SOFTWARE_SHOW_INVENTORY)||($data=='est'&&SOFTWARE_SHOW_PRINT_MANAGEMENT)||($data=='fix'&&SOFTWARE_SHOW_FIXED_ASSETS)||($data=='imp'&&SOFTWARE_SHOW_PRINT_MANAGEMENT_IMP)) {
                     $sqlstr.=' or access'.$data.'=1';
                 };
              };
          };
          foreach($mod as $data) {
              if ($usersupervisor) ${$data."_setup"}=1;
              if (${$data."_setup"}) {
                  if (($data=='ap'&&SOFTWARE_SHOW_AP)||($data=='ar'&&SOFTWARE_SHOW_AR)||($data=='gl'&&SOFTWARE_SHOW_GENERAL_LEDGER)||($data=='pay'&&SOFTWARE_SHOW_PAYROLL)||($data=='inv'&&SOFTWARE_SHOW_INVENTORY)||($data=='est'&&SOFTWARE_SHOW_PRINT_MANAGEMENT)||($data=='fix'&&SOFTWARE_SHOW_FIXED_ASSETS)||($data=='imp'&&SOFTWARE_SHOW_PRINT_MANAGEMENT_IMP)) {
                     $sqlstr.=' or setup'.$data.'=1';
                  };
              };
          };
          if ($usersupervisor) $sqlstr.=' or supervisor=1';
          $sqlstr=$sqlstr2.' and ('.substr($sqlstr,4).')';
     } else {
          if ($custcompanyid) { //if external customer
              $sqlstr.=' and extcust=1';
          } elseif ($vendcompanyid) { //if external vendor
              $sqlstr.=' and extvend=1';
          };
          $sqlstr.=' and nonext=0';
     };
     $recordSet = &$conn->Execute('select name, description from menucategory where id='.sqlprep($menucategoryid));
     if (!$recordSet||$recordSet->EOF) die(texterror('Couldnt read menu.  Exiting.'));
     echo '<b><center><font size="6">'.rtrim($recordSet->fields[0]).'</font></center><center><font size="4"><i>'.rtrim($recordSet->fields[1]).'</i></font></center></b><hr><br>';
     echo '<table><tr><td>';
     $recordSet = &$conn->Execute('select id, name, link, leftimageurl, rightimageurl from menufunction where menucategoryid='.sqlprep($menucategoryid).$sqlstr.' order by orderflag');
     if (!$recordSet||$recordSet->EOF) die(texterror('Couldnt read menu.  Exiting.'));
     echo '<table><tr>';
     $i=1;
     while (!$recordSet->EOF) {
         $name=rtrim($recordSet->fields[1]);
         $link=rtrim($recordSet->fields[2]);
         if (!$link) $link='construct.php';
         if (EXPLAIN_SHOW_PICTURES) {
             $leftimage=rtrim($recordSet->fields[3]);
             $rightimage=rtrim($recordSet->fields[4]);
         };
         if ($i%2) echo '</tr><tr>'."\n";
         echo '<td>'.dynimagerolloveraddl($leftimage,$rightimage,$link,$name).'</td>';
         $recordSet->MoveNext();
         $i++;
     };
     echo '</tr></table>';
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA