Rename variables

1.9.x
Francis Gonzales 12 years ago
parent 41b0ae55f0
commit 1b6530c788
  1. 28
      plugin/buy_courses/js/funciones.js
  2. 8
      plugin/buy_courses/lang/spanish.php
  3. 0
      plugin/buy_courses/resources/delete.png
  4. 18
      plugin/buy_courses/resources/plugin.css
  5. 2
      plugin/buy_courses/src/buy_course_plugin.class.php
  6. 2
      plugin/buy_courses/src/configuration.php
  7. 4
      plugin/buy_courses/src/error.php
  8. 3
      plugin/buy_courses/src/expresscheckout.php
  9. 12
      plugin/buy_courses/src/list.php
  10. 42
      plugin/buy_courses/src/paymentsetup.php
  11. 5
      plugin/buy_courses/src/paypalfunctions.php
  12. 19
      plugin/buy_courses/src/pending_orders.php
  13. 30
      plugin/buy_courses/src/process.php
  14. 35
      plugin/buy_courses/src/process_confirm.php
  15. 11
      plugin/buy_courses/src/success.php
  16. 8
      plugin/buy_courses/view/configuration.tpl
  17. 14
      plugin/buy_courses/view/list.tpl
  18. 6
      plugin/buy_courses/view/paymentsetup.tpl
  19. 20
      plugin/buy_courses/view/pending_orders.tpl
  20. 18
      plugin/buy_courses/view/process.tpl
  21. 22
      plugin/buy_courses/view/process_confirm.tpl
  22. 14
      plugin/buy_courses/view/success.tpl

