first commit
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
ini_set('display_errors',FALSE);
|
||||
?>
|
||||
|
||||
<link href="keuangan/doc/stylesheets/cell.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<link href="keuangan/css/thickbox.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="keuangan/doc/javascripts/jquery.js"></script>
|
||||
<script language="javascript" src="keuangan/javascript/thickbox.js"></script>
|
||||
<script language="javascript" src="keuangan/javascript/jquery.form.js"></script>
|
||||
|
||||
|
||||
|
||||
<SCRIPT language=JavaScript type=text/javascript>
|
||||
function actionPic(modus,id,name) {
|
||||
if (modus=='delete'){
|
||||
$(document).ready(function(){
|
||||
if ( confirm ('Yakin hapus '+name+' ?')==true){
|
||||
$.post('keuangan/setup/delete_kas.php',{id: id},function(response){
|
||||
var x=response.trim(' ');
|
||||
if(x == 'ok'){
|
||||
$('tr#node-'+id).hide();
|
||||
//alert('Delete sukses');
|
||||
}
|
||||
//else alert('Delete gagal');
|
||||
dataType: 'json' });
|
||||
}
|
||||
else {
|
||||
alert("batal");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="keuangan/doc/javascripts/jquery.ui.js"></script>
|
||||
|
||||
|
||||
<!-- BEGIN Plugin Code -->
|
||||
|
||||
<link href="keuangan/src/stylesheets/jquery.treeTable.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="keuangan/src/javascripts/jquery.treeTable.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".example").treeTable({
|
||||
initialState: "expanded"
|
||||
});
|
||||
|
||||
// Drag & Drop Example Code
|
||||
$("#dnd-example .file, #dnd-example .folder").draggable({
|
||||
helper: "clone",
|
||||
opacity: .75,
|
||||
refreshPositions: true,
|
||||
revert: "invalid",
|
||||
revertDuration: 300,
|
||||
scroll: true
|
||||
});
|
||||
|
||||
$("#dnd-example .folder").each(function() {
|
||||
$($(this).parents("tr")[0]).droppable({
|
||||
accept: ".file, .folder",
|
||||
drop: function(e, ui) {
|
||||
$($(ui.draggable).parents("tr")[0]).appendBranchTo(this);
|
||||
|
||||
// Issue a POST call to send the new location (this) of the
|
||||
// node (ui.draggable) to the server.
|
||||
$.post("move.php", {id: $(ui.draggable).parents("tr")[0].id, to: this.id});
|
||||
},
|
||||
hoverClass: "accept",
|
||||
over: function(e, ui) {
|
||||
if(this.id != $(ui.draggable.parents("tr.parent")[0]).id && !$(this).is(".expanded")) {
|
||||
$(this).expand();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Make visible that a row is clicked
|
||||
$("table#dnd-example tbody tr").mousedown(function() {
|
||||
$("tr.selected").removeClass("selected"); // Deselect currently selected rows
|
||||
$(this).addClass("selected");
|
||||
});
|
||||
|
||||
// Make sure row is selected when span is clicked
|
||||
$("table#dnd-example tbody tr span").mousedown(function() {
|
||||
$($(this).parents("tr")[0]).trigger("mousedown");
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php
|
||||
|
||||
require_once("core/main.php");
|
||||
if (isset($_SESSION['KDUNIT']))
|
||||
{
|
||||
require_once("lak.php");
|
||||
$objSetupLAK = new lak();
|
||||
$objSetupLAK->db_host=$hostname;
|
||||
$objSetupLAK->db_user=$username;
|
||||
$objSetupLAK->db_pass=$password;
|
||||
$objSetupLAK->db_database=$database;
|
||||
|
||||
if(!$objSetupLAK->db_connect()) {
|
||||
echo "<h1>Sorry! Could not connect to the database server.</h1>";
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="example" id="dnd-example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nama Akun</th>
|
||||
<th>Id</th>
|
||||
<th>Parent Id</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$allFields=$objSetupLAK->getAllFields();
|
||||
foreach($allFields as $item) {
|
||||
?>
|
||||
<tr id="node-<?php echo str_replace(".","_",$item['Id']) ?>"<?php if(isset($item['parentId'])) echo str_replace(".","_"," class=\"child-of-node-{$item['parentId']}\"") ?>>
|
||||
<td><span class="<?php echo ($item['slave'] == '0' ) ? "folder" : "file"
|
||||
?>"><?php echo $item['name']?></span></td>
|
||||
<td><?php echo $item['Id'] ?></td>
|
||||
|
||||
<td class="akun"><?php echo $item['parentId'] ?></td>
|
||||
<td class="{CELLCLASS_M}" valign="middle">
|
||||
<!-- <a class='thickbox' href="home.php?<?php //echo paramEncrypt('page=./setup/form_perkiraan&modus=modify&id='.$item['Id'])?>"><img src="./images/edit.gif" alt="Edit" title="Edit" width="18" height="18" border="0" style="cursor:pointer" /></a>
|
||||
-->
|
||||
<?php if($item['slave'] == 0): ?> <a class='thickbox' href="keuangan/setup/form_aruskas.php?&modus=insert&nogrupakun=<?php echo $item['Id']?> ">
|
||||
<img src="./images/Add.gif" alt="Add" title="Add" width="18" height="18" border="0" style="cursor:pointer" /></a> <?php endif;?>
|
||||
<a class='thickbox' href="keuangan/setup/form_aruskas.php?&modus=modify&id=<?php echo $item['Id']?>"><img src="./images/edit.gif" alt="Edit" title="Edit" width="18" height="18" border="0" style="cursor:pointer" /></a>
|
||||
<img src="./images/delete.gif" alt="Delete" title="Delete" width="18" height="18" border="0" onClick="actionPic('delete',<?php echo "'".$item['Id']."'" ?>,<?php echo "'".$item['name']."'" ?>);" style="cursor:pointer"> </td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
}else{
|
||||
?><script language="javascript">document.location.href="index.php?<?php echo paramEncrypt('status=forbidden')?>"</script><?php
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user