Beispiel #1
0
 /**
  * Prints logo and "top-right" header HTML.
  *
  * @return void
  */
 public static function printHeaderBlock($showTopRight = true)
 {
     $username = $_SESSION['CATS']->getUsername();
     $siteName = $_SESSION['CATS']->getSiteName();
     $fullName = $_SESSION['CATS']->getFullName();
     $indexName = CATSUtility::getIndexName();
     echo '<div id="headerBlock">', "\n";
     /* CATS Logo */
     echo '<table cellspacing="0" cellpadding="0" style="margin: 0px; padding: 0px; float: left;">', "\n";
     echo '<tr>', "\n";
     echo '<td rowspan="2"><img src="images/applicationLogo.jpg" border="0" alt="CATS Applicant Tracking System" /></td>', "\n";
     echo '</tr>', "\n";
     echo '</table>', "\n";
     if (!eval(Hooks::get('TEMPLATE_LIVE_CHAT'))) {
         return;
     }
     if (!eval(Hooks::get('TEMPLATE_LOGIN_INFO_PRE_TOP_RIGHT'))) {
         return;
     }
     if ($showTopRight) {
         // FIXME: Use common functions.
         // FIXME: Isn't the UNIX-name stuff ASP specific? Hook?
         if (strpos($username, '@' . $_SESSION['CATS']->getSiteID()) !== false && substr($username, strpos($username, '@' . $_SESSION['CATS']->getSiteID())) == '@' . $_SESSION['CATS']->getSiteID()) {
             $username = str_replace('@' . $_SESSION['CATS']->getSiteID(), '', $username);
         }
         if (!eval(Hooks::get('TEMPLATE_LOGIN_INFO_TOP_RIGHT_1'))) {
             return;
         }
         /* Top Right Corner */
         echo '<div id="topRight">', "\n";
         echo '<div style="padding-bottom: 8px;">';
         // Begin top-right action block
         if (!eval(Hooks::get('TEMPLATE_LOGIN_INFO_TOP_RIGHT_UPGRADE'))) {
             return;
         }
         if ((!file_exists('modules/asp') || defined('CATS_TEST_MODE') && CATS_TEST_MODE) && LicenseUtility::isProfessional() && $_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA) {
             if (abs(LicenseUtility::getExpirationDate() - time()) < 60 * 60 * 24 * 30) {
                 $daysLeft = abs(LicenseUtility::getExpirationDate() - time()) / 60 / 60 / 24;
                 echo '<a href="http://www.catsone.com/professional" target="_blank">';
                 echo '<img src="images/tabs/small_upgrade.jpg" border="0" /> ';
                 echo 'License expires in ' . number_format($daysLeft, 0) . ' days, Renew?</a>&nbsp;&nbsp;&nbsp;&nbsp;', "\n";
             } else {
                 echo '<a href="http://www.catsone.com/professional" target="_blank">';
                 echo '<img src="images/tabs/small_upgrade.jpg" border="0" /> ';
                 echo 'CATS Professional Account Login</a>&nbsp;&nbsp;&nbsp;&nbsp;', "\n";
             }
         }
         if (!file_exists('modules/asp') && !LicenseUtility::isProfessional()) {
             echo '<a href="http://www.catsone.com/professional" target="_blank">';
             echo '<img src="images/tabs/small_upgrade.jpg" border="0" /> ';
             echo '<b>For more features, upgrade to CATS Professional</b></a>&nbsp;&nbsp;&nbsp;&nbsp;', "\n";
         }
         echo '<a href="', $indexName, '?m=logout">';
         echo '<img src="images/tabs/small_logout.jpg" border="0" /> ';
         echo 'Logout</a>', "\n";
         echo '</div>', "\n";
         // End top-right action block
         if (!eval(Hooks::get('TEMPLATE_LOGIN_INFO_EXTENDED_SITE_NAME'))) {
             return;
         }
         echo '<span>', $fullName, '&nbsp;&lt;', $username, '&gt;&nbsp;(', $siteName, ')</span>', "\n";
         if ($_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA) {
             echo '&nbsp;<span style="font-weight:bold;">Administrator</span>', "\n";
         }
         echo '<br />';
         $systemInfo = new SystemInfo();
         $systemInfoData = $systemInfo->getSystemInfo();
         if (isset($systemInfoData['available_version']) && $systemInfoData['available_version'] > CATSUtility::getVersionAsInteger() && isset($systemInfoData['disable_version_check']) && !$systemInfoData['disable_version_check'] && $_SESSION['CATS']->getAccessLevel() >= ACCESS_LEVEL_SA) {
             echo '<a href="http://www.catsone.com/download.php" target="catsdl">A new CATS version is available!</a><br />';
         }
         /* Disabled notice */
         if (!$_SESSION['CATS']->accountActive()) {
             echo '<span style="font-weight:bold;">Account Inactive</span><br />', "\n";
         } else {
             if ($_SESSION['CATS']->getAccessLevel() == ACCESS_LEVEL_READ) {
                 echo '<span>Read Only Access</span><br />', "\n";
             } else {
                 if (!eval(Hooks::get('TEMPLATE_LOGIN_INFO_TOP_RIGHT_2_ELSE'))) {
                     return;
                 }
             }
         }
         echo '</div>', "\n";
     }
     echo '</div>', "\n";
 }
Beispiel #2
0
                            $link = 'http://www.catsone.com/professional';
                            $image = 'images/add_licenses.jpg';

                            echo '<a href="' . $link . '">';
                            echo '<img src="' . $image . '" border="0" alt="Click here to add more user licenses"/>';
                            echo '</a>';
                            echo '<div style="text-align: left; padding: 10px 25px 0px 25px;">';
                            echo 'A <i>user license</i>, or <i>seat</i>, is the limit of full-access users you can have. You may ';
                            echo 'have unlimited read only users.';
                            echo '<p>';

                            echo 'This version of CATS is licensed to:<br /><center>';
                            echo '<b>' . LicenseUtility::getName() . '</b><br />';
                            $seats = LicenseUtility::getNumberOfSeats();
                            echo ucfirst(StringUtility::cardinal($seats)) . ' ('.$seats.') user license'.($seats!=1?'s':'').'<br />';
                            echo 'Valid until ' . date('m/d/Y', LicenseUtility::getExpirationDate()) . '<br />';
                            echo '</center>';


                            echo '<p>';
                            echo 'Click <a href="<?php echo $link; ?>">here</a> to purchase additional user seats.';
                            echo '</div></td>';
                        }
                        ?>
                    </tr>
                </table>

                <input type="submit" class="button" name="submit" id="submit" value="Add User" />&nbsp;
                <input type="reset"  class="button" name="reset"  id="reset"  value="Reset" onclick="document.getElementById('userAccessStatus').innerHTML='Delete - All lower access, plus the ability to delete information on the system.'" />&nbsp;
                <input type="button" class="button" name="back"   id="back"   value="Cancel" onclick="javascript:goToURL('<?php echo(CATSUtility::getIndexName()); ?>?m=settings&amp;a=manageUsers');" />
            </form>