function plugin_delete_officepack()
{
    $object = new plugins();
    $object->del_cd_entry("officepack");
    $object->del_menu("officepack", "14000", "Office Key Management", "plugins");
    $object->sql_query("DROP TABLE IF EXISTS `officepack_sku` , `officepack_lang` , `officepack_type` , `officepack_version` , `officepack`;");
}
Example #2
0
 function __construct()
 {
     parent::__construct();
     $this->registry = registry::getInstance();
     $this->addAction('index_init', 'init');
     $this->addAction('index_load', 'addToolbar');
 }
Example #3
0
    public function index()
    {
        $this->template->content = new View('generic/grid');

        // Setup the base grid object
        $grid = jgrid::grid($this->baseModel, array(
                'caption' => 'Network Lists'
            )
        );

        // Add the base model columns to the grid
        $grid->add('net_list_id', 'ID', array(
                'hidden' => true,
                'key' => true
            )
        );
        $grid->add('name', 'Name');

        // Add the actions to the grid
        $grid->addAction('netlistmanager/edit', 'Edit', array(
                'arguments' => 'net_list_id'
            )
        );
        $grid->addAction('netlistmanager/delete', 'Delete', array(
                'arguments' => 'net_list_id'
            )
        );
        
        // Let plugins populate the grid as well
        $this->grid = $grid;
        plugins::views($this);

        // Produce a grid in the view
        $this->view->grid = $this->grid->produce();
    }
Example #4
0
 static function news_feed()
 {
     $p = plugins::getinst();
     header("Content-type: text/xml");
     echo "<?xml version=\"1.0\"?>";
     echo "<rss version=\"2.0\">";
     echo "<channel>";
     echo "<title>News di OpenGdr </title>";
     echo "<link>http://mtgforum.altervista.org/</link>";
     echo "<description>News di opengdr</description>";
     echo "<copyright>Copyright 2009 Bacis Marco </copyright>\n";
     echo "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";
     echo "<managingEditor>" . config::email . "</managingEditor>\n";
     echo "<webMaster>" . config::email . "</webMaster>\n";
     echo "<language>IT-it</language>\n";
     $newss = $p->d->getresults('SELECT * FROM news ORDER BY id DESC;');
     foreach ($newss as $news) {
         $data = explode(' ', $news->date);
         $data = $data[0];
         $text = stripslashes(htmlentities(substr($news->text, 0, 50)));
         $text = str_replace('&lt;', '', $text);
         $text = str_replace('&gt;', '', $text);
         echo "<item>\r\n\t\t<title>Aggiornamento del " . $data . "</title>\r\n\t\t<pubDate>" . $news->date . "</pubDate>\r\n\t\t<link>http://mtgforum.altervista.org/</link>\r\n\t\t<description>" . $text . "...</description>\r\n\t\t</item>\n";
     }
     echo "</channel></rss>";
 }
