Ejemplo n.º 1
0
<div class="errorPage">
	<h1>Произошла ошибка</h1>
	<a href="/">Вернуться на главную</a><br/>
	<a href="<?php 
echo Helper_Html::link(array('controller' => 'info', 'action' => 'contact'));
?>
">Написать письмо</a><br/>
	<?php 
if (Configuration::getInstance()->get('config.debugger.enabled') && $error) {
    echo '<h5>Message</h5>';
    echo '<div>' . $error->getMessage() . '</div>';
    echo '<h5>File</h5>';
    echo '<div>' . $error->getFile() . '</div>';
    echo '<h5>Line</h5>';
    echo '<div>' . $error->getLine() . '</div>';
}
?>
</div>
	
Ejemplo n.º 2
0
<?php

if ($_SERVER['REQUEST_URI'] == '/') {
    $prefix = '<span class="logo" title="Брусничка">';
    $posfix = '</span>';
} else {
    $prefix = '<a href="' . Helper_Html::link('') . '" class="logo" title="Брусничка">';
    $posfix = '</a>';
}
?>


<?php 
echo $prefix;
?>
				<!--<img src="<?php 
echo Helper_Html::link('/img/icons/logo.png');
?>
" />
				 <span>Личный сайт Брусникиной Анны</span> -->
<?php 
echo $posfix;
Ejemplo n.º 3
0
<?php

echo View::factory('element/menu/admin');
?>

<?php 
if ($data['id']) {
    echo '<h3>Редактирование проекта №' . $data['id'] . ' "' . $data['title'] . '"</h3>';
} else {
    echo '<h3>Создаём новый проект</h3>';
}
?>
<form method="POST" enctype="multipart/form-data" action="<?php 
echo Helper_Html::link(array('controller' => 'admin', 'action' => 'addproject'));
?>
">
	<input type="hidden" name="id" value="<?php 
echo $data['id'];
?>
">
	<div>
		<label>Проект:</label>
		<select name="section_id">
		<?php 
foreach ($sections as $section) {
    $selected = $section['id'] == $data['section_id'] ? ' selected="selected"' : '';
    echo '<option value="' . $section['id'] . '" ' . $selected . '>' . $section['title'] . ' (' . $section['text'] . ')';
}
?>
		</select>
	</div>
Ejemplo n.º 4
0
$menu = array('О себе' => array('url' => Helper_Html::link(array('controller' => 'info', 'action' => 'about'))), 'Портфолио' => array('url' => Helper_Html::link(array('controller' => 'index', 'action' => 'index')), 'sections' => array(array('title' => 'первая секция', 'url' => 'первая секция'))), 'События' => array('url' => Helper_Html::link(array('controller' => 'info', 'action' => 'actions'))), 'Контакты' => array('url' => Helper_Html::link(array('controller' => 'info', 'action' => 'contact'))));
?>

<ul>
		<?php 
foreach ($menu as $title => $param) {
    echo '<li>';
    if ($title == 'Портфолио') {
        echo '<span>' . $title . '</span>';
    } else {
        echo '<a href="' . $param['url'] . '">' . $title . '</a>';
    }
    if ($title == 'Портфолио') {
        echo '<ul>';
        foreach ($sections as $section) {
            $class = isset($section['isCurrent']) && $section['isCurrent'] === true ? 'class="sel"' : '';
            echo '<li ' . $class . '>
								<a href="' . Helper_Html::link(array('controller' => 'index', 'action' => 'section', 'param1' => $section['title'])) . '">' . $section['title'] . '
								</a>
								</li>';
        }
        echo '</ul>';
    }
    echo '</li>';
}
?>
</ul>


Ejemplo n.º 5
0
 <?php 
foreach ($data as $row) {
    echo '<tr  ' . $statusClass[$row['id']] . '>';
    foreach ($row as $key => $val) {
        echo "<td>";
        if ($key == 'img') {
            echo Helper_Image::render($val, Helper_Image::ADMINPREVIEW);
        } elseif ($key == 'title' && isset($prefixUrl)) {
            echo '<a 
	 						href="' . Helper_Html::link(array('controller' => 'admin', 'action' => $prefixUrl, 'param1' => $row['id'])) . '" 
	 						title="' . $prefixUrlTitle . '">
 						' . $val . '</a>';
        } elseif ($key == 'created' || $key == 'updated') {
            echo Helper_Time::relativeTime($val);
        } elseif ($key == 'text') {
            echo htmlspecialchars($val);
        } else {
            echo $val;
        }
        echo "</td>";
    }
    echo '<td><a href="' . Helper_Html::link(array('controller' => 'admin', 'action' => 'edit', 'param1' => $prefix, 'param2' => $row['id'])) . '">edit</a>';
    echo '<br/>';
    echo '<a href="' . Helper_Html::link(array('controller' => 'admin', 'action' => 'delete', 'param1' => $prefix, 'param2' => $row['id'])) . '"
		 	onclick="return confirm(\'Удалять?\');"
		 	>delete</a></td>';
    echo '</tr>';
}
?>
</table>
Ejemplo n.º 6
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);
     //
 }
