Example #1
0
 public static function formatElement($element)
 {
     $relative_time = RelativeTime::getInstance();
     $location = self::getLocation($element);
     $html = "<div class='element'><table>";
     $html .= "<tr>";
     $html .= "<td>";
     $html .= "<a href='" . Configuration::getURLPath() . "/jobs/view/" . $element->job_id . "-" . str_replace(" ", "-", $element->jobtitle) . "' target='_blank'><b>" . $element->jobtitle . "</b></a><br>";
     $html .= "<span id='company'><a href='" . Configuration::getURLPath() . "/companies/info/" . $element->company . "'>" . $element->company . "</a></span><br> " . $location . "<br><br>";
     $html .= "</td>";
     $html .= "<td align='right' valign='top'>";
     if (!empty($element->logo)) {
         $html .= "<img src='" . Configuration::getCompanyImagesPath() . $element->logo . "' height='70px'>";
     }
     $html .= "</td>";
     $html .= "</tr>";
     $html .= "<tr>";
     $html .= "<td colspan='2'>";
     $html .= nl2br($element->snippet) . "<br>";
     $html .= "Posted <a href='#' title='" . Calendar::formatDateAndTime($element->unix_date_posted) . "'>" . $relative_time->getTextForSQLDate(date("Y-m-d h:i:s", $element->unix_date_posted)) . "</a><br>";
     $html .= "View Other Jobs from <a href='" . Configuration::getURLPath() . "/companies/view/" . $element->company . "'>" . $element->company . "</a>";
     $html .= "</td>";
     $html .= "</tr>";
     $html .= "</table></div>";
     return $html;
 }
    public static function featureCompany($company)
    {
        $html = '<script type="text/javascript">';
        $html .= '$(function () {';
        $html .= '$(\'.bubbleInfo\').each(function () {';
        $html .= 'var distance = 10;';
        $html .= 'var time = 250;';
        $html .= 'var hideDelay = 500;';
        $html .= 'var hideDelayTimer = null;';
        $html .= 'var beingShown = false;';
        $html .= 'var shown = false;';
        $html .= 'var trigger = $(\'.trigger\', this);';
        $html .= 'var info = $(\'.popup\', this).css(\'opacity\', 0);';
        $html .= '$([trigger.get(0), info.get(0)]).mouseover(function () {';
        $html .= 'if (hideDelayTimer) clearTimeout(hideDelayTimer);';
        $html .= 'if (beingShown || shown) {';
        $html .= 'return;';
        $html .= '} else {';
        $html .= 'beingShown = true;';
        $html .= 'info.css({';
        $html .= 'top: 0, left: -470, display: \'block\'';
        $html .= '}).animate({';
        $html .= 'top: "-=" + distance + "px", opacity: 1';
        $html .= '}, time, "swing", function() {';
        $html .= 'beingShown = false; shown = true;';
        $html .= '});';
        $html .= '}';
        $html .= 'return false;';
        $html .= '}).mouseout(function () {';
        $html .= 'if (hideDelayTimer) clearTimeout(hideDelayTimer);';
        $html .= 'hideDelayTimer = setTimeout(function () {';
        $html .= 'hideDelayTimer = null;';
        $html .= 'info.animate({';
        $html .= 'top: "-=" + distance + "px", opacity: 0';
        $html .= '}, time, "swing", function () {';
        $html .= 'shown = false;';
        $html .= 'info.css("display", "none");';
        $html .= '});';
        $html .= '}, hideDelay);';
        $html .= 'return false;';
        $html .= '});';
        $html .= '});';
        $html .= '});';
        $html .= '</script>';
        $html .= '<div class="bubbleInfo">
		<div class="trigger">
		<img src="' . Configuration::getCompanyImagesPath() . $company->logo . '" width="200">
		</div>
		<table id="dpop" class="popup">
		<tbody>
		<tr>
		<td>
		<div class="popup-contents">
		<table width="400px" align="center">
		<tbody>
		<tr>
		<td><h1>' . $company->name . '</h1>	</td>
		</tr>';
        if ($company->website != "") {
            $html .= '<tr>
						<td><a href="http://' . $company->website . '" target="_blank">' . $company->website . '</a><br></td>
					</tr>';
        }
        $html .= '   <tr>
						<td><p>' . $company->description . '</p></td>
					</tr>
					<tr>
						<td>Total Job Posts : <b>' . $company->total_job_count . '</b></td>
					</tr>
					<tr>
						<td>' . JobLayout::getViewAllJobsByCompanyNameButton($company->name) . '</td>
					</tr>
					</tbody>
				</table>
		</div>
				</td>
				</tr>
				</tbody>
			</table>
		</div>';
        return $html;
    }
Example #3
0
<div class="container">
	
	<?php 
if (!empty($company->logo)) {
    ?>
		<span style='float: right; border: 1px solid #cccccc; margin: 5px;'><img src="<?php 
    echo Configuration::getCompanyImagesPath() . $company->logo;
    ?>
" height="150"></span>
	<?php 
}
?>
	
	<h1><?php 
echo $company->name;
?>
</h1><br>
	Job Posts : <b><?php 
echo $company->total_job_count;
?>
</b><br><br>
	<h3>Description</h3><br>
	<p><?php 
echo $company->description;
?>
</p><br>
	<h3>Address</h3>
	<p><?php 
echo $company->address;
?>
</p><br>