Example #5
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Users'));
     // Add the base model columns to the grid
     $grid->add('user_id', 'ID', array('hidden' => TRUE, 'key' => TRUE));
     $grid->add('email_address', 'Email Address');
     $grid->add('first_name', 'First Name', array('width' => '100', 'search' => TRUE));
     $grid->add('last_name', 'Last Name', array('width' => '100', 'search' => TRUE));
     $grid->add('Location/name', 'Location', array('width' => '100', 'search' => TRUE, 'sortable' => TRUE));
     $grid->add('user_type', 'User Type', array('callback' => array('function' => array($this, 'userType'), 'arguments' => array('user_type'))));
     $grid->add('logins', 'Logins', array('hidden' => TRUE));
     $grid->add('last_login', 'Last Login', array('hidden' => TRUE));
     $grid->add('last_logged_ip', 'Last Logged IP', array('hidden' => TRUE));
     $grid->add('debug_level', 'Debug Level', array('hidden' => TRUE));
     // Add the actions to the grid
     $grid->addAction('usermanager/edit', 'Edit', array('arguments' => 'user_id'));
     $grid->addAction('usermanager/delete', 'Delete', array('arguments' => 'user_id'));
     if (users::getAttr('user_type') == User::TYPE_SYSTEM_ADMIN) {
         $grid->addAction('usermanager/login', 'Login', array('arguments' => 'user_id'));
     }
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
Example #6
0
 /**
  * Вывод списка online-пользователей
  * @return null
  */
 public function show_online()
 {
     $i = (int) config::o()->v('online_interval');
     if (!$i) {
         $i = 15;
     }
     $time = time() - $i;
     $res = db::o()->p($time)->query('SELECT userdata FROM sessions
             WHERE time > ? GROUP BY IF(uid>0,uid,ip)');
     $res = db::o()->fetch2array($res);
     tpl::o()->assign("res", $res);
     $c = count($res);
     $mo = stats::o()->read("max_online");
     if (!intval($mo) || $mo < $c) {
         $mo = $c;
         stats::o()->write("max_online", $c);
         stats::o()->write("max_online_time", time());
     }
     $mot = stats::o()->read("max_online_time");
     tpl::o()->assign("record_total", $mo);
     tpl::o()->assign("record_time", $mot);
     /* @var $user user */
     $user = plugins::o()->get_module("user");
     lang::o()->get("profile");
     tpl::o()->register_modifier("gau", array($user, "get_age"));
     tpl::o()->assign("bdl", $this->bd_list());
     tpl::o()->display("blocks/contents/online.tpl");
 }
Example #7
0
 static function mod_pg($pg)
 {
     $p = plugins::getinst();
     $user = $p->d->getrow('SELECT * FROM users WHERE name="' . $pg . '";');
     if ($user->account_id == $_SESSION['datiaccount']['id']) {
         $t = new template('template/mod_pg.tpl');
         $t->assign_var('PG_NAME', $pg);
         if ($_POST) {
             $query = 'UPDATE users SET description="' . $_POST['desc'] . '",image="' . $_POST['image'] . '" WHERE name="' . $pg . '";';
             $upd = $p->d->query($query);
             if (!$upd) {
                 $t->start_block('mod_failed');
                 $t->end_block('mod_failed');
             } else {
                 $t->start_block('mod_success');
                 $t->end_block('mod_success');
             }
         } else {
             $t->start_block('mod_failed');
             $t->end_block('mod_failed');
         }
         $p->action('mod_pg');
         $t->out();
     }
 }
Example #8
0
 static function guestbook_page()
 {
     $p = plugins::getinst();
     $t = new template('template/guestbook.tpl');
     //Eseguo l'azione "guestbook_page"
     $p->action('guestbook_page');
     //Se il messaggio non è vuoto
     if (!empty($_POST['message'])) {
         //Variabili
         $username = mysql_real_escape_string(htmlentities($_POST['username']));
         $text = mysql_real_escape_string(htmlentities($_POST['message']));
         //Imposto un filtro sul messaggio
         $text = $p->filter('guestbook_message_send', $text);
         //Eseguo la query e ne controllo l'esito
         $query = 'INSERT INTO guestbook SET username="******",text="' . $text . '",time=NOW();';
         if ($p->d->query($query)) {
             $t->block_null('new_success');
         }
     }
     //Eseguo la query per selezionare tutti i messaggi
     $select = 'SELECT * FROM guestbook ORDER BY time DESC;';
     $messaggi = $p->d->getresults($select);
     //Aggiungo i messaggi al template
     foreach ($messaggi as $m) {
         $t->block_assign('message', array('USERNAME' => $m->username, 'MESSAGE' => $m->text));
     }
     $t->out();
 }
Example #9
0
 public static function getinst()
 {
     global $d;
     if (self::$inst == NULL) {
         self::$inst = new plugins($d);
     }
     return self::$inst;
 }
Example #10
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Domains'))->add('id', 'ID', array('hidden' => true, 'key' => true))->add('name', 'Domain Name/Realm')->add('recordCount', 'Records', array('search' => false, 'align' => 'center', 'callback' => array('function' => array($this, 'countRecords'), 'arguments' => array('id'))))->navButtonAdd('Columns', array('onClickButton' => 'function () {  $(\'#{table_id}\').setColumns(); }', 'buttonimg' => url::base() . 'assets/css/jqGrid/table_insert_column.png', 'title' => 'Show/Hide Columns', 'noCaption' => true, 'position' => 'first'))->addAction('powerdns/edit', 'Edit', array('arguments' => 'id', 'width' => '120'))->addAction('powerdns/delete', 'Delete', array('arguments' => 'id', 'width' => '20'));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
Example #11
0
 /**
  * Инициализация плагина
  * @param plugins $plugins объект плагиновой системы
  * @return null
  * @note Здесь настраивается, какие классы плагин переопределяет, 
  * расширяет, какие хуки задействованы.
  */
 public function init($plugins)
 {
     // Полный мануал смотрите на http://ctrev.cyber-tm.ru
     $plugins->add_hook('torrents_show_begin', array($this, 'torrents_show_begin'));
     $plugins->extend_class('content', 'my_torrents');
     $plugins->preload('cleanup', 'modify_var', array('methods', 'empty'));
     $plugins->preload('cleanup', 'add_method', array('clear_empty', array($this, 'clear_empty')));
     $plugins->modify_init('content', array($this, 'torrents_init'));
 }
Example #12
0
 public function __construct()
 {
     parent::__construct();
     define('VALID_URL', '/^(http|https):\\/\\/[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}((:[0-9]{1,5})?\\/.*)?$/i');
     $this->addAction('index_includes', 'replaceFeed');
     $this->addAction('feed_header', 'feedRedirect');
     $this->addAction('admin_init_config', 'addControlPanelOption');
     $this->addAction('admin_init', 'checkConfig');
 }
Example #13
0
File: fax.php Project: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid('FaxProfile', array('caption' => 'Fax Profiles'))->add('fxp_id', 'ID', array('hidden' => true, 'key' => true))->add('fxp_name', 'Name')->add('fxp_default', 'Default')->addAction('fax/edit', 'Edit', array('arguments' => 'fxp_id'))->addAction('fax/delete', 'Delete', array('arguments' => 'fxp_id'));
     // Let plugins populate the grid as well
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
Example #14
0
/**
 * Automatically activate some core plugins
 */
function activate_core_plugins()
{
    include_once PHPWG_ROOT_PATH . 'admin/include/plugins.class.php';
    $plugins = new plugins();
    foreach ($plugins->fs_plugins as $plugin_id => $fs_plugin) {
        if (in_array($plugin_id, array('TakeATour'))) {
            $plugins->perform_action('activate', $plugin_id);
        }
    }
}
Example #15
0
File: odbc.php Project: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Build a grid with a hidden device_id, class_type, and add an option for the user to select the display columns
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'My ODBC Connections', 'multiselect' => true))->add('odbc_id', 'ID', array('hidden' => true, 'key' => true))->add('dsn_name', 'DSN Name', array('width' => '60'))->add('description', 'Description', array('width' => '120'))->add('host', 'Host', array('width' => '60'))->add('user', 'User', array('width' => '50'))->add('type', 'Type', array('width' => '30'))->add('port', 'port', array('width' => '30'))->navButtonAdd('Columns', array('onClickButton' => 'function () {  $(\'#{table_id}\').setColumns(); }', 'buttonimg' => url::base() . 'assets/css/jqGrid/table_insert_column.png', 'title' => 'Show/Hide Columns', 'noCaption' => true, 'position' => 'first'))->addAction('odbc/edit', 'Edit', array('arguments' => 'odbc_id', 'width' => '40'))->addAction('odbc/delete', 'Delete', array('arguments' => 'odbc_id', 'width' => '40'))->addAction('odbc/config', 'odbc.ini', array('arguments' => 'odbc_id', 'width' => '60'))->navGrid(array('del' => true));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     // Produces the grid markup or JSON, respectively
     $this->view->grid = $this->grid->produce();
 }
