/
downline.php
61 lines (46 loc) · 1.75 KB
/
downline.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
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
$user = unserialize($_SESSION['login_user']);
?>
<!-- orgchart -->
<ul id="chart" style='display:none'>
<li>
<!-- Referral -->
<?php if($user->hasReferral()) : ?>
<adjunct><?= $user->getReferral()->profile('nama') ?></adjunct>
<?php endif;?>
<em><?= $user->profile('nama') ?></em>
<!-- Downline -->
<?php
if($user->hasDownline()){
$user->drawChartDownline($user->getDownline());
}
?>
</li>
</ul>
<!-- end orgchart -->
<style type="text/css">
.orgChart{
overflow: scroll;
}
</style>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">Downline</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="" data-original-title="Collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="" data-original-title="Remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body" id='main'>
</div><!-- /.box-body -->
<div class="box-footer" style="display: block;">
Footer
</div><!-- /.box-footer-->
</div>
<link rel="stylesheet" href="<?= base_url() ?>theme/plugins/jquery-orgchart/jquery.orgchart.css"/>
<script src="<?= base_url() ?>theme/plugins/jquery-orgchart/jquery.orgchart.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var org = $("#chart").orgChart({container: $("#main")});
});
</script>