wahlhelfer/admin/html/html.inc.php
2014-05-15 18:49:45 +02:00

130 lines
5.6 KiB
PHP

<?php
function startHtml($title)
{
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title><?php echo "Voting Advice Application :: ". $title; ?></title>
<link rel="stylesheet" href="<?php echo ADMIN_CSS;?>layout.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo ADMIN_CSS;?>datatable_jui.css" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_CSS;?>jquery.ui.theme.css" />
<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_CSS;?>datatable_jui.css" />
<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_CSS;?>jquery.ui.core.css" />
<link rel="stylesheet" type="text/css" href="<?php echo ADMIN_CSS;?>jquery.ui.datepicker.css" />
<!--[if lt IE 9]>
<link rel="stylesheet" href="<?php echo ADMIN_CSS;?>ie.css" type="text/css" media="screen" />
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="<?php echo ADMIN_JS;?>jquery-1.7.min.js" type="text/javascript"></script>
<script src="<?php echo ADMIN_JS;?>jquery.validate.js" type="text/javascript"></script>
<script src="<?php echo ADMIN_JS;?>jquery.dataTables.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo ADMIN_JS;?>jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo ADMIN_JS;?>jquery-ui-1.8.11.custom.min.js"></script>
<script type="text/javascript" src="<?php echo ADMIN_JS;?>ddaccordion.js"> </script>
<script type="text/javascript" src="<?php echo TINYMCE;?>tiny_mce.js"></script>
<script type="text/javascript">
$(document).ready(function() {
oTable = $('#myTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
});
</script>
<script type="text/javascript">
ddaccordion.init({
headerclass: "trigger", //Shared CSS class name of headers group
contentclass: "toggle", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: 300, //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})
</script>
</head>
<body>
<?php
}
function tophead($title)
{
?>
<header id="header">
<hgroup>
<h1 class="site_title"><a href="index.php">Website Setup</a></h1>
<?php
?>
<h2 class="section_title">Voting Advice Application Dashboard</h2><div class="btn_view_site"><a href="<?php echo SITE_URL;?>delete.php" title="Finish Setup">Finish</a></div>
<?php
?>
</hgroup>
</header> <!-- end of header bar -->
<section id="secondary_bar">
<div class="user">
<p>Welcome</p>
<a class="logout_user" href="<?php echo ADMIN_URL;?>logout.php" title="Logout">Logout</a>
</div>
<div class="breadcrumbs_container">
<article class="breadcrumbs"><a href="<?php echo ADMIN_URL;?>">Website Admin</a> <div class="breadcrumb_divider"></div> <a class="current"><?php echo $title;?></a></article>
</div>
</section><!-- end of secondary bar -->
<?php
}
function leftNav()
{
?>
<aside id="sidebar" class="column">
<h3 class="trigger" style="margin-top:20px;">Account Management</h3>
<ul class="toggle">
<li class="icn_edit_article"><a href="<?php echo ADMIN_URL;?>change-password.php">Change Password</a></li>
</ul>
<h3 class="trigger">Candidates Management</h3>
<ul class="toggle">
<li class="icn_new_article"><a href="<?php echo ADMIN_URL;?>add-candidate.php">Add Candidates</a></li>
<li class="icn_view"><a href="<?php echo ADMIN_URL;?>view-candidates.php">View Candidates</a></li>
</ul>
<h3 class="trigger">Questions Management</h3>
<ul class="toggle">
<li class="icn_new_article"><a href="<?php echo ADMIN_URL;?>add-question.php">Add Questions</a></li>
<li class="icn_view"><a href="<?php echo ADMIN_URL;?>view-questions.php">View Questions</a></li>
</ul>
<h3 class="trigger">Response Management</h3>
<ul class="toggle">
<li class="icn_new_article"><a href="<?php echo ADMIN_URL;?>add-response.php">Add Responses</a></li>
</ul>
</aside>
<!-- end of sidebar -->
<?php
}
function endHtml()
{
?>
</body>
</html>
<?php
}
?>