Example #16
0
/**
 * API method
 * Performs an action on a plugin
 * @param mixed[] $params
 *    @option string action
 *    @option string plugin
 *    @option string pwg_token
 */
function ws_plugins_performAction($params, $service)
{
    global $template;
    if (get_pwg_token() != $params['pwg_token']) {
        return new PwgError(403, 'Invalid security token');
    }
    define('IN_ADMIN', true);
    include_once PHPWG_ROOT_PATH . 'admin/include/plugins.class.php';
    $plugins = new plugins();
    $errors = $plugins->perform_action($params['action'], $params['plugin']);
    if (!empty($errors)) {
        return new PwgError(500, $errors);
    } else {
        if (in_array($params['action'], array('activate', 'deactivate'))) {
            $template->delete_compiled_templates();
        }
        return true;
    }
}
Example #17
0
 /**
  * Установка плагина
  * @param bool $re переустановка?
  * в данном случае необходимо лишь произвести изменения в файлах
  * @return bool статус установки
  * @note метод может возвращать false или 0, в случае, если была какая-то
  * критическая ошибка при удалении
  */
 public function install($re = false)
 {
     if (!$re) {
         config::o()->add('recaptcha_public_key', '', 'string', '', 'register');
         config::o()->add('recaptcha_private_key', '', 'string', '', 'register');
     }
     plugins::o()->insert_template('captcha.tpl', '[*recaptcha_show*][**');
     plugins::o()->insert_template('captcha.tpl', '**]', false);
     return true;
 }
