Skip to content

Instantly share code, notes, and snippets.

View virbo's full-sized avatar
💭
I may be slow to respond.

Yusuf Ayuba virbo

💭
I may be slow to respond.
View GitHub Profile
@virbo
virbo / part__maps_view.php
Created April 19, 2016 14:12
Tambahan coding di file view maps_view.php
<script type="text/javascript" src="<?php echo base_url('assets/js/jquery.min.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/bootstrap.min.js');?>"></script>
<script type="text/javascript">
var top_url = '<?php echo base_url();?>';
function showModal(id) {
var temp_url = top_url+'welcome/modal/'+id
$('#mod_title').html('Daftar Alumni');
$('#isi').html('<center><i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Loading data, please wait...</center>');
$('#isi').load(temp_url);
$('#myModal').modal();
@virbo
virbo / new__Welcome.php
Created April 19, 2016 14:13
File baru controller Welcome.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* @author Yusuf Ayuba
* @since 2016
*/
@virbo
virbo / Alumni_model.php
Last active April 20, 2016 06:12
Modifikasi file Welcome.php, Alumni_model.php dan maps_view.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Alumni_model extends CI_Model
{
/**
* @author Yusuf Ayuba
* @since 2016
*/
public function __construct()
<?php
namespace app\models;
use Yii;
use yii\base\Model;
use Esyst\Nusoap\NusoapClient;
/**
* Soap Module
const WSDL_USER = 'username feeder';
const WSDL_PASS = 'password feeder';
public function actionList()
{
$wsdl = new Soapmodel();
$token = $wsdl->token(self::WSDL_USER,self::WSDL_PASS);
return $this->render('listtable',[
'temp' => $wsdl->listtable($token),
]);
<?php
use yii\helpers\Url;
$this->title = $temp['error_desc']!==''?'Error '.$temp['error_code'].': '.$temp['error_desc']:'List Table';
$this->params['breadcrumbs'][] = 'List Table';
?>
<div class="page-header" style="margin-top: 0px;" >
<div class="row">
<div class="col-md-12">
<h4>List Tabel</h4>
public function actionStruktur($table)
{
$tables = $table==''?'mahasiswa':$table;
$wsdl = new Soapmodel();
$token = $wsdl->token(self::WSDL_USER,self::WSDL_PASS);
return $this->render('struktur',[
'temp' => $wsdl->dictionary($token,$tables),
'table' => $tables
]);
}
<?php
$this->title = $temp['error_desc']!==''?'Error '.$temp['error_code'].': '.$temp['error_desc']:'List Table';
$this->params['breadcrumbs'][] = ['label' => 'List Table', 'url' => ['list']];
$this->params['breadcrumbs'][] = 'Struktur Table';
?>
<div class="page-header" style="margin-top: 0px;" >
<div class="row">
<div class="col-md-12">
<h4>Struktur Table {{<?php echo $table;?>}}</h4>
</div>
public function actionView($table)
{
$tables = $table==''?'mahasiswa':$table;
$filter = '';
$order = '';
$limit = 10;
$offset = 0;
$wsdl = new Soapmodel();
$token = $wsdl->token(self::WSDL_USER,self::WSDL_PASS);
return $this->render('view',[
<?php
$this->title = $temp['error_desc']!==''?'Error '.$temp['error_code'].': '.$temp['error_desc']:'List Table';
$this->params['breadcrumbs'][] = ['label' => 'List Table', 'url' => ['list']];
$this->params['breadcrumbs'][] = 'View Table';
?>
<div class="page-header" style="margin-top: 0px;" >
<div class="row">
<div class="col-md-12">
<h4>View Table {{<?php echo $table;?>}}. Jumlah data: <?php echo $total['result']; ?></h4>
</div>