예제 #1
0
input.span2{
	min-width:300px;
}
</style>
<a href='<?php 
echo my_url();
?>
'>Index</a>|
<a href='<?php 
echo my_url();
?>
form/005bootstrap'>List Tutorial Bootstrap</a>
<hr/>
<div style='width:800px;margin:auto'>
<?php 
$id = auto_id('nasgor_tutorial', 1);
?>
<table cellpadding="0" cellspacing="0" border="0" class="display" id='dataTutorial'>
	<thead>
		<tr>
			<th>TUTOR</th>
			<th>Nama</th>
			<th>Posisi</th>
			<th>LINK</th>
		</tr>
	</thead>
	<tbody class='bodyTable'>
	<tr>
	<td> -</td><td> -</td><td> -</td><td> -</td>
	</tr>
	</tbody>
예제 #2
0
    $det = json_decode($row['k_detail'], true);
    $det['buy'] = $value;
    $json = json_encode($det);
    $sql = "UPDATE   `kurs` SET  `k_detail` =  '{$json}' WHERE   `k_id` ={$id};";
    $data = array('log_id' => auto_id(), 'log_detail' => json_encode($aData));
    $sql2 = dbInsert("kurs_log", $data);
}
if ($field == 'sale') {
    $sql = "select k_date date, k_detail from kurs where k_id={$id}";
    $q = query($sql);
    unset($sql);
    $row = $q->fetch_assoc();
    $det = json_decode($row['k_detail'], true);
    $det['sale'] = $value;
    $json = json_encode($det);
    $data = array('log_id' => auto_id(), 'log_detail' => json_encode($aData));
    $sql2 = dbInsert("kurs_log", $data);
}
if (isset($sql)) {
    $q = query($sql);
    echo $sql;
}
$txt = ob_get_contents();
ob_end_clean();
$a = array('txt' => $txt);
$sql = "select k_date date, k_detail from kurs where k_id={$id}";
$q = query($sql);
$row = $q->fetch_assoc();
$a['date'] = $row['date'];
$det = json_decode($row['k_detail'], true);
$a = array_merge($a, $det);