Skip to content

Instantly share code, notes, and snippets.

@nao-pon
nao-pon / resource.db.php
Created June 26, 2012 01:15
hoge_fuga というテーマのテーマ下テンプレートがない場合、hoge_default のテーマ下テンプレを探す(有効スイッチ&優先順の指定可) resource.db.php
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: resource.db.php
* Type: resource
* Name: db
* Purpose: Fetches templates from a database
* Version: for XOOPS Cube Legacy 2.2
* Based on Hodajuku Distribution 1.04 resource.db.php
Index: html/modules/multiMenu/class/getMultiMenu.class.php
===================================================================
--- html/modules/multiMenu/class/getMultiMenu.class.php (revision 570)
+++ html/modules/multiMenu/class/getMultiMenu.class.php (working copy)
@@ -7,19 +7,34 @@
*/
class getMultiMenu {
var $block = array();
+
+ private $db;
<?php
/*
* 2011/09/09 16:45
* MultiMenu class function
* copyright(c) Yoshi Sakai at Bluemoon inc 2011
* GPL ver3.0 All right reserved.
*/
class getMultiMenu {
var $block = array();
<?php
if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
class phpQueryStringVulnerabilityHoneypot extends XCube_ActionFilter
{
function preBlockFilter() {
if (isset($_GET['-s'])) {
header('Content-type: text/plain');
exit('<?php
@nao-pon
nao-pon / gist:2650517
Created May 10, 2012 02:16
XOOPS protector ip ban
<?php
include './mainfile.php';
echo('XOOPS\'s Product Security team is seeking a passionate hacker. ');
$protectorTTL = 0;
if (XC_CLASS_EXISTS('Protector')) {
$protector =& Protector::getInstance();
$conf = $protector->getConf() ;
$can_ban = true;
if (is_object($xoopsUser)) {
$uid = $xoopsUser->getVar('uid') ;
diff -r -u xpressme_integration_kit/admin/index.php php7_patch/admin/index.php
--- xpressme_integration_kit/admin/index.php 2014-09-26 16:17:37.008000000 +0900
+++ php7_patch/admin/index.php 2015-05-07 11:04:59.910887800 +0900
@@ -164,6 +164,7 @@
global $xoopsModule;
include(dirname(__FILE__) . '/../wp-includes/version.php');
require_once dirname(dirname( __FILE__ )).'/include/memory_limit.php' ;
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
if ($is_report) {
@nao-pon
nao-pon / showlocale.php
Created March 11, 2015 00:24
Show server side locales
<?php
exec('locale -a', $out, $ret);
header('Content-type: text/plain');
if ($ret === 0) {
echo join("\n", $out);
} else {
echo 'Error: locale -a';
}
@nao-pon
nao-pon / gist:afabcc2f7b87450c578b
Created March 11, 2015 00:22
Show server side locales
<?php
exec('locale -a', $out, $ret);
header('Content-type: text/plain');
if ($ret === 0) {
echo join("\n", $out);
} else {
echo 'Error: locale -a';
}