-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
476 changed files
with
72,684 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<h1 style='margin:auto auto; text-align:center;'>Ēšanas kalendārs</h1> | ||
<br/> | ||
<h3>Cikos tvīto visbiežāk</h3> | ||
<div style='margin:auto auto;width:500px;'> | ||
<?php | ||
|
||
//jādabū visas dienas Mon-Sun... | ||
//šitā ir pirmdiena...sāksim ar to | ||
$theDate = '2011-10-31'; | ||
$timeStamp = StrToTime($theDate); | ||
for($zb=0;$zb<7;$zb++) { | ||
$ddd = date('D', $timeStamp); | ||
$timeStamp = StrToTime('+1 days', $timeStamp); | ||
$dienas[$ddd][skaits]=0; | ||
} | ||
|
||
//dabū šodienas datumu | ||
$menesiss = $menesis = date("m"); | ||
$dienasz = $diena = date("d"); | ||
$gadss = $gads = date("Y"); | ||
//izrēķina datumu pirms mēneša | ||
$menesis--; | ||
if($menesis==0){ | ||
$menesis=12; | ||
$gads--; | ||
} | ||
$max=0; | ||
$maxd=0; | ||
for($zb=0;$zb<24;$zb++) $stundas[$zb][skaits]=0; | ||
|
||
$q = mysql_query("SELECT created_at FROM `tweets` WHERE created_at between '$gads-$menesis-$diena' AND '$gadss-$menesiss-$dienasz'"); | ||
while($r=mysql_fetch_array($q)){ | ||
$laiks=$r["created_at"]; | ||
$laiks=strtotime($laiks); | ||
$diena=date("D", $laiks); | ||
$laiks=date("G", $laiks); | ||
$dienas[$diena][skaits]++; | ||
$stundas[$laiks][skaits]++; | ||
if($stundas[$laiks][skaits]>$max) $max=$stundas[$laiks][skaits]; | ||
if($dienas[$diena][skaits]>$maxd) $maxd=$dienas[$diena][skaits]; | ||
} | ||
|
||
//izdrukā populārākās stundas | ||
for($zb=0;$zb<24;$zb++) { | ||
$percent = round($stundas[$zb][skaits]/$max*100); | ||
?> | ||
<script type="text/javascript"> | ||
$(function(){ | ||
$("#progressbar<?php echo $zb;?>").progressbar({ | ||
value: <?php echo $percent;?> | ||
}); | ||
}); | ||
</script> | ||
<div style=" font: 50% 'Trebuchet MS', sans-serif;" id="progressbar<?php echo $zb;?>"></div> | ||
<div class="sk"><?php echo $zb.":00 - ".($zb+1).":00";?></div> | ||
</br> | ||
<?php | ||
} | ||
?> | ||
</div> | ||
<br/> | ||
<h3>Kurās dienās tvīto visbiežāk</h3> | ||
<div style='margin:auto auto;width:500px;'> | ||
<?php | ||
$theDate = '2011-10-31'; | ||
$timeStamp = StrToTime($theDate); | ||
//izdrukā populārākās dienas | ||
for($zb=0;$zb<7;$zb++) { | ||
$ddd = date('D', $timeStamp); | ||
$timeStamp = StrToTime('+1 days', $timeStamp); | ||
$percent = round($dienas[$ddd][skaits]/$maxd*100); | ||
?> | ||
<script type="text/javascript"> | ||
$(function(){ | ||
$("#progressbar<?php echo $ddd;?>").progressbar({ | ||
value: <?php echo $percent;?> | ||
}); | ||
}); | ||
</script> | ||
<div style=" font: 50% 'Trebuchet MS', sans-serif;" id="progressbar<?php echo $ddd;?>"></div> | ||
<div class="sk"><?php | ||
switch ($ddd) { | ||
case 'Mon': | ||
echo "Pirmdien"; | ||
break; | ||
case 'Tue': | ||
echo "Otrdien"; | ||
break; | ||
case 'Wed': | ||
echo "Trešdien"; | ||
break; | ||
case 'Thu': | ||
echo "Ceturtdien"; | ||
break; | ||
case 'Fri': | ||
echo "Piektdien"; | ||
break; | ||
case 'Sat': | ||
echo "Sestdien"; | ||
break; | ||
case 'Sun': | ||
echo "Svētdien"; | ||
break; | ||
} | ||
?></div> | ||
</br> | ||
<?php | ||
} | ||
?> | ||
|
||
</div> |
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,39 @@ | ||
<?php | ||
//ja nav norādīts draugs, ej prom... | ||
if (!isset($_GET['dra'])) echo "<script type=\"text/javascript\">setTimeout(\"window.location = 'index.php'\",5);</script>"; | ||
$draugs = $_GET['dra']; | ||
?> | ||
<h1 style='margin:auto auto; text-align:center;'>Tavi Twitter draugi, kas tvītos pieminējuši ēšanu</h1> | ||
<h2 style='margin:auto auto; text-align:center;'><?php echo $draugs;?></h2> | ||
<?php | ||
|
||
$krasa=TRUE; | ||
echo "<table id='results' class='sortable' style='margin:auto auto;'>"; | ||
echo "<tr> | ||
<th>Tvīts</th> | ||
<th style='width:135px;'>Ēdieni / dzērieni</th> | ||
<th style='width:135px;'>Laiks</th> | ||
</tr>"; | ||
$q = mysql_query("SELECT id, text, created_at FROM tweets where screen_name='$draugs' order by created_at desc"); | ||
while($r=mysql_fetch_array($q)){ | ||
$tvid = $r["id"]; | ||
$q2 = mysql_query("SELECT distinct nominativs FROM words where tvits='$tvid' and nominativs!='0'"); | ||
if ($krasa==TRUE) {$kr=" style='background-color:#E0E0E0'";}else{$kr="";} | ||
$teksts=$r["text"]; | ||
$laiks=$r["created_at"]; | ||
$laiks=strtotime($laiks); | ||
$laiks=date("m.d.Y H:i", $laiks); | ||
echo "<tr".$kr."><td>".$teksts."</td><td>"; | ||
while($r2=mysql_fetch_array($q2)){echo $r2["nominativs"].", ";}; | ||
echo "</td><td>".$laiks."</td></tr>"; | ||
$krasa=!$krasa; | ||
} | ||
echo "</table>"; | ||
?> | ||
<div style="margin:auto auto; text-align:center;" id="pageNavPosition"></div> | ||
<script type="text/javascript"><!-- | ||
var pager = new Pager('results', 10); | ||
pager.init(); | ||
pager.showPageNav('pager', 'pageNavPosition'); | ||
pager.showPage(1); | ||
//--></script> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+110 Bytes
jq/css/south-street/images/ui-bg_highlight-hard_100_f5f3e5_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+124 Bytes
jq/css/south-street/images/ui-bg_highlight-hard_100_fafaf4_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 Bytes
jq/css/south-street/images/ui-bg_highlight-hard_15_459e00_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 Bytes
jq/css/south-street/images/ui-bg_highlight-hard_95_cccccc_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+124 Bytes
jq/css/south-street/images/ui-bg_highlight-soft_25_67b021_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+165 Bytes
jq/css/south-street/images/ui-bg_highlight-soft_95_ffedad_1x100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.