Example #1
0
 function execute(&$form, $action_id)
 {
     $config = $form->actions_config[$action_id];
     $config = new \GCore\Libs\Parameter($config);
     $ccname = $config->get('ccname', '');
     $action = $config->get('action', '');
     echo \GCore\Libs\App::call(GCORE_SITE, 'chronoconnectivity', 'lists', $action, array('ccname' => $ccname));
 }
Example #2
0
<?php

/* @copyright:ChronoEngine.com @license:GPLv2 */
defined('_JEXEC') or die('Restricted access');
defined("GCORE_SITE") or die;
if (!empty($connection['Connection']['extras'][$area]['actions'][$act_name]['form_event'])) {
    $form_data = explode(':', trim($connection['Connection']['extras'][$area]['actions'][$act_name]['form_event']));
    $form_name = $form_data[0];
    $form_event = \GCore\Libs\Request::data('event', $form_data[1]);
    ob_start();
    echo \GCore\Libs\App::call('front', 'chronoforms', '', '', array('chronoform' => $form_name, 'event' => $form_event));
    $output = ob_get_clean();
    /*
    $pattern = '/<form([^>]*?)([^>]*?)>/is';
    preg_match_all($pattern, $output, $matches);
    if(!empty($matches[0][0])){
    	$form_tag = $matches[0][0];
    	$form_tag = preg_replace('/ action=("|\')(.*?)("|\')/i', ' action="'.r_('index.php?ext=chronoconnectivity&cont=lists&ccname='.$connection['Connection']['title']).'"', $form_tag);
    	$form_tag = preg_replace('/ name=("|\')(.*?)("|\')/i', ' name="admin_form"', $form_tag);
    	$form_tag = preg_replace('/ id=("|\')(.*?)("|\')/i', ' id="admin_form"', $form_tag);
    }
    $output = str_replace($matches[0][0], $form_tag, $output);
    */
    echo $output;
} else {
    $code = $connection['Connection']['extras'][$area]['actions'][$act_name]['code'];
    ob_start();
    eval('?>' . $code);
    $code = ob_get_clean();
    $code = $this->Lister->prepare($connection, $code);
    $code = $this->Lister->translate($connection, $code);
Example #3
0
 function _permissions_setup($title, $path)
 {
     $id = \GCore\Admin\Models\Acl::getInstance()->field('id', array('aco' => $path, 'enabled' => 1));
     if (!empty($id)) {
         $acl = \GCore\Admin\Models\Acl::getInstance()->load($id);
         echo \GCore\Libs\App::call('admin', '', 'acls', 'edit', array('path' => $acl));
     } else {
         echo \GCore\Libs\App::call('admin', '', 'acls', 'edit', array('path' => array('Acl' => array('aco' => $path, 'title' => $title, 'enabled' => 1))));
     }
 }
Example #4
0
 public static function getApp($site = GCORE_SITE, $thread = 'gcore')
 {
     if (\GCore\C::get('GSITE_PLATFORM') == 'joomla') {
         $app = \GCore\Libs\AppJ::getInstance($site, $thread);
     } else {
         if (\GCore\C::get('GSITE_PLATFORM') == 'wordpress') {
             $app = \GCore\Libs\AppWp::getInstance($site, $thread);
         } else {
             if (\GCore\C::get('GSITE_PLATFORM') == '') {
                 $app = \GCore\Libs\App::getInstance($site, $thread);
             }
         }
     }
     return $app;
 }