This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 字串中網址自動加上超連結 | |
* via http://blog.kidwm.net/68 | |
*/ | |
function addLink($str) { | |
$str = preg_replace('#(http|https|ftp|telnet)://([0-9a-z\.\-]+)(:?[0-9]*)([0-9a-z\_\/\?\&\=\%\.\;\#\-\~\+]*)#i','<a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JoomlArt | |
http://www.joomlart.com/joomla/templates/showcase | |
YOOTheme | |
http://www.yootheme.com/themes | |
Rockettheme | |
http://www.rockettheme.com/joomla-templates | |
Joomlabamboo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Administrator | |
* @subpackage com_flower | |
* | |
* @copyright Copyright (C) 2012 Asikart. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* @author Generated by AKHelper - http://asikart.com | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 判斷按下的按鈕是哪一個 | |
* @param (event) e keypress event. | |
* @param (mix) targetKeyChar 按鍵的編號或名稱,如果是這個按鍵,就執行 callback | |
* @param (function) callBack 送入callback的function,不用加()括號 | |
* | |
*/ | |
var detectKeyPress = function(e, targetKeyChar, callBack){ | |
var keynum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function read($file) | |
{ | |
shell_exec("/usr/bin/pdftotext {$file} {$filetmp}.txt") ; | |
$output = file_get_contents("{$filetmp}.txt"); | |
return $output ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getSchools() | |
{ | |
// Get City id for query School. | |
$id = $this->getState('city.id'); | |
// Get Admin Model | |
JModelLegacy::addIncludePath( JPATH_COMPONENT_ADMINISTRATOR . '/models' ); | |
$model = JModel::getInstance('Schools', 'TourModel', array('ignore_request' => true)) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once AKPATH_HTML.'/grid.php' ; | |
// Create a new Grid | |
$grid = new AKGrid( array('class' => 'adminlist', 'id' => 'table_id') ); | |
// Set Columns | |
$grid->setColumns( array('week_start', 'price', 'discount', 'delete') ) ; | |
// Add First TR Row as thead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put in viewapi.class.php line 59 | |
if( !is_callable( array($model, $method) ) ) { | |
ApiError::raiseError(500, "Method: {$class}::{$method} is not exists."); | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function raise($level, $code, $msg, $info = null, $backtrace = false) | |
{ | |
if( !empty(self::$levels[$level]) ){ | |
$level = self::$levels[$level] ; | |
}else{ | |
$level = self::$levels[E_NOTICE] ; | |
} | |
return call_user_func_array( array('ApiError', 'raise'.$level), array($level, $code, $msg, $info) ) ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class XXXHelperArray | |
{ | |
/** | |
* Set a value into array or object. | |
* | |
* @param mixed $array An array to set value. | |
* @param string $key Array key to store this value. |
OlderNewer