Ejemplo n.º 7
0
<?php

echo View::factory('element/menu/admin');
?>

<?php 
if ($data['id']) {
    echo '<h3>Редактирование Статической страницы №' . $data['id'] . '</h3>';
} else {
    echo '<h3>Создаём новый проект</h3>';
}
?>

<form method="POST" action="<?php 
echo Helper_Html::link(array('controller' => 'admin', 'action' => 'addstaticpage'));
?>
">
	<input type="hidden" name="id" value="<?php 
echo $data['id'];
?>
">
	
	<div>
		<textarea name="text" onkeydown="resizeTextarea(this)"><?php 
echo $data['text'];
?>
</textarea>
	</div>
	 
	<div>
		<label>&nbsp;</label>
Ejemplo n.º 8
0
<?php

$menu = array('Все разделы' => array('url' => Helper_Html::link(array('controller' => 'admin', 'action' => 'sections'))), 'Все проекты' => array('url' => Helper_Html::link(array('controller' => 'admin', 'action' => 'projects'))), 'Все работы' => array('url' => Helper_Html::link(array('controller' => 'admin', 'action' => 'samples'))), 'Статические страницы' => array('url' => Helper_Html::link(array('controller' => 'admin', 'action' => 'staticPage'))));
?>
	<div class="adminmenu">
		<?php 
$select = isset($select) ? Helper_Html::link($select) : false;
foreach ($menu as $title => $param) {
    $class = '';
    if ($select == $param['url']) {
        $class = 'class="select"';
    }
    echo '<span ' . $class . '><a href="' . $param['url'] . '">' . $title . '</a></span>';
}
?>
	</div>


Ejemplo n.º 9
0
<h1>
	<a  href="<?php 
echo Helper_Html::link(array('controller' => 'admin', 'action' => 'add' . ucfirst($prefixToAdd), 'param1' => $id));
?>
" 
		title="Добавить ещё!">
		<img src="<?php 
echo Helper_Html::link('/img/icons/add.png');
?>
" />
	</a>
	<?php 
echo $title;
?>
</h1>

<br/>
<br/>
Ejemplo n.º 10
0
<div style="text-align: center; margin: 10px 0; border: 2px solid grey; padding: 10px">
	
	<?php 
foreach ($sections as $section) {
    ?>
		<span style="padding: 0 10px">
					<?php 
    if ($sectionCurr['id'] == $section['id']) {
        echo '<b>' . $section['title'] . '</b>';
    } else {
        ?>
				<a href="<?php 
        echo Helper_Html::link(array('controller' => 'index', 'action' => 'section', 'param1' => $section['title']));
        ?>
">
					<?php 
        echo $section['title'];
        ?>
				</a>				
			<?php 
    }
    ?>
		</span>
	 <?php 
}
?>

</div>

Ejemplo n.º 11
0
<ul>
<?php 
        foreach ($projects as $project) {
            ?>
	<?php 
            if ($project['count']) {
                ?>
		<li><?php 
                $projectClass = $projectCurr && $projectCurr['id'] == $project['id'] ? 'current' : '';
                ?>
		<a class="<?php 
                echo $projectClass;
                ?>
"
			href="<?php 
                echo Helper_Html::link(array('controller' => 'index', 'action' => 'project', 'param1' => $project['title']));
                ?>
">
			<?php 
                echo $project['title'] . ' <span>(' . $project['count'] . ')</span>';
                ?>
		</a>
		</li>
		<?php 
            }
            ?>
	<?php 
        }
        ?>
</ul>
<?php 
Ejemplo n.º 12
0
"></script>
	<script type="text/javascript" src="<?php 
echo Helper_Html::link('/js/ui/jquery.ui.widget.js');
?>
"></script>
	<script type="text/javascript" src="<?php 
echo Helper_Html::link('/js/ui/jquery.ui.mouse.js');
?>
"></script>
	<script type="text/javascript" src="<?php 
echo Helper_Html::link('/js/ui/jquery.ui.slider.js');
?>
"></script>
	
	<link type="text/css" href="<?php 
echo Helper_Html::link('/css/jquery-ui-1.8.9.custom.css');
?>
" rel="stylesheet" />

<?php 
if (isset($keywords) && $keywords) {
    ?>
	
	<meta name="keywords" content="<?php 
    echo $keywords;
    ?>
"/>
<?php 
}
?>
	<title><?php 
Ejemplo n.º 13
0
		          		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 
}
?>

	</div>
</div>
<div id="slider"></div>

<h1 class="sectionTitle">
	<img src="<?php 
echo Helper_Html::link('/img/icons/sections/' . $sectionCurr['id'] . '.png');
?>
" />
</h1>

Ejemplo n.º 14
0
		<?php 
echo $currentSample['title'];
?>
	</div>

	<div class="sampleCollection">
			<?php 
foreach ($samples as $sample) {
    $class = '';
    if ($sample['id'] == $sample_id) {
        $class = 'select';
    }
    ?>

			<a href="<?php 
    echo Helper_Html::link(array('controller' => 'index', 'action' => 'project', 'param1' => $sample['project_title'], 'param2' => $sample['id']));
    ?>
"
				id="<?php 
    echo $sample['id'];
    ?>
"
				class="<?php 
    echo $class;
    ?>
">
				<?php 
    echo Helper_Image::renderSample($sample['id'], Helper_Image::MICRO_PREV);
    ?>
			</a>
Ejemplo n.º 15
0
<?php

$prefix = Helper_Image::render(WEBROOT_PATH . 'img/startpage/TMPNAME', Helper_Image::STARTPAGE, false);
$dataJS = array();
foreach ($sections as $key => $section) {
    $dataJS[$key]['sectionName'] = Helper_Text::clean($section['title']);
    $dataJS[$key]['aUrl'] = Helper_Html::link(array('controller' => 'index', 'action' => 'section', 'param1' => $section['title']));
    $dataJS[$key]['imgUrl'] = str_replace('TMPNAME', $section['id'] . '.jpg', $prefix);
}
?>

<div class="startpage" style="display: none">
	<a href="<?php 
echo $dataJS[0]['aUrl'];
?>
">
		<div class="rotatorCont">
			<img src="<?php 
echo $dataJS[0]['imgUrl'];
?>
&w=1024&h=575" />
		</div>
		<span><?php 
echo $dataJS[0]['sectionName'];
?>
</span>
	</a>
</div>

<br style="clear: both" />
Ejemplo n.º 16
0
<?php

echo View::factory('element/menu/admin');
?>

<?php 
if ($data['id']) {
    echo '<h3>Редактирование работы №' . $data['id'] . ' "' . $data['title'] . '"</h3>';
} else {
    echo '<h3>Создаём новую</h3>';
}
?>

<form method="POST" enctype="multipart/form-data" action="<?php 
echo Helper_Html::link(array('controller' => 'admin', 'action' => 'addSample'));
?>
">
	<input type="hidden" name="id" value="<?php 
echo $data['id'];
?>
">
	<div>
		<label>Проект:</label>
		<select name="project_id">
		<?php 
foreach ($projects as $project) {
    $selected = $project['id'] == $data['project_id'] ? ' selected="selected"' : '';
    echo '<option value="' . $project['id'] . '" ' . $selected . '>' . $project['title'] . '</option>';
}
?>
		</select>
Ejemplo n.º 17
0
} else {
    ?>
		<script type="text/javascript" src="<?php 
    echo Helper_Html::link('/js/jquery-1.4.3.min.js');
    ?>
"></script>
	<?php 
}
?>
	
	<script type="text/javascript" src="<?php 
echo Helper_Html::link('/js/jquery.waterwheelCarousel.js');
?>
"></script>
	<script type="text/javascript" src="<?php 
echo Helper_Html::link('/js/js.js');
?>
"></script>

    <meta name="keywords" content=""/>
    
	<title><?php 
echo $title;
?>
</title>
	
	<?php 
if (isset($description) && $description) {
    ?>
		<meta name="description" content="<?php 
    echo $description;
Ejemplo n.º 18
0
<div class="static-text">
	<img src="<?php 
echo Helper_Html::link('/img/icons/hanna.jpg');
?>
" class="hanna_pic"/>
	<div class="text-content">	
	<?php 
echo $content['text'];
?>
	</div>
</div>
Ejemplo n.º 19
0
<ul>
<?php 
foreach ($allFiles as $file) {
    echo '<li>';
    echo '<a href="' . Helper_Html::link(array('controller' => 'log', 'action' => 'view', 'param1' => $file['filename'])) . '">' . $file['filename'] . '</a> <i>' . $file['size'] . '</i>';
    echo '</li>';
}
?>
</ul>



<?php 
if (isset($filename)) {
    echo '<h2>' . $filename . '</h2>';
}
?>

<?php 
if (isset($content)) {
    echo str_replace(PHP_EOL, '<br/>', htmlspecialchars($content));
}