Example #18
0
    public function index()
    {
        $this->template->content = new View('generic/grid');

        // Setup the base grid object
        $grid = jgrid::grid($this->baseModel, array(
                'caption' => 'Auto Attendants'
            )
        );

        // Add the base model columns to the grid
        $grid->add('auto_attendant_id', 'ID', array(
                'hidden' => true,
                'key' => true
            )
        );
        $grid->add('name', 'Name', array(
                'width' => '200',
                'search' => false,
            )
        );
        $grid->add('type', 'Prompt', array(
                'align' => 'center',
                'callback' => array(
                    'function' => array($this, '_showPrompt'),
                    'arguments' => array('registry')
                )
            )
        );
        $grid->add('keys', 'Options', array(
                'align' => 'center',
                'callback' => array(
                    'function' => array($this, '_showOptions'),
                    'arguments' => array('keys')
                )
            )
        );

        // Add the actions to the grid
        $grid->addAction('autoattendant/edit', 'Edit', array(
                'arguments' => 'auto_attendant_id'
            )
        );
        $grid->addAction('autoattendant/delete', 'Delete', array(
                'arguments' => 'auto_attendant_id'
            )
        );

        // Let plugins populate the grid as well
        $this->grid = $grid;
        plugins::views($this);

        // Produce a grid in the view
        $this->view->grid = $this->grid->produce();
    }
Example #19
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     $this->grid = jgrid::grid('callcenter_queue', array('caption' => 'Queues'));
     $this->grid->add('ccq_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ccq_name', 'Name');
     $this->grid->add('queueLocation/name', 'Location', array('width' => '150', 'search' => false));
     $this->grid->addAction('callcenter_supervisor/view', 'View', array('arguments' => 'ccq_id'));
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
Example #20
0
 static function master_adm_page()
 {
     global $t;
     $p = plugins::getinst();
     //controllo che l'utente sia master
     control_access(MASTER_ACCESS) != 1 ? header('Location: ../logout') : NULL;
     $t = new template('template/master.tpl');
     //eseguo l'azione master_menu
     $p->action('master_menu');
     @$t->out();
 }
 public function __construct()
 {
     parent::__construct();
     $this->cookie = cookie::getInstance();
     if (!defined('GESHI_VERSION') and file_exists(Absolute_Path . "app/plugins/geshi/GeSHi.php")) {
         require_once Absolute_Path . "app/plugins/geshi/GeSHi.php";
     }
     $this->addAction('index_comment_added', 'usersNotify');
     $this->addAction('index_comment_added', 'adminNotify');
     $this->addAction('comment_approbed', 'notify');
 }
Example #22
0
 function __construct()
 {
     parent::__construct();
     $this->registry = registry::getInstance();
     if (!defined('GESHI_VERSION')) {
         require_once Absolute_Path . "app/plugins/geshi/GeSHi.php";
     }
     $this->addAction('index_post_content', 'source_code_beautifier');
     $this->addAction('admin_comments_content', 'comment_source_code_beautifier');
     $this->addAction('index_comment_content', 'comment_source_code_beautifier');
 }
Example #23
0
 /**
  * Инициализация блока контента
  * @return null
  */
 public function init()
 {
     lang::o()->get("content");
     if (!users::o()->perm('content')) {
         return;
     }
     /* @var $content content */
     $content = plugins::o()->get_module("content");
     if (!is_callable(array($content, "show"))) {
         return;
     }
     tpl::o()->assign('content_in_block', true);
     $content->show();
 }
