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
<?php
use yii\db\Schema;
class m160804_160101_history extends \yii\db\Migration
{
public function up()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
@virbo
virbo / pdf-thumbnail-php.md
Created July 28, 2016 12:38 — forked from umidjons/pdf-thumbnail-php.md
Creating PDF thumbnails in PHP

Creating PDF thumbnails in PHP

Install Ghostscript

Download and install right version of ghostscript. In my case my PHP was x86 architecture, so I download Ghostscript 9.14 for Windows (32 bit).

Enable ImageMagick

<?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
use app\models\Soapmodel;
/**
* Site Controller
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteRule . index.php
<?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>
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'][] = '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 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
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>
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),
]);