コード例 #1
0
ファイル: view.php プロジェクト: hbarroso/Goworkat
<!-- Ad-header -->
<div id="ad-head">
	<!-- ad-header-left -->
	<div id="ad-header-left">
		<div class="row-fluid">
			<!-- company-logo -->
			<?php 
if ($ad->company_logo) {
    ?>
			<div id="company-logo" class="span2" >
				<br/>
				<?php 
    echo HTML::image(Helper_Utils::static_path('media/uploads/' . $ad->company_logo . '.png'), array('title' => $ad->company_name, 'class' => 'img-rounded'));
    ?>
			</div>
			<?php 
}
?>
			<!-- ./company-logo -->

			<!-- Basic information -->
			<div class="span8"  >
				<h1><?php 
echo ucwords($ad->title);
?>
</h1>
				<?php 
if ($ad->company_name) {
    ?>
					<h4><i class="icon-parents"></i> <?php 
    echo $ad->company_name;
コード例 #2
0
ファイル: ad.php プロジェクト: hbarroso/Goworkat
 /**
  * It will perfome a search on the ads table
  *
  * $res = Model_Ad::search(array(
  *		'search_string' => "php, london",
  *		'telecommute' => 1,
  *		'jobtype_id' => 3,
  *		'category_id' => 2,
  *		'limit' => 50,
  *		'offset' => 0,
  *		'fields' => array('id', 'title'),
  * ));
  *
  * @param Array $args
  * @return Array
  */
 public static function search($args)
 {
     // Merge default args
     $args = array_merge(array('search_string' => '', 'telecommute' => 0, 'jobtype_id' => 0, 'jobboard_id' => 0, 'category_id' => 0, 'limit' => 50, 'offset' => 0, 'created_after' => 0, 'random_order' => false, 'fields' => array()), $args);
     // Loads application config file
     $config = Kohana::$config->load('application');
     // Create the client, tell it where the server
     // is and how long to wait for a response.
     $sphinx = new Helper_Sphinx();
     $sphinx->SetServer('localhost', 9312);
     $sphinx->SetConnectTimeout(1);
     // Use the exteneded v2 match type
     $sphinx->SetMatchMode(SPH_MATCH_BOOLEAN);
     // Set order & limit
     if ($args['search_string'] != "") {
         $sphinx->SetSortMode(SPH_SORT_EXTENDED, 'created_at DESC, highlight DESC');
     } else {
         $sphinx->SetSortMode(SPH_SORT_EXTENDED, 'created_at DESC');
     }
     $sphinx->SetLimits($args['offset'], $args['limit']);
     // Give me back the results as an array
     $sphinx->SetArrayResult(true);
     // Select only with telecommute
     if ($args['telecommute'] > 0) {
         $sphinx->SetFilter("telecommute", array(1));
     }
     // Select only with jobtype_id
     if ($args['jobtype_id'] > 0) {
         $sphinx->SetFilter("jobtype_id", array($args['jobtype_id']));
     }
     // Select only with jobboard_id
     if ($args['jobboard_id'] > 0) {
         $sphinx->SetFilter("jobboard_id", array($args['jobboard_id']));
     }
     // Select only with category_id
     if ($args['category_id'] > 0) {
         $sphinx->SetFilter("category_id", array($args['category_id']));
     }
     // Select only ads more recentent than created_after
     if ($args['created_after'] > 0) {
         $sphinx->SetFilterRange('created_at', $args['created_after'], strtotime('now'));
     }
     // Set random order
     if ($args['random_order']) {
         $sphinx->setSortMode(SPH_SORT_EXTENDED, '@random');
     }
     // Perfom the query against sphinx server
     $sphinx_results = $sphinx->Query($args['search_string'], 'ads');
     $rows = array();
     $words = array();
     // check if there's any results
     if ($sphinx_results['total'] > 0) {
         $ids = '';
         // prepare the rows ID's to be used against mysql query
         for ($i = 0; $i < count($sphinx_results['matches']); $i++) {
             $ids .= $sphinx_results['matches'][$i]['id'];
             if ($i < count($sphinx_results['matches']) - 1) {
                 $ids .= ',';
             }
         }
         // Merge the array so it can be included in the SQL query
         $fields = implode(',', $args['fields']);
         // Get the ID rows from MySQL
         $rows = DB::query(Database::SELECT, "SELECT {$fields} FROM\n\t\t\t\tads WHERE id IN({$ids}) AND active = 1 ORDER BY FIELD(id, {$ids}) ")->execute()->as_array();
         // Get all the keywords
         if (isset($sphinx_results['words'])) {
             foreach ($sphinx_results['words'] as $key => $value) {
                 $words[] = $key;
             }
         }
         // Cleans and formats data
         foreach ($rows as $key => $ad) {
             $rows[$key]['created_at'] = Helper_Datetime::format($ad['created_at'], $config['ad']['date_format']);
             $rows[$key]['is_new'] = Helper_Datetime::is_new($ad['created_at'], $config['ad']['is_new_days']);
             $rows[$key]['jobtype'] = ORM::factory('jobtype', $ad['jobtype_id'])->name;
             $rows[$key]['jobboard'] = ORM::factory('jobboard', $ad['jobboard_id'])->name;
             $rows[$key]['url'] = Helper_Utils::get_ad_url($ad['title'], $ad['id']);
             $rows[$key]['title'] = Text::limit_chars($ad['title'], 55, '...');
             if (in_array('company_logo', $args['fields'])) {
                 if (!$ad['company_logo']) {
                     $rows[$key]['company_logo'] = 'default';
                 }
                 $rows[$key]['company_logo'] = Helper_Utils::static_path('media/uploads/' . $rows[$key]['company_logo'] . '_thumb.png');
             }
             $title[] = $rows[$key]['title'];
             unset($rows[$key]['jobtype_id']);
         }
     }
     return array('rows' => $rows, 'total' => $sphinx_results['total'], 'words' => $words);
 }
コード例 #3
0
ファイル: template.php プロジェクト: hbarroso/Goworkat
 are registered trademarks of 3heap, LLC.</span>
								<span>All text and design is copyright &copy; <?php 
echo "Y";
?>
 3heap, LLC. All rights reserved.</span>
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
		<!-- ./Footer -->
		<?php 
foreach ($scripts as $file) {
    echo HTML::script(Helper_Utils::static_path($file)), PHP_EOL;
}
?>
		<script type="text/javascript">
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-796354-15']);
			_gaq.push(['_setDomainName', '.gowork.at']);
			_gaq.push(['_trackPageview']);

			(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		</script>
	</body>
コード例 #4
0
ファイル: right_side_main.php プロジェクト: hbarroso/Goworkat
<div class="box rounded" >
	<span>WHY USE GOWORK@ ?</span>
	<hr />
	<ul class="why-use-us">
		<li><span class="imap normal star"></span><strong>Top ads</strong><br/>
			We include the best job boars on the net.</li>
		<li><span class="imap normal globe"></span><strong>Global</strong><br/> Find the best jobs from the best companies in the world.</li>
		<li><span class="imap normal search"></span><strong>Amazing search</strong><br/> Search, filter and save your search to be included on daily/weekly email reports. Or just save it as RSS Feed URL</li>
	</ul>
</div>

<div class="box">
	<?php 
echo HTML::image(Helper_Utils::static_path('media/img/jobboards.png'), array('title' => 'Jobboards we include', 'alt' => 'Jobboards we include'));
?>
</div>


<div class="box">
	<div class="addthis_toolbox addthis_32x32_style addthis_default_style">
		<a class="addthis_button_facebook_follow" addthis:userid="goworkat"></a>
		<a class="addthis_button_twitter_follow" addthis:userid="goworkat"></a>
		<a class="addthis_button_tumblr_follow" addthis:url="http://blog.gowork.at"></a>
		<a class="addthis_button_rss_follow" addthis:url="/feed"></a>
	</div>
	<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-5117919251421879"></script>
</div>
コード例 #5
0
	<ul class="guarantee">
		<li><span class="imap star seal_guarantee"></span>
			If you are not happy we will <strong>refund you</strong>
			within <strong>30 days</strong> after your ad has been
			approved. No questions asked.	<?php 
echo HTML::anchor('/contact', 'More info');
?>
		</li>
	</ul>
</div>

<div class="box">
	<h3>YOUR AD WILL BE FEATURED AT</h3>
	<hr />
	<?php 
echo HTML::image(Helper_Utils::static_path('media/img/websites.png'), array('title' => 'Where your ad will be featured at'));
?>
</div>

<div class="box">
	<h3>SECURE TRANSACTION</h3>
	<hr />
	<ul class="secure-transaction">
		<li><span class="imap normal lock"></span>
			<strong>Feel safe when buying your new Ad</strong>
			Everytime you create a new ad you’re accesing a
			secure part of our site using a valid and registred
			SSL certificate. None of your information is
			kept with us except the job ad form data.
		</li>
	</ul>
コード例 #6
0
ファイル: about_us.php プロジェクト: hbarroso/Goworkat
<div class="row-fluid">
	<div class="span8 main-content">
		<h1>About</h1>
		<div class="row-fluid">
			<div class="span3">
				<?php 
echo HTML::image(Helper_Utils::static_path('media/img/henrique_barroso.png'), array('id' => 'ceo', 'title' => 'Henrique Barroso - Founder/CEO of 3heap LLC', 'height' => 170, 'width' => 130));
?>
			</div>
			<div class="span9">
				<blockquote class="pull-right lead">
					“...where hackers and startups meet to
					work together on amazing projects...”
				</blockquote>
				<p><span class="lead">What's Gowork@ ?</span></p>
					<strong>Gowork@</strong> was born out of the necessity to have a good job board aggregator that could
					include awesome search engine and give to users specific job ads that are relevant to their needs.
					<br><br>
					<p>So with this in mind, <strong>Gowork@</strong> was created. To help people looking for IT jobs all in one place.</p>
				<p>

				<hr>
				<p><span class="lead">Who am I ?</span></p>
					I've been a developer for almost 10 years, and I started doing freelance
					in 2009 before creating <?php 
echo HTML::anchor('http://www.3heap.com/', '3heap');
?>
.
					<br><br>
					I understand the needs that a developer have to find amazing, legit and creative companies,
					as I also understand companies that want the best from the best.<br/><br/>
コード例 #7
0
ファイル: mailing.php プロジェクト: hbarroso/Goworkat
			}

			.job-ad {
				line-height:5px;
				margin-bottom:40px;
			}

			.footer {
				font-size:11px;
				color:#b7b7b7;
			}
		</style>
	</head>
	<body>
		<?php 
echo HTML::image(Helper_Utils::static_path("http://gowork.at/media/img/logo_small.png"));
?>
		<h1>Jobs of the  <?php 
echo $frequency_type;
?>
</h1>
		<hr>

		<span class="results_filter">
			These are results for the matching filter: <strong><?php 
echo $filter;
?>
</strong>
		</span>
		<br/><br/>