-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to add the scaffolding for elections 2016
- Loading branch information
Showing
11 changed files
with
148 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
// If you are accessing this page directly, redirect to the front page | ||
if (!$DB_USER) { | ||
header('Location: /'); | ||
} | ||
$title = "Alegeri 2016 Camera Deputaților"; | ||
|
||
include('header.php'); | ||
include('hp-includes/news.php'); | ||
|
||
$page = 'cdep/2016'; | ||
$c = 'camera+deputatilor+2016'; | ||
include('pages/submenu.php'); | ||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
$subpages = array( | ||
array( | ||
"link" => "Alegeri 2016", | ||
"page" => "summary.php" | ||
) | ||
); | ||
|
||
function getSidFor($fileName) { | ||
global $subpages; | ||
|
||
$count = 0; | ||
foreach ($subpages as $page) { | ||
if ($page['page'] == $fileName) { | ||
return $count; | ||
} | ||
$count++; | ||
} | ||
return -1; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
include_once('pages/functions_common.php'); | ||
include_once('pages/cdep_2008/functions.php'); | ||
include_once('hp-includes/electoral_colleges.php'); | ||
|
||
$t = new Smarty(); | ||
|
||
$t->assign("colleges", getElectoralCollegeHashByCounty('cdep')); | ||
|
||
$t->display('cdep_2016_summary.tpl'); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
$subpages = array( | ||
array( | ||
"link" => "Alegeri 2016", | ||
"page" => "summary.php" | ||
) | ||
); | ||
|
||
function getSidFor($fileName) { | ||
global $subpages; | ||
|
||
$count = 0; | ||
foreach ($subpages as $page) { | ||
if ($page['page'] == $fileName) { | ||
return $count; | ||
} | ||
$count++; | ||
} | ||
return -1; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
// If you are accessing this page directly, redirect to the front page | ||
if (!$DB_USER) { | ||
header('Location: /'); | ||
} | ||
$title = "Alegeri 2016 Camera Deputaților"; | ||
|
||
include('header.php'); | ||
|
||
// And now here I should put some content, like something about the elections, | ||
// some stats, some news, something like that. | ||
|
||
$page = 'senat/2016'; | ||
$c = 'senat+2016'; | ||
include('pages/submenu.php'); | ||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
include_once('pages/functions_common.php'); | ||
include_once('pages/cdep_2008/functions.php'); | ||
include_once('hp-includes/electoral_colleges.php'); | ||
|
||
$t = new Smarty(); | ||
|
||
$t->assign("colleges", getElectoralCollegeHashByCounty('senat')); | ||
|
||
$t->display('cdep_2016_summary.tpl'); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{* Smarty *} | ||
|
||
{include file="electoral_college_search.tpl"} | ||
|
||
<table width=970 cellspacing=15> | ||
<tr> | ||
<td width=970 valign="top"> | ||
|
||
Lista exhaustivă a colegiilor electorale:<br><br> | ||
<table cellpadding=5 cellspacing=0> | ||
{foreach from=$colleges item=college key=county name=counties} | ||
{if $smarty.foreach.counties.index % 2 == 0} | ||
<tr> | ||
{/if} | ||
<td width="100" valign="top"> | ||
<b>{$county|ucwords}</b>: | ||
</td> | ||
<td width="350" valign="top"> | ||
{section loop=$college name=c} | ||
<a href="?cid=23&colegiul={$college[c]}+{$county|lower|replace:' ':'+'}">{$college[c]|ucwords}</a> | ||
{/section} | ||
</td> | ||
|
||
{/foreach} | ||
<table> | ||
|
||
</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters