Location: PHPKode > projects > injooosm > administrator/components/com_injooosm/helpers/helper.php
<?php
/**
 * Joomla! 1.5 component injooosm
 *
 * @version $Id: helper.php 2009-11-22 14:03:00$
 * @author Christian Knorr
 * @package injooosm
 * @subpackage backend
 * @license GNU/GPL
 * @filesource
 *
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * injooosm Helper
 *
 */
class injooosmHelper {
    /**
     *
     * @global object $mainframe
     * @return object
     */
    function getConfig()  {
        global $mainframe;

        $db =& JFactory::getDBO();

        $query = "SELECT * FROM #__osm_config WHERE id='1'";

        $db->setQuery($query);
        $result = $db->loadObject();

        if ($db->getErrorNum()) {
            echo $db->stderr();
            return false;
        }

        return $result;
    }
    
}

function checkCaptcha()  {
    global $mainframe;

    $db = JFactory::getDBO();

    $query ="SELECT id FROM #__plugins WHERE element='captcha'";
    $db->setQuery($query);
    $result = $db->loadResult();

    return $result;
}
Return current item: injooosm