Example #1
0
function S($st)
{
    return dbf(SELECT($st));
}
Example #2
0
			
			<?php 
$sql = <<<ASDF
\t\t\t\t\t\t\t\t\tSELECT concat("<a href=medlemmer_vis_admin_info.php?id=", m.id, ">", m.username, "</a>") as Navn
\t\t\t\t\t\t\t\t\t\t\t,CASE
\t\t\t\t\t\t\t\t\t\t\t\tWHEN intro1 = 1 THEN "X"
\t\t\t\t\t\t\t\t\t\t\t\tWHEN intro1 = 0 THEN ""
\t\t\t\t\t\t\t\t\t\t\tEND as intro1
\t\t\t\t\t\t\t\t\t\t\t,CASE
\t\t\t\t\t\t\t\t\t\t\t\tWHEN intro2 = 1 THEN "X"
\t\t\t\t\t\t\t\t\t\t\t\tWHEN intro2 = 0 THEN ""
\t\t\t\t\t\t\t\t\t\t\tEND as intro2
\t\t\t\t\t\t\t\t\t\t\t,CASE
\t\t\t\t\t\t\t\t\t\t\t\tWHEN blanketer = 1 THEN "X"
\t\t\t\t\t\t\t\t\t\t\t\tWHEN blanketer = 0 THEN ""
\t\t\t\t\t\t\t\t\t\t\tEND as blanketer
\t\t\t\t\t\t\t\t\tFROM medlemmer as m 
\t\t\t\t\t\t\t\t\tWHERE m.intro1 = 0
\t\t\t\t\t\t\t\t\t\tOR m.intro2 = 0
\t\t\t\t\t\t\t\t\t\tOR m.blanketer = 0
\t\t\t\t\t\t\t\t\tORDER BY m.username
ASDF;
echo dbf()->sql_to_table($sql);
?>
			
			
		</div>
		
	</body>
</html>
Example #3
0
		<div class="container">
		
			<?php 
echo get_body_header("forside");
?>

			<h1>Medlemmer</h1>
			
			<?php 
out_template("admin_topmenu");
?>
			
			<br>
			<br>
			
			<?php 
$sql = <<<ASDF
\t\t\t\t\t\t\t\tSELECT concat("<a href=medlemmer_vis_oversigt.php?id=", m.id, ">", m.username, "</a>") as Navn
\t\t\t\t\t\t\t\tFROM medlemmer as m
\t\t\t\t\t\t\t\tORDER BY m.username
ASDF;
echo dbf()->implode_query($sql, "<br>\n", "", false);
?>

			
			
		</div>
		
	</body>
</html>
Example #4
0
<html>
	<?php 
echo get_html_head();
?>
	<body>
	
		<div class="container">
		
			<?php 
echo get_body_header("digte");
?>

			<h1>Fremmødte</h1>
			<h2>I dag</h2>
			
			<?php 
echo dbf()->implode_query("SELECT m.username FROM medlemmer as m, fremmoede as f WHERE m.id = f.mid AND dag >= CURRENT_DATE", ", ");
?>

			
			
			<h2>Denne og forrige uge</h2>

			<img src="fremmoedte_graph.php?week=last"> 
			<img src="fremmoedte_graph.php?week=this"> 
			
		</div>
		
	</body>
</html>
Example #5
0
			<br>			

			<br>
			
			<?php 
$sql = <<<ASDF
\t\t\t\t\t\t\t\tSELECT\tCASE kommune
\t\t\t\t\t\t\t\t\t\t\tWHEN '' THEN 'Ukendt'
\t\t\t\t\t\t\t\t\t\t\tELSE kommune
\t\t\t\t\t\t\t\t\t\tEND
\t\t\t\t\t\t\t\t\t\t, count(*)
\t\t\t\t\t\t\t\tFROM medlemmer as m
\t\t\t\t\t\t\t\tGROUP BY 1
\t\t\t\t\t\t\t\tORDER BY 1
ASDF;
echo dbf()->implode_query($sql);
?>
			
			<?php 
$sql = <<<ASDF
\t\t\t\t\t\t\t\tSELECT CASE kommune
\t\t\t\t\t\t\t\t\t\t\tWHEN '' THEN 'Ukendt'
\t\t\t\t\t\t\t\t\t\t\tELSE kommune
\t\t\t\t\t\t\t\t\t\tEND
\t\t\t\t\t\t\t\t\t\t, username
\t\t\t\t\t\t\t\tFROM medlemmer as m
\t\t\t\t\t\t\t\tORDER BY 1
ASDF;
$query = query($sql);
$kommune = null;
while ($row = $query->tryGet()) {