@ -29,16 +29,16 @@ $(document).ready(function () {
$(".guardar").click(function () {
var vvisible = $(this).parent().parent().prev().prev().children().attr("checked");
var vprice = $(this).parent().parent().prev().children().attr("value");
var idcurso = $(this).parent().parent().attr("id");
$.post("function.php", {tab: "save_mod", id: idcurso, visible: vvisible, price: vprice},
var courseid = $(this).parent().parent().attr("id");
$.post("function.php", {tab: "save_mod", id: courseid, visible: vvisible, price: vprice},
function (data) {
if (data.status == "false") {
alert("Error database");
} else {
$("#curso" + data.id).children().attr("style", "display:''");
$("#curso" + data.id).children().next().attr("style", "display:none");
$("#curso" + data.id).parent().removeClass("fmod")
$("#curso" + data.id).parent().children().each(function () {
$("#course" + data.id).children().attr("style", "display:''");
$("#course" + data.id).children().next().attr("style", "display:none");
$("#course" + data.id).parent().removeClass("fmod")
$("#course" + data.id).parent().children().each(function () {
$(this).removeClass("btop");
});
}
@ -62,22 +62,22 @@ $(document).ready(function () {
$('#confirmar_filtro').click(function (e) {
var vcurso = $("#course_name").attr("value");
var vcourse = $("#course_name").attr("value");
var pmin = $("#price_min").attr("value");
var pmax = $("#price_max").attr("value");
if ($("#mostrar_disponibles").attr("checked") == "checked") {
var vmostrar = "SI";
var vshow = "SI";
} else {
var vmostrar = "NO";
var vshow = "NO";
}
var vcategoria = $("#categoria_cursos").attr("value");
$.post("function.php", {tab: "courses_filter", course: vcurso, pricemin: pmin, pricemax: pmax, mostrar: vmostrar, categoria: vcategoria},
var vcategory = $("#courses_category").attr("value");
$.post("function.php", {tab: "courses_filter", course: vcourse, pricemin: pmin, pricemax: pmax, mostrar: vshow, category: vcategory},
function (data) {
if (data.status == "false") {
alert(data.contenido);
$("#resultado_cursos").html('');
alert(data.content);
$("#course_results").html('');
} else {
$("#resultado_cursos").html(data.contenido);
$("#course_results").html(data.content);
}
$(document).ready(acciones_ajax);
}, "json");

@ -16,14 +16,11 @@ $strings['OpenToTheWorld'] = "Público - acceso autorizado a cualquier per
$strings['Description'] = "Descripción";
$strings['Buy'] = "Comprar";
$strings['Filtro_buscar'] = "Filtro de busqueda";
$strings['Curso'] = "Curso";
$strings['Price_Maximum'] = "Precio mayor de";
$strings['Price_Minimum'] = "Precio menor de";
$strings['Mostrar_disponibles'] = "Mostrar cursos disponibles";
$strings['Categorias'] = "Categorias";
$strings['paypal_enable'] = "Habilitar PayPal";
$strings['tarjet_credit_enable'] = "Habilitar TPV";
$strings['transference_enable'] = "Habilitar transferencia";
$strings['unregistered_users_enable'] = "Permitir usuarios sin registro en la plataforma";
@ -36,7 +33,6 @@ $strings['bc_subject'] = "Confirmaci<EFBFBD>n pedido de cursos";
$strings['bc_tmp_registrado'] = 'Se encuentra a la espera de recibir el pago';
$strings['Ref_pedido'] = 'Referencia del pedido';
$strings['transferencia_bancaria'] = 'Transferencia Bancaria';
$strings['paypal'] = 'PayPal';
$strings['confirmar_compra'] = 'Confirmar compra de curso';
@ -56,4 +52,6 @@ $strings['ConfigurationOfPayments'] = 'Configuración de pagos';
$strings['OrdersPendingOfPayment'] = 'Pedidos pendientes de pago';
$strings['AvailableCoursesConfiguration'] = 'Configuración de cursos disponibles';
$strings['PaymentsConfiguration'] = 'Configuración de Pagos';
$strings['bc_message'] = "Estimado {{name}}. <br />En cuanto recibamos confirmaci&oacute;n de pago procederemos a dar de alta su usuario en el curso <strong>{{curso}}</strong>.<br><br><strong>No olvide indicar en el concepto de la transferencia el n&uacute;mero de referencia del pedido: <div style='display:inline;text-align:center; font-weight:bold; font-size:20px; color:#333'>{{reference}}</div></strong>";
$strings['bc_message'] = "Estimado {{name}}. <br />En cuanto recibamos confirmaci&oacute;n de pago procederemos a dar de alta su usuario en el curso <strong>{{curso}}</strong>.<br><br><strong>No olvide indicar en el concepto de la transferencia el n&uacute;mero de referencia del pedido: <div style='display:inline;text-align:center; font-weight:bold; font-size:20px; color:#333'>{{reference}}</div></strong>";
$strings['Categories'] = "Categorias";
$strings['BankTransference'] = 'Transferencia Bancaria';

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -11,20 +11,20 @@ table td.ta-center, table th.ta-center {
text-align: center;
}
#tabla_cursos td, #tabla_trasferencia td, #tabla_pedidos td {
#courses_table td, #transference_table td, #order_table td {
vertical-align: middle;
}
#tabla_cursos td input.price, #tabla_trasferencia td input, #currency_type {
#courses_table td input.price, #transference_table td input, #currency_type {
margin: 0;
}
#tabla_cursos td.btop {
#courses_table td.btop {
border-top: 1px solid red;
border-bottom: 1px solid red;
}
#tabla_cursos tr.fmod {
#courses_table tr.fmod {
border: 1px solid red;
background: #FFE0E0;
}
@ -53,23 +53,23 @@ table td.ta-center, table th.ta-center {
text-align: center;
}
textarea#mensaje {
textarea#message {
width: 50%;
}
.envio_resultado {
.send_result {
font-weight: bold;
}
select#lsesiones, select#lcursos, select#lejercicios, select#estado {
select#lsessions, select#lcourses, select#lexercises, select#status {
margin-bottom: 0px;
}
.columna_campo_filtro {
.column_field_filter {
padding: 6px 10px 1px 1px;
text-align: right;
}
.height5 {
height: 5px;
}
}

@ -18,7 +18,7 @@ class Buy_CoursesPlugin extends Plugin
return $result ? $result : $result = new self();
}
protected function __construct()
public function __construct()
{
parent::__construct('1.0', 'Jose Angel Ruiz, Francis Gonzales', array('paypal_enable' => 'boolean', 'transference_enable' => 'boolean', 'unregistered_users_enable' => 'boolean'));
}

@ -42,4 +42,4 @@ if ($teacher) {
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
}
}

@ -14,5 +14,5 @@ unset($_SESSION['nvpReqArray']);
unset($_SESSION['TOKEN']);
$_SESSION['bc_success'] = false;
$_SESSION['bc_message'] = 'CancelOrder';
header('Location:list.php');
?>
header('Location:list.php');

@ -58,5 +58,4 @@ if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") {
echo "Short Error Message: " . $ErrorShortMsg;
echo "Error Code: " . $ErrorCode;
echo "Error Severity Code: " . $ErrorSeverityCode;
}
?>
}

@ -27,12 +27,12 @@ if (isset($_SESSION['bc_success'])) {
if ($_SESSION['bc_success'] == true) {
$message = sprintf(utf8_encode($plugin->get_lang($_SESSION['bc_message'])), $_SESSION['bc_url']);
unset($_SESSION['bc_url']);
$tpl->assign('estilo', 'confirmation-message');
$tpl->assign('class', 'confirmation-message');
} else {
$message = utf8_encode($plugin->get_lang($_SESSION['bc_message']));
$tpl->assign('estilo', 'warning-message');
$tpl->assign('class', 'warning-message');
}
$tpl->assign('mensaje', $message);
$tpl->assign('message', $message);
unset($_SESSION['bc_success']);
unset($_SESSION['bc_message']);
@ -45,11 +45,11 @@ $categoryList = listCategories();
$currencyType = findCurrency();
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('cursos', $courseList);
$tpl->assign('categorias', $categoryList);
$tpl->assign('courses', $courseList);
$tpl->assign('category', $categoryList);
$tpl->assign('currency', $currencyType);
$listing_tpl = 'buy_courses/view/list.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
$tpl->display_one_col_template();

@ -5,12 +5,12 @@
require_once dirname(__FILE__) . '/buy_course.lib.php';
require_once '../../../main/inc/global.inc.php';
require_once 'buy_course_plugin.class.php';
$plugin = Buy_CoursesPlugin::create();
$_cid = 0;
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
$interbreadcrumb[] = array("url" => "configuration.php", "name" => get_lang('Configuraci&oacute;n de cursos disponibles'));
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
$interbreadcrumb[] = array("url" => "configuration.php", "name" => $plugin->get_lang('AvailableCoursesConfiguration'));
$tpl = new Template('Configuraci&oacute;n de Pagos');
$tpl = new Template('PaymentConfiguration');
$teacher = api_is_platform_admin();
api_protect_course_script(true);
@ -18,34 +18,30 @@ api_protect_course_script(true);
if ($teacher) {
// Sync course table with the plugin
$listCurrency = listCurrency();
$paypalParams = paypalParameters();
$transferenceParams = transferenceParameters();
$ruta = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
$ruta2 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/save.png';
$ruta3 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/more.png';
$ruta4 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/borrar.png';
$ruta5 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/acces_tool.gif';
$confirmationImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
$saveImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/save.png';
$moreImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/more.png';
$deleteImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/delete.png';
$showImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/acces_tool.gif';
$plugin = Buy_CoursesPlugin::create();
$paypal_enable = $plugin->get('paypal_enable');
$tarjeta_enable = $plugin->get('tarjet_credit_enable');
$transference_enable = $plugin->get('transference_enable');
$paypalEnable = $plugin->get('paypal_enable');
$transferenceEnable = $plugin->get('transference_enable');
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('currencies', $listCurrency);
$tpl->assign('paypal', $paypalParams);
$tpl->assign('transferencia', $transferenceParams);
$tpl->assign('confirmation_img', $ruta);
$tpl->assign('save_img', $ruta2);
$tpl->assign('ruta_more', $ruta3);
$tpl->assign('ruta_borrar', $ruta4);
$tpl->assign('ruta_ver', $ruta5);
$tpl->assign('paypal_enable', $paypal_enable);
$tpl->assign('tarjeta_enable', $tarjeta_enable);
$tpl->assign('transference_enable', $transference_enable);
$tpl->assign('transference', $transferenceParams);
$tpl->assign('confirmation_img', $confirmationImg);
$tpl->assign('save_img', $saveImg);
$tpl->assign('more_img', $moreImg);
$tpl->assign('delete_img', $deleteImg);
$tpl->assign('show_img', $showImg);
$tpl->assign('paypal_enable', $paypalEnable);
$tpl->assign('transference_enable', $transferenceEnable);
$listing_tpl = 'buy_courses/view/paymentsetup.tpl';
$content = $tpl->fetch($listing_tpl);

@ -567,7 +567,4 @@ function deformatNVP($nvpstr)
return $nvpArray;
}
?>
}

@ -6,27 +6,26 @@ require_once dirname(__FILE__) . '/buy_course.lib.php';
require_once '../../../main/inc/global.inc.php';
require_once 'lib/buy_course_plugin.class.php';
$plugin = Buy_CoursesPlugin::create();
$_cid = 0;
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
$interbreadcrumb[] = array("url" => "paymentsetup.php", "name" => get_lang('Configuraci&oacute;n pagos'));
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
$interbreadcrumb[] = array("url" => "paymentsetup.php", "name" => $plugin->get_lang('PaymentsConfiguration'));
$tpl = new Template('Configuraci&oacute;n de cursos disponibles');
$tpl = new Template('AvailableCoursesConfiguration');
$teacher = api_is_platform_admin();
api_protect_course_script(true);
if ($teacher) {
$pendingList = pendingList();
$ruta = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
$ruta2 = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/borrar.png';
$confirmationImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/message_confirmation.png';
$deleteImg = api_get_path(WEB_PLUGIN_PATH) . 'buy_courses/resources/delete.png';
$currencyType = findCurrency();
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('pendientes', $pendingList);
$tpl->assign('confirmation_img', $ruta);
$tpl->assign('ruta_imagen_borrar', $ruta2);
$tpl->assign('pending', $pendingList);
$tpl->assign('confirmation_img', $confirmationImg);
$tpl->assign('delete_img', $deleteImg);
$tpl->assign('currency', $currencyType);
$listing_tpl = 'buy_courses/view/pending_orders.tpl';

@ -6,17 +6,22 @@ require_once dirname(__FILE__) . '/buy_course.lib.php';
require_once '../../../main/inc/global.inc.php';
require_once 'lib/buy_course_plugin.class.php';
$plugin = Buy_CoursesPlugin::create();
$_cid = 0;
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
$tpl = new Template('Tipo de pago');
$tpl = new Template('PaymentType');
if (isset($_GET['code'])) {
$code = (int)$_GET['code'];
} else {
$code = $_SESSION['bc_course_code'];
}
$sql = "SELECT price, title, code FROM plugin_buycourses a, course b WHERE a.id_course='" . $code . "' AND a.id_course=b.id;";
$tableBuyCourse = Database::get_main_table(TABLE_BUY_COURSE);
$sql = "SELECT price, title, code FROM $tableBuyCourse a, course b
WHERE a.id_course='" . $code . "'
AND a.id_course=b.id;";
$res = Database::query($sql);
$row = Database::fetch_assoc($res);
$_SESSION['Payment_Amount'] = number_format($row['price'], 2, '.', '');
@ -25,7 +30,7 @@ $_SESSION['bc_course_title'] = $row['title'];
$_SESSION['bc_course_code'] = $row['code'];
if (!isset($_SESSION['_user'])) {
//Necesita registro
//Needs to be Registered
if (!isset($_SESSION['bc_user'])) {
header('Location:inscription.php');
exit;
@ -43,7 +48,7 @@ if (!isset($_SESSION['_user'])) {
$tpl->assign('user', $_SESSION['bc_user']['username']);
}
if (checkUserCourse($_SESSION['bc_curso_codetext'], $_SESSION['bc_user_id'])) {
if (checkUserCourse($_SESSION['bc_course_codetext'], $_SESSION['bc_user_id'])) {
$_SESSION['bc_success'] = false;
$_SESSION['bc_message'] = 'AlreadyBuy';
header('Location: list.php');
@ -51,28 +56,25 @@ if (checkUserCourse($_SESSION['bc_curso_codetext'], $_SESSION['bc_user_id'])) {
if (checkUserCourseTransference($_SESSION['bc_course_codetext'], $_SESSION['bc_user_id'])) {
$_SESSION['bc_success'] = false;
$_SESSION['bc_message'] = 'bc_tmp_registrado';
$_SESSION['bc_message'] = 'bc_tmp_registered';
header('Location: list.php');
}
$currencyType = findCurrency();
$plugin = Buy_CoursesPlugin::create();
$paypal_enable = $plugin->get('paypal_enable');
$tarjeta_enable = $plugin->get('tarjet_credit_enable');
$transference_enable = $plugin->get('transference_enable');
$paypalEnable = $plugin->get('paypal_enable');
$transferenceEnable = $plugin->get('transference_enable');
$courseInfo = courseInfo($code);
$tpl->assign('curso', $courseInfo);
$tpl->assign('course', $courseInfo);
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('paypal_enable', $paypal_enable);
$tpl->assign('tarjeta_enable', $tarjeta_enable);
$tpl->assign('transference_enable', $transference_enable);
$tpl->assign('paypal_enable', $paypalEnable);
$tpl->assign('transference_enable', $transferenceEnable);
$tpl->assign('title', $_SESSION['bc_course_title']);
$tpl->assign('price', $_SESSION['Payment_Amount']);
$tpl->assign('currency', $currencyType);
$listing_tpl = 'buy_courses/view/process.tpl';
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);

@ -6,25 +6,12 @@ require_once '../../../main/inc/lib/mail.lib.inc.php';
require_once dirname(__FILE__) . '/buy_course.lib.php';
require_once 'lib/buy_course_plugin.class.php';
function completar($valor, $digitos)
{
$resultado = '';
if (strlen($valor) < $digitos) {
$ceros = $digitos - strlen(ceil($valor));
for ($i = 0; $i < $ceros; $i++) {
$resultado .= '0';
}
}
$resultado .= $valor;
return $resultado;
}
if ($_POST['payment_type'] == '') {
header('Location:process.php');
}
if (isset($_POST['Aceptar'])) {
//Almacenamos usuario, curso, referencia en tabla temporal
// Save the user, course and reference in a tmp table
$user_id = $_SESSION['bc_user_id'];
$course_code = $_SESSION['bc_course_codetext'];
$reference = calculateReference();
@ -38,7 +25,7 @@ if (isset($_POST['Aceptar'])) {
$sql = "INSERT INTO plugin_bc_temporal (user_id, name, course_code, title, reference, price) VALUES ('" . $user_id . "', '" . $name . "','" . $course_code . "','" . $title . "','" . $reference . "','" . $price . "');";
$res = Database::query($sql);
//Notificamos al usuario y enviamos datos bancarios
// Notify the user and send the bank info
$accountsList = listAccounts();
$texto = '<div align="center"><table style="width:70%"><tr><th style="text-align:center"><h3>Datos Bancarios</h3></th></tr>';
@ -67,16 +54,16 @@ if (isset($_POST['Aceptar'])) {
}
$courseInfo = courseInfo($_SESSION['bc_course_code']);
$title_curso = $courseInfo['title'];
$title_course = $courseInfo['title'];
$message = utf8_encode($plugin->get_lang('bc_message'));
$message = str_replace("{{name}}", $name, $message);
$message = str_replace("{{curso}}", $title_curso, $message);
$message = str_replace("{{course}}", $title_course, $message);
$message = str_replace("{{reference}}", $reference, $message);
$message .= $texto;
api_mail($name, $email, $asunto, $message);
// Volvemos al listado de cursos
// Return to course list
header('Location:list.php');
}
@ -128,16 +115,16 @@ if ($_POST['payment_type'] == "PayPal") {
}
}
if ($_POST['payment_type'] == "Transferencia") {
if ($_POST['payment_type'] == "Transference") {
$_cid = 0;
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
$tpl = new Template('Tipo de pago');
$code = $_SESSION['bc_course_code'];
$courseInfo = courseInfo($code);
$tpl->assign('curso', $courseInfo);
$tpl->assign('course', $courseInfo);
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('title', $_SESSION['bc_course_title']);
$tpl->assign('price', $_SESSION['Payment_Amount']);
@ -152,7 +139,7 @@ if ($_POST['payment_type'] == "Transferencia") {
$tpl->assign('user', $_SESSION['bc_user']['username']);
}
//Obtenemos el listado de cuentas bancarias.
//Get bank list account
$accountsList = listAccounts();
$tpl->assign('accounts', $accountsList);
@ -160,6 +147,4 @@ if ($_POST['payment_type'] == "Transferencia") {
$content = $tpl->fetch($listing_tpl);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
}
?>
}

@ -8,6 +8,7 @@ require_once 'lib/buy_course_plugin.class.php';
require_once api_get_path(LIBRARY_PATH) . 'mail.lib.inc.php';
require_once api_get_path(LIBRARY_PATH) . 'course.lib.php';
$plugin = Buy_CoursesPlugin::create();
/*
==================================================================
// DATOS DE PAYPAL //
@ -95,14 +96,14 @@ if ($token != "") {
if (!isset($_POST['paymentOption'])) {
//PANTALLA DE CONFIRMACION DEL PEDIDO
$_cid = 0;
$interbreadcrumb[] = array("url" => "list.php", "name" => 'Listado de cursos a la venta');
$interbreadcrumb[] = array("url" => "list.php", "name" => $plugin->get_lang('CourseListOnSale'));
$tpl = new Template('Tipo de pago');
$tpl = new Template('PaymentType');
$code = $_SESSION['bc_course_code'];
$courseInfo = courseInfo($code);
$tpl->assign('curso', $courseInfo);
$tpl->assign('course', $courseInfo);
$tpl->assign('server', $_configuration['root_web']);
$tpl->assign('title', $_SESSION['bc_course_title']);
$tpl->assign('price', $_SESSION['Payment_Amount']);
@ -216,10 +217,6 @@ if (!isset($_POST['paymentOption'])) {
//INSERTAMOS LOS REGISTROS NECESARIOS EN LAS TABLAS DE BASES DE DATOS PARA DAR AL USUARIO DE ALTA
if ($paymentStatus == "Completed") {
$plugin = Buy_CoursesPlugin::create();
//echo "Se ha realizado la compra correctamente";
$user_id = $_SESSION['bc_user_id']; //api_get_user_id();
$course_code = $_SESSION['bc_course_codetext'];
$all_course_information = CourseManager::get_course_information($course_code);

@ -4,7 +4,7 @@
<div class="row">
<div class="span12">
<table id="tabla_cursos" class="data_table">
<table id="courses_table" class="data_table">
<tr class="row_odd">
<th>{{ 'Title'|get_lang }}</th>
<th>{{ 'OfficialCode'|get_lang }}</th>
@ -14,7 +14,7 @@
</tr>
{% set i = 0 %}
{% for curso in cursos %}
{% for course in courses %}
{{ i%2==0 ? '
<tr class="row_even">' : '
<tr class="row_odd">' }}
@ -24,9 +24,9 @@
<a href="{{ server }}courses/{{course.code}}/index.php">{{course.title}}</a>
<span class="label label-info">{{ course.visual_code }}</span>
</td>
<td>{{curso.code}}</td>
<td>{{course.code}}</td>
<td class="ta-center">
{% if curso.visible == 1 %}
{% if course.visible == 1 %}
<input type="checkbox" name="visible" value="1" checked="checked" size="6" />
{% else %}
<input type="checkbox" name="visible" value="1" size="6" />

@ -15,22 +15,22 @@
<li class="nav-header">{{ 'Mostrar_disponibles'|get_lang }}: &nbsp;<input type="checkbox"
id="mostrar_disponibles"
value="SI"/></li>
<li class="nav-header">{{ 'Categorias'|get_lang }}:</li>
<li><select id="categoria_cursos">
<li class="nav-header">{{ 'Categories'|get_lang }}:</li>
<li><select id="courses_category">
<option value="" selected="selected"></option>
{% for categoria in categorias %}
<option value="{{ categoria.code }}">{{ categoria.name }}</option>
{% for category in categories %}
<option value="{{ category.code }}">{{ category.name }}</option>
{% endfor %}
</select>
</li>
<br />
<li class="ta-center"><input type="button" class="btn btn-primary" value="Buscar cursos" id="confirmar_filtro" /></li>
<li class="ta-center"><input type="button" class="btn btn-primary" value="Serach Courses" id="confirmar_filtro" /></li>
</ul>
</div>
</div>
<div class="span9" id="resultado_cursos">
<div class="span9" id="course_results">
{% if rmessage == "YES" %}
<div class="{{ estilo }}">{{ mensaje }}
<div class="{{ class }}">{{ message }}
</div>
{% endif %}
{% for course in courses %}

@ -45,7 +45,7 @@
</tr>
{% set i = 0 %}
{% for transf in transferencia %}
{% for transf in transference %}
{{ i%2==0 ? '
<tr class="row_even">' : '
<tr class="row_odd">' }}
@ -54,7 +54,7 @@
<td>{{ transf.account | e }}</td>
<td>{{ transf.swift | e }}</td>
<td class="ta-center" id="account{{ transf.id }}">
<img src="{{ ruta_borrar }}" class="cursor delete_account" alt="ok"/>
<img src="{{ delete_img }}" class="cursor delete_account" alt="ok"/>
</td>
</tr>
{% endfor %}
@ -65,7 +65,7 @@
<td><input type="text" id="taccount"/></td>
<td><input class="span2" type="text" id="tswift"</td>
<td class="ta-center">
<img class="cursor" id="add_account" src="{{ ruta_more }}" alt="add account"/>
<img class="cursor" id="add_account" src="{{ more_img }}" alt="add account"/>
</td>
</tr>
</table>

@ -4,7 +4,7 @@
<div class="row">
<div class="span12">
<table id="tabla_pedidos" class="data_table">
<table id="orders_table" class="data_table">
<tr class="row_odd">
<th class="ta-center">{{ 'Ref_pedido'|get_lang }}</th>
<th>{{ 'Name'|get_lang }}</th>
@ -15,22 +15,22 @@
</tr>
{% set i = 0 %}
{% for pedido in pendientes %}
{% for order in pending %}
{{ i%2==0 ? '
<tr class="row_even">' : '
<tr class="row_odd">' }}
{% set i = i + 1 %}
<td class="ta-center">{{ pedido.reference }}</td>
<td>{{ pedido.name }}</td>
<td>{{ pedido.title }}</td>
<td>{{ pedido.price }} {{ currency }}</td>
<td class="ta-center">{{ pedido.date }}</td>
<td class="ta-center" id="pedido{{ pedido.cod }}">
<td class="ta-center">{{ order.reference }}</td>
<td>{{ order.name }}</td>
<td>{{ order.title }}</td>
<td>{{ order.price }} {{ currency }}</td>
<td class="ta-center">{{ order.date }}</td>
<td class="ta-center" id="order{{ order.cod }}">
<img src="{{ confirmation_img }}" alt="ok" class="cursor confirm_order"
title="Subscribir al usuario"/>
&nbsp;&nbsp;
<img src="{{ ruta_imagen_borrar }}" alt="borrar" class="cursor clear_order"
title="Eliminar el pedido"/>
<img src="{{ delete_img }}" alt="delete" class="cursor clear_order"
title="Delete the order"/>
</td>
</tr>
{% endfor %}

@ -24,23 +24,23 @@
<div class="span">
<div class="thumbnail">
<a class="ajax" rel="gb_page_center[778]" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">
<img alt="" src="{{ server }}{{ curso.course_img }}">
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">
<img alt="" src="{{ server }}{{ course.course_img }}">
</a>
</div>
</div>
<div class="span4">
<div class="categories-course-description">
<h3>{{ curso.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ curso.teacher }}</h5>
<h3>{{ course.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ course.teacher }}</h5>
</div>
</div>
<div class="span right">
<div class="sprice right">{{ curso.price }} {{ currency }}</div>
<div class="sprice right">{{ course.price }} {{ currency }}</div>
<div class="cleared"></div>
<div class="btn-toolbar right">
<a class="ajax btn btn-primary" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">{{'Description'|get_lang }}
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">{{'Description'|get_lang }}
</a>
</div>
</div>
@ -60,13 +60,11 @@
</th>
</tr>
{% if paypal_enable == "true" %}
<tr><td><input type="radio" id="payment_type-p" name="payment_type" value="PayPal" /> {{ 'paypal'|get_lang
}}</td></tr>
<tr><td><input type="radio" id="payment_type-p" name="payment_type" value="PayPal" /> {{ 'paypal'|get_lang }}</td></tr>
{% endif %}
{% if transference_enable == "true" %}
<tr><td><input type="radio" id="payment_type-tra" name="payment_type" value="Transferencia" />{{
'transferencia_bancaria'|get_lang }}</td></tr>
<tr><td><input type="radio" id="payment_type-tra" name="payment_type" value="Transference" />{{ 'BankTransference'|get_lang }}</td></tr>
{% endif %}
<tr><td>
<input type="hidden" name="currency_type" value="{{ currency }}" />

@ -24,23 +24,23 @@
<div class="span">
<div class="thumbnail">
<a class="ajax" rel="gb_page_center[778]" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">
<img alt="" src="{{ server }}{{ curso.course_img }}">
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">
<img src="{{ server }}{{ course.course_img }}">
</a>
</div>
</div>
<div class="span4">
<div class="categories-course-description">
<h3>{{ curso.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ curso.teacher }}</h5>
<h3>{{ course.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ course.teacher }}</h5>
</div>
</div>
<div class="span right">
<div class="sprice right">{{ curso.price }} {{ currency }}</div>
<div class="sprice right">{{ course.price }} {{ currency }}</div>
<div class="cleared"></div>
<div class="btn-toolbar right">
<a class="ajax btn btn-primary" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">{{
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">{{
'Description'|get_lang }}</a>
</div>
@ -76,14 +76,14 @@
<br/>
<form method="post" name="Aceptar" action="../src/process_confirm.php">
<input type="hidden" name="payment_type" value="Transferencia"/>
<input type="hidden" name="payment_type" value="Transference"/>
<input type="hidden" name="name" value="{{ name | e }}"/>
<input type="hidden" name="price" value="{{ curso.price }}"/>
<input type="hidden" name="title" value="{{ curso.title | e }}"/>
<input type="hidden" name="price" value="{{ course.price }}"/>
<input type="hidden" name="title" value="{{ course.title | e }}"/>
<div class="btn_siguiente">
<input class="btn btn-success" type="submit" name="Aceptar" value="Confirmar compra de curso"/>
<input class="btn btn-danger" type="button" name="Cancelar" value="Cancelar" id="cancelapedido"/>
<input class="btn btn-success" type="submit" name="Aceptar" value="Confirm the order/>
<input class="btn btn-danger" type="button" name="Cancelar" value="Cancelar" id="CancelOrder"/>
</div>
</form>
</div>

@ -24,23 +24,23 @@
<div class="span">
<div class="thumbnail">
<a class="ajax" rel="gb_page_center[778]" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">
<img alt="" src="{{ server }}{{ curso.course_img }}">
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">
<img alt="" src="{{ server }}{{ course.course_img }}">
</a>
</div>
</div>
<div class="span4">
<div class="categories-course-description">
<h3>{{ curso.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ curso.teacher }}</h5>
<h3>{{ course.title }}</h3>
<h5>{{ 'Teacher'|get_lang }}: {{ course.teacher }}</h5>
</div>
</div>
<div class="span right">
<div class="sprice right">{{ curso.price }} {{ currency }}</div>
<div class="sprice right">{{ course.price }} {{ currency }}</div>
<div class="cleared"></div>
<div class="btn-toolbar right">
<a class="ajax btn btn-primary" title=""
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ curso.code }}">{{
href="{{ server }}plugin/buy_courses/function/ajax.php?code={{ course.code }}">{{
'Description'|get_lang }}</a>
</div>
@ -55,7 +55,7 @@
<input type="hidden" name="paymentOption" value="PayPal"/>
<div class="btn_siguiente">
<input class="btn btn-success" type="submit" name="Aceptar" value="Confirmar compra de curso"/>
<input class="btn btn-success" type="submit" name="Aceptar" value="Confirm Order"/>
<input class="btn btn-danger" type="button" name="Cancelar" value="Cancelar" id="cancelapedido"/>
</div>
</form>

Loading…
Cancel
Save