Skip to content

Commit

Permalink
start of putting files into directories. nervous about this commit. h…
Browse files Browse the repository at this point in the history
…ope I don't lost shit.
  • Loading branch information
paleomedia committed May 13, 2015
1 parent 6a62f6c commit 4f6fbc1
Show file tree
Hide file tree
Showing 31 changed files with 246 additions and 999 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.c9
1 change: 0 additions & 1 deletion JS/lawmakers.js

This file was deleted.

2 changes: 0 additions & 2 deletions README.md

This file was deleted.

25 changes: 0 additions & 25 deletions ajax.js

This file was deleted.

15 changes: 0 additions & 15 deletions api_functions.php

This file was deleted.

20 changes: 0 additions & 20 deletions api_getter.php

This file was deleted.

24 changes: 0 additions & 24 deletions bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,7 @@
<?php include 'dash.php';


// read the json file contents

$jsondata = file_get_contents('http://openstates.org/api/v1/bills/?apikey=bcc2a830883c4f459dbffe94b2a3e90f&state=id&search_window=session');

//convert json object to php associative array
$bills = json_decode($jsondata, true);

// echo "<pre>" . print_r($bills, 1) . "</pre>";

$dao = new Dao();
$connection = $dao->getConnection();
$i = 1;
foreach ($bills as $bill) {
$bill_name = $bill['bill_id'];
$year = $bill['session'];
$title = $bill['title'];
$bill_id = $bill['id'];

echo "inserting record $i<br/>";
$i++;

$dao->saveBills($bill_id, $year, $title, $bill_name, $connection) or die(print_r($connection->errorInfo(), true));
echo "$bill_name actually inserted</br>";
}



include 'footer.php'; ?>
27 changes: 22 additions & 5 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,32 @@ label[for="rememberme"] {
font-size: 1rem;
line-height: 1.1rem;
}
.legislators_main {
.lawmaker {
position: relative;
width: 100%;
}
.legislators_main div {
height: 50px;
.lawmaker > div {
height: 250px;
position: absolute;
width: 50px;
border: 1px solid;
width: 250px;
}
.leg_img {
position: relative;
width: 100%;

}
.leg_img h2 {
position: absolute;
left: 0;
width: 100%;
}
h2 span {
color: white;
font: bold 24px/45px Helvetica, Sans-Serif;
letter-spacing: -1px;
background: rgb(0, 0, 0); /* fallback color */
background: rgba(0, 0, 0, 0.7);
padding: 10px;
}
.comments {
border-top: 1px gray solid;
Expand Down
105 changes: 0 additions & 105 deletions dao.php

This file was deleted.

25 changes: 21 additions & 4 deletions dash.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,27 @@
<div class="dashitem">
<p>You are logged in as <?= $_SESSION["name"] ?>.</p>
</div>
<form id="logout" action="logout.php" method="post">
<form id="logout" action="lib/logout.php" method="post">
<input type="submit" value="Log out" />
<input type="hidden" name="logout" value="true" />
</form>
</div>

<?php } elseif (isset($_SESSION["flash"])) { #temp message across page redirects
?>
<script src="js/happy.js"></script>
<script src="js/loginval.js"></script>
<div class="dashitem"><?= $_SESSION["flash"] ?> </div>
<div class="loginbox">
<form action="login.php" method="POST">
<form id="loginform" action="lib/login.php" method="POST">
<div class="loginbox">
<input type="text" name="username" id="username" placeholder="Username" tabindex="1" />
</div>
<input type="submit" value="Go" tabindex="3">
<div>
<input type="password" name="password" id="password" placeholder="Password" tabindex="2">
<label for="rememberme">Remember me:</label>
<input type="checkbox" name="rememberme" value="1">
</div>
</form>
<p span id="newuser">or <a href="newaccount.php">create new account</a>
Expand All @@ -46,14 +50,16 @@
unset($_SESSION["flash"]);
} else { ?>
<div class="loginbox">
<form action="login.php" method="POST">
<form id="loginform" action="lib/login.php" method="POST">
<div class="loginbox">
<input type="text" name="username" id="username" placeholder="Username" tabindex="1" />
</div>
<input type="submit" value="Go" tabindex="3">
<div>
<input type="password" name="password" id="password" placeholder="Password" tabindex="2">
</div>
<label for="rememberme">Remember me:</label>
<input type="checkbox" name="rememberme" value="1">
</form>
<p span id="newuser">or <a href="newaccount.php">create new account</a>
</p>
Expand All @@ -63,8 +69,19 @@

<div class="dashhead" id="bills">Bills</div>
<div class="dashitem">LOGIN...to load your bills.</div>

<div class="dashhead" id="testimony">Comments</div>
<div class="dashitem">...to load your recent comments.</div>
<div class="dashitem">

<?php $dao = new Dao();
$commentlist = $dao->getUserComments($_SESSION["name"]);
foreach ($commentlist as $comment) {
echo $comment["comment"] . "<br />";
echo "DATE:" . $comment["date"] . "<br />";
} ?>

</div>

<div class="dashhead" id="lawmakers">Lawmakers</div>
<div class="dashitem">...to load your legislators.</div>
<div class="dashhead" id="topics">Topics</div>
Expand Down
Loading

0 comments on commit 4f6fbc1

Please sign in to comment.