Skip to content

Instantly share code, notes, and snippets.

Index: whmcs/modules/servers/namecheapssl/namecheapssl.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- whmcs/modules/servers/namecheapssl/namecheapssl.php (revision )
+++ whmcs/modules/servers/namecheapssl/namecheapssl.php (revision )
@@ -2746,7 +2746,8 @@
if (!empty($_SESSION['adminid'])) {
Index: modules/addons/namecheap_ssl/namecheap_ssl.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/addons/namecheap_ssl/namecheap_ssl.php (revision )
+++ modules/addons/namecheap_ssl/namecheap_ssl.php (revision )
@@ -266,7 +266,8 @@
// query for count
$sql = "SELECT COUNT(log.id) FROM mod_namecheapssl_log log LEFT JOIN tblclients AS c ON (log.userid=c.id AND user='client') $sqlWhere" ;
@kochen
kochen / 0_reuse_code.js
Created August 13, 2014 12:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kochen
kochen / DOCman 2.0 Stable - category listbox.php
Last active May 10, 2020 01:14
DOCman 2.0 Stable - category listbox
<?
echo KObjectManager::getInstance()->getObject('com:koowa.view.page.html', array(
'layout' => 'com://site/docman.myview.category',
));
@kochen
kochen / DOCman 2.0 Stable - add new document.php
Last active November 2, 2015 19:34
DOCman 2.0 Stable - add new document
<?
$catid = 2; // the number of the specific category to assign the document to.
$fileinfo = array( /* an array of file info, including BASENAME and FILENAME */ );
$datetime = date("Y-m-d H:i:s"); // current datetime
$user = KObjectMAnager::getInstance()->getObject('user'); // the Joomla user object
$controller = KObjectMAnager::getInstance()->getObject('com://admin/docman.controller.document');
$controller->add(array(
docman_category_id => $catid,
storage_path => $fileinfo['filename'],
@kochen
kochen / DOCman 2.0 Stable - get list of documents.php
Last active November 2, 2015 19:34
DOCman 2.0 Stable - get list of documents
<?
$catid = 2; //could also be an array(1,2,3,4)
/**
* returns a KModelEntityRowset, where each item is a KModelEntityRow.
* in the case of documents it returns a special document entity (the Rowset is filtered by the requested category.
*
* the document entity has (among other things):
* - $document->title (text)
* - $document->category (category entity object)

Keybase proof

I hereby claim:

  • I am kochen on github.
  • I am mtk (https://keybase.io/mtk) on keybase.
  • I have a public key whose fingerprint is BD38 87DE 48EC 2190 474F 3217 1B52 5E16 5838 1652

To claim this, I am signing this object: