Skip to content

Instantly share code, notes, and snippets.

@atsu666
atsu666 / function.php
Created May 29, 2023 07:25
v2.11.57 用 エイリアスURL表示時のリンク生成の不具合修正(php7.1-php7.2)
<?php //004fb
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo("Site error: the ".(php_sapi_name()=='cli'?'ionCube':'<a href="http://www.ioncube.com">ionCube</a>')." PHP Loader needs to be installed. This is a widely used PHP extension for run
@atsu666
atsu666 / function.php
Created May 29, 2023 07:24
v2.11.57 用 エイリアスURL表示時のリンク生成の不具合修正(php5.6-php7.0)
<?php //004fb
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo("Site error: the ".(php_sapi_name()=='cli'?'ionCube':'<a href="http://www.ioncube.com">ionCube</a>')." PHP Loader needs to be installed. This is a widely used PHP extension for run
@atsu666
atsu666 / function.php
Created May 29, 2023 07:24
v2.11.57 用 エイリアスURL表示時のリンク生成の不具合修正(php5.3-php5.5)
<?php //0046a
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use th
@atsu666
atsu666 / Helper.php
Created November 28, 2022 04:55
php/Services/Common/Helper.php
public function download($path, $fileName, $extension = false, $remove = false)
{
$fileNameEncode = urlencode($fileName);
$size = filesize($path);
if ($extension) {
$inlineExtensions = configArray('media_inline_download_extension');
$mime = false;
$fp = fopen($path,"rb");
foreach ($inlineExtensions as $i => $value) {
@atsu666
atsu666 / Download.php
Created July 13, 2022 09:22
php/ACMS/POST/Log/Form/Download.php
<?php
class ACMS_POST_Log_Form_Download extends ACMS_POST
{
function post()
{
if ( !$this->authorityCheck() ) {
return fasle;
}
@atsu666
atsu666 / gist:f3d6f2ec8de9385c30694b21d7af607e
Created January 19, 2022 10:14
php/Services/StaticExport/Compiler/LinkResolver.php
<?php
namespace Acms\Services\StaticExport\Compiler;
use Acms\Services\StaticExport\Contracts\Resolver;
use ACMS_RAM;
use Media;
class LinkResolver extends Resolver
{
@atsu666
atsu666 / gist:119c1644588725573a7dc8ce06f73e79
Created January 19, 2022 10:13
php/Services/StaticExport/Engine.php
<?php
namespace Acms\Services\StaticExport;
use App;
use DB;
use SQL;
use ACMS_Filter;
use Acms\Services\Facades\Storage;
use Acms\Services\StaticExport\Generator\TopGenerator;
@atsu666
atsu666 / Session.php
Created August 25, 2021 02:28
php/ACMS/Session.php
<?php
class ACMS_Session
{
protected static $instance = array();
protected static $sessionStart = false;
protected $sess_name = 'acms_ssid';
protected $sess_storage = 'acms_storage';
@atsu666
atsu666 / LinkResolver.php
Created August 19, 2021 07:37
php/Services/StaticExport/Compiler/LinkResolver.php
<?php
namespace Acms\Services\StaticExport\Compiler;
use Acms\Services\StaticExport\Contracts\Resolver;
use ACMS_RAM;
class LinkResolver extends Resolver
{
/**
@atsu666
atsu666 / Import.php
Created June 22, 2021 10:24
php/Services/Blog/Import.php
<?php
namespace Acms\Services\Blog;
use SQL;
use DB;
use Acms\Services\Facades\Common;
use Symfony\Component\Yaml\Yaml;
class Import