Пример #1
0
<?php

/* For license terms, see /license.txt */
/**
 * This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
 * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
 * @package chamilo.plugin.buycourses
 */
/**
 * Plugin details (must be present)
 */
require_once dirname(__FILE__) . '/config.php';
$plugin_info = BuyCoursesPlugin::create()->get_info();
Пример #2
0
<?php

/* For license terms, see /license.txt */
/**
 * List page for Paypal Payout for the Buy Courses plugin
 * @package chamilo.plugin.buycourses
 */
/**
 * Initialization
 */
$cidReset = true;
require_once '../../../main/inc/global.inc.php';
$htmlHeadXtra[] = '<link rel="stylesheet" href="../resources/css/style.css" type="text/css">';
api_protect_admin_script(true);
$plugin = BuyCoursesPlugin::create();
$paypalEnable = $plugin->get('paypal_enable');
$commissionsEnable = $plugin->get('commissions_enable');
if ($paypalEnable !== "true" && $commissionsEnable !== "true") {
    api_not_allowed(true);
}
$payouts = $plugin->getPayouts();
$payoutList = [];
foreach ($payouts as $payout) {
    $payoutList[] = ['id' => $payout['id'], 'reference' => $payout['sale_reference'], 'date' => api_format_date($payout['date'], DATE_TIME_FORMAT_LONG_24H), 'currency' => $payout['iso_code'], 'price' => $payout['item_price'], 'commission' => $payout['commission'], 'paypal_account' => $payout['paypal_account']];
}
$templateName = $plugin->get_lang('PaypalPayoutCommissions');
$template = new Template($templateName);
$template->assign('payout_list', $payoutList);
$content = $template->fetch('buycourses/view/paypal_payout.tpl');
$template->assign('header', $templateName);
$template->assign('content', $content);
Пример #3
0
<?php

/* For license terms, see /license.txt */
/**
 * This script is included by main/admin/settings.lib.php when unselecting a plugin
 * and is meant to remove things installed by the install.php script in both
 * the global database and the courses tables
 * @package chamilo.plugin.buycourses
 */
/**
 * Queries
 */
require_once dirname(__FILE__) . '/config.php';
BuyCoursesPlugin::create()->uninstall();