Example #24
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Directories'));
     // Add the base model columns to the grid
     $this->grid->add('dbn_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('dbn_name', 'Directory Name');
     $this->grid->addAction('dbndir/edit', 'Edit', array('arguments' => 'dbn_id'));
     //        $this->grid->addAction('callcenter_agents/delete', 'Delete', array(
     //                'arguments' => 'cca_id'
     //            )
     //        );
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
Example #25
0
 public function details($xml_cdr_id)
 {
     $xmlcdr = Doctrine::getTable('Xmlcdr')->findOneBy('xml_cdr_id', $xml_cdr_id);
     $idx = array('Caller Name' => 'caller_id_name', 'Caller Number' => 'caller_id_number', 'Direction' => 'direction', 'Desintation Number' => 'destination_number', 'User Name' => 'user_name', 'Context' => 'context', 'Start' => 'start_stamp', 'Answer' => 'answer_stamp', 'End' => 'end_stamp', 'Duration' => 'duration', 'Billable Seconds' => 'billsec', 'Hangup Cause' => 'hangup_cause', 'UUID' => 'uuid', 'B-Leg UUID' => 'bleg_uuid', 'Account Code' => 'accountcode', 'Domain Name' => 'domain_name', 'User Context' => 'user_context', 'Read Codec' => 'read_codec', 'Write Codec' => 'write_codec', 'Dailed Domain' => 'dialed_domain', 'Dailed User' => 'dialed_user');
     $this->xmlcdr = $xmlcdr;
     $details = '<h3>CDR</h3>';
     $details .= '<table>';
     foreach ($idx as $k => $p) {
         $details .= "<tr><td width=\"300px\">{$k}</td><td>{$xmlcdr->{$p}}</td></tr>\n";
     }
     $details .= '</table>';
     $this->view->details = $details;
     // Execute plugin hooks here, after we've loaded the core data sets
     Event::run('bluebox.create_view', $this->view);
     plugins::views($this);
 }
Example #26
0
 /**
  * Method for the main page of this module
  */
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Time Of Day Routes'));
     // Add the base model columns to the grid
     $grid->add('time_of_day_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Route Name');
     // Add the actions to the grid
     $grid->addAction('timeofday/edit', 'Edit', array('arguments' => 'time_of_day_id', 'width' => '120'));
     $grid->addAction('timeofday/delete', 'Delete', array('arguments' => 'time_of_day_id', 'width' => '20'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
Example #27
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Queues'));
     // Add the base model columns to the grid
     $this->grid->add('ccq_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ccq_name', 'Name');
     //$grid->add('datafield2', 'Field 2');
     $this->grid->add('queueLocation/name', 'Location', array('width' => '150', 'search' => false));
     // Add the actions to the grid
     $this->grid->addAction('callcenter_queues/edit', 'Edit', array('arguments' => 'ccq_id'));
     $this->grid->addAction('callcenter_queues/delete', 'Delete', array('arguments' => 'ccq_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
Example #28
0
 /**
  * Инициализация модуля обратной связи
  * @return null
  */
 public function init()
 {
     $admin_file = globals::g('admin_file');
     lang::o()->get('admin/feedback');
     $act = $_GET["act"];
     switch ($act) {
         case "clear":
             /* @var $o feedback_man_ajax */
             $o = plugins::o()->get_module('feedback', 1, true);
             $o->clear();
             furl::o()->location($admin_file);
             break;
         default:
             $this->show($_GET['sort'], $_GET['type']);
             break;
     }
 }
Example #29
0
 public function download($start = NULL, $end = NULL)
 {
     // Download a CDR
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('gridName' => 'calldownload', 'caption' => 'Export Preview'))->add('calls_id', 'ID', array('hidden' => true, 'key' => true))->add('start_stamp', 'Start')->add('end_stamp', 'End')->add('caller_id_number', 'Calling Party')->add('destination_number', 'Called Party')->add('duration', 'Length')->add('hangup_cause', 'Call End Cause');
     if (!is_null($start)) {
         $grid->andWhere('start_stamp >', "'" . $start . "'");
     }
     if (!is_null($end)) {
         $grid->andWhere('end_stamp <', "'" . $end . "'");
     }
     // Let plugins populate the grid as well
     $this->grid = $grid;
     Kohana::log('debug', print_r($_POST, TRUE));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
Example #30
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Trunks/Gateways'));
     // Add the base model columns to the grid
     $grid->add('trunk_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Trunk Name');
     $grid->add('type', 'Type', array('width' => '50', 'search' => false));
     // Add the actions to the grid
     $grid->addAction('trunkmanager/edit', 'Edit', array('arguments' => 'trunk_id'));
     $grid->addAction('trunkmanager/delete', 'Delete', array('arguments' => 'trunk_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }