-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfungsiHeader.php
48 lines (41 loc) · 1.06 KB
/
fungsiHeader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
function headerHtml($title)
{ ?>
<div class="row">
<div class="col-lg-12"><br></br>
<h3 class="page-header"><i class="fa fa-file-text-o"></i><?php echo $title; ?></h3>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading"></header>
<div class="panel-body">
<?php
}
function getParam($name) {
if (isset($_POST[$name]) ) {
return $_POST[$name];
} elseif (isset($_GET[$name]) ) {
return $_GET[$name];
}
}
function setParam($name,$value) {
$_POST[$name] = $value;
}
function resultToArray($result) {
$res_array = array();
for($count=0;$row = mysql_fetch_array($result);$count++) {
$res_array[$count] = $row;
}
return $res_array;
}
function getData($sqlx){
$result = mysql_query($sqlx);
if(!$result) return false;
$num_rows = mysql_num_rows($result);
if($num_rows == 0) return false;
$result = resultToArray($result);
return $result;
}
?>