Skip to content

Instantly share code, notes, and snippets.

export default class MatrixTable {
convert(table) {
const array = this.createArray(table);
const conversion = this.transpose(array);
return this.createTable(conversion).outerHTML;
}
transpose(ary) {
@atsu666
atsu666 / Select.php
Last active April 21, 2017 04:43
php/ACMS/GET/Admin/User/Select.php
<?php
class ACMS_GET_Admin_User_Select extends ACMS_GET_Admin
{
var $_scope = array(
'uid' => 'global',
);
function get()
{
$Tpl = new Template($this->tpl, new ACMS_Corrector());
@atsu666
atsu666 / File.php
Created March 22, 2017 01:51
CSVインポートでCSVによってCSVと判定されない問題。(/php/ACMS/Http/File.php)
<?php
/**
* ACMS_Http_File
*
*
*/
class ACMS_Http_File extends ACMS_Http
{
protected $name;
<!-- BEGIN_MODULE Comment_Body -->
<!-- コメント表示 開始▼▼ -->
<!-- BEGIN position:veil -->
<!-- コメント件数 開始▼▼ -->
<p>全{amount}件中 {from}件〜{to}件を表示</p>
<!-- コメント件数 終了▲▲ -->
<!-- END position:veil -->
<!-- BEGIN relation:veil -->
@atsu666
atsu666 / _related.js
Last active September 2, 2016 08:57
/js/dispatch/edit/_related.js
@atsu666
atsu666 / 2GET.php
Created June 6, 2016 08:01
ACMS_POST_2GET
<?php
class ACMS_POST_2GET extends ACMS_POST
{
var $isCacheDelete = false;
function post()
{
$Post = new Field($this->Post);
$Cookie =& Field::singleton('cookie');
@atsu666
atsu666 / unit.html
Created May 13, 2016 06:45
a-blog cms: 公開期限付きユニット
<!-- /admin/entry/unit/exted.html -->
<!-- ここから -->
<!-- BEGIN custom_period -->
<table class="acms-admin-table-admin-edit">
<tr>
<th>公開日時</th>
<td>
<input type="text" name="custom_period_start_datetime{id}" value="{custom_period_start_datetime}" class="acms-admin-form-width-full"/>
<input type="hidden" name="unit{id}[]" value="custom_period_start_datetime{id}" />
</td>
@atsu666
atsu666 / Amazon.php
Last active February 19, 2016 06:47
a-blog cms で Amazon Product Advertising API
<?php
class ACMS_Services_Amazon extends ACMS_Services
{
private $accessKeyId = null;
private $secretAccessKey = null;
private $associateTag = null;
private $baseUrl = 'http://ecs.amazonaws.jp/onca/xml';
private $apiVersion = '2013-08-01';
@atsu666
atsu666 / ga_acms.html
Last active January 15, 2016 09:11
ga_acms
<script>
(function(w,d,s,g,js,fs){
g=w.gapi||(w.gapi={});g.analytics={q:[],ready:function(f){this.q.push(f);}};
js=d.createElement(s);fs=d.getElementsByTagName(s)[0];
js.src='https://apis.google.com/js/platform.js';
fs.parentNode.insertBefore(js,fs);js.onload=function(){g.load('analytics');};
}(window,document,'script'));
</script>
<script>
@atsu666
atsu666 / FBDebugger.php
Last active September 20, 2016 02:38
a-blog cms : facebook debugger
<?php
/**
* php/ACMS/User/POST/FBDebugger.php
*
* テンプレート上では、標準のPOSTモジュールと同様に、
* <input type="submit" name="ACMS_POST_FBDebugger" value="Clear FB Cache"> で呼び出されます。
*/
class ACMS_User_POST_FBDebugger extends ACMS_POST
{
protected $endpoint = "https://graph.facebook.com/?scrape=true&id=%s";