Пример #1
0
  _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>
<?php 
}
?>
</head> 

<body class="no_js" id="body">
	<?php 
echo Helper_Js::getJsChecker();
?>

	<div id="megaBlock">
	
	<div id="header">
		<?php 
echo View::factory('element/logo');
?>
		
		<div id="myslidemenu" class="jqueryslidemenu">
			<?php 
if (isset($controller)) {
    echo View::factory('element/menu/header', array('sections' => $sections));
}
?>
Пример #2
0
 public function project($projectC, $sample_id = '')
 {
     $projectCurr = Model_Project::instance()->getAll(array('LEFT JOIN sections ON (projects.section_id = sections.id)', 'where' => 'projects.title ="' . $projectC . '" AND sections.status=' . Model_Section::STATUS_ON));
     if (!isset($projectCurr[0])) {
         throw new AbstractException('Project‚ ' . $projectC . ' is not found');
     }
     $projectC = $projectCurr[0]['title'];
     $sectionCurr = array('section_id' => $projectCurr[0]['section_id'], 'title' => $projectCurr[0]['section_title']);
     $projects = Model_Project::instance()->getAll(array('where' => 'sections.id =' . $sectionCurr['section_id']));
     foreach ($projects as $project) {
         if ($project['title'] == $projectC) {
             $projectCurr = $project;
         }
     }
     $conditions = array('where' => 'project_id = ' . $projectCurr['id'], 'orderby' => 'id DESC');
     if ($sample_id) {
         //$conditions['orderby']="FIELD(samples.id,".$sample_id.") desc";
     }
     $samples = Model_Sample::instance()->getAll($conditions);
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) and strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') {
         echo View::factory('element/project', array('samples' => $samples, 'sample_id' => $sample_id, 'projectCurr' => $projectCurr));
         exit;
     }
     if (Helper_Js::isEnabledJs()) {
         header('Location: ' . Helper_Html::link(array('controller' => 'index', 'action' => 'section', 'param1' => $sectionCurr['title'], '#' => '/' . $projectC . '/' . $sample_id)));
     }
     $samplesCountMod = $this->_getSamplesCount($sectionCurr['section_id']);
     foreach ($projects as $projectKey => $project) {
         $projects[$projectKey]['count'] = isset($samplesCountMod[$project['id']]) ? $samplesCountMod[$project['id']] : '0';
     }
     $pagination = array('prev' => Model_Project::instance()->getPagin($projectCurr['id'], $projectCurr['section_id'], 'prev'), 'next' => Model_Project::instance()->getPagin($projectCurr['id'], $projectCurr['section_id'], 'next'));
     $this->view->set('pagination', $pagination);
     //return View::factory('element/project',array('samples'=>$samples,'sample_id'=>$sample_id));
     $this->view->setPageDescription($projectCurr['text']);
     $this->view->setPageTitle($sectionCurr['title'] . ' - ' . $projectCurr['title']);
     $this->view->set('sections', Model_Section::instance()->getAll());
     $sapmlesCurrentArrayId = 0;
     if ($sample_id) {
         foreach ($samples as $arrayKey => $sample) {
             if ($sample['id'] == $sample_id) {
                 $sapmlesCurrentArrayId = $arrayKey;
             }
         }
     }
     $this->view->set('sapmlesCurrentArrayId', $sapmlesCurrentArrayId);
     $this->view->set('samples', $samples);
     //		$this->view->set('sectionCurr', $sectionCurr);
     $this->view->set('projectCurr', $projectCurr);
     //		$this->view->set('projects', $projects);
     //
 }
Пример #3
0
			<div class="item" id="<?php 
    echo $sample['project_id'];
    ?>
">
		          	<a href="<?php 
    echo Helper_Html::link(array('controller' => 'index', 'action' => 'project', 'param1' => $sample['project_title'], 'param2' => $sample['sample_id']));
    ?>
" 
		          		title="<?php 
    echo htmlspecialchars($sample['project_title']);
    ?>
"
		          		class="loadingBg">
		          		
		          		<?php 
    if (!Helper_Js::isEnabledJs()) {
        echo '<noscript>';
        echo Helper_Image::renderSample($sample['sample_id'], Helper_Image::PREVIEW_PROJECT, array('alt' => $sample['sample_title']));
        echo '</noscript>';
    }
    ?>
		          	</a>
		          	<span><?php 
    echo $sample['project_title'];
    ?>
</span>
			</div>
		<?php 
}
?>