ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPaymentBuyedObjectsGUI Class Reference
+ Inheritance diagram for ilPaymentBuyedObjectsGUI:
+ Collaboration diagram for ilPaymentBuyedObjectsGUI:

Public Member Functions

 ilPaymentBuyedObjectsGUI (&$user_obj)
executeCommand ()
 execute command
 showItems ()
 __showStatisticTable ($a_result_set)
 __initBookingsObject ()
- Public Member Functions inherited from ilPaymentBaseGUI
 ilPaymentBaseGUI ()
 setSection ($a_section)
 getSection ()
 setMainSection ($a_main_section)
 getMainSection ()
 buildHeader ()
 setTableGUIBasicData (&$tbl, &$result_set, $a_default_order_column= '')
 __buildStatusline ()
 __buildLocator ()
 __buildStylesheet ()
 __buildButtons ()

Data Fields

 $ctrl
 $lng
 $user_obj
 $psc_obj = null
- Data Fields inherited from ilPaymentBaseGUI
 $ilias
 $lng
 $db
 $tpl
 $rbacsystem
 $tabs_gui
 $user_obj
 $section
 $main_section

Detailed Description

Definition at line 34 of file class.ilPaymentBuyedObjectsGUI.php.

Member Function Documentation

ilPaymentBuyedObjectsGUI::__initBookingsObject ( )

Definition at line 233 of file class.ilPaymentBuyedObjectsGUI.php.

Referenced by showItems().

{
include_once './payment/classes/class.ilPaymentBookings.php';
$this->bookings_obj =& new ilPaymentBookings();
return true;
}

+ Here is the caller graph for this function:

ilPaymentBuyedObjectsGUI::__showStatisticTable (   $a_result_set)

Definition at line 172 of file class.ilPaymentBuyedObjectsGUI.php.

References $_GET, and ilPaymentBaseGUI\$tpl.

Referenced by showItems().

{
$tbl =& $this->initTableGUI();
$tpl =& $tbl->getTemplateObject();
// SET FORMAACTION
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
//$tbl->setTitle($this->lng->txt("paya_buyed_objects"),"icon_pays_access.gif",$this->lng->txt("paya_statistic"));
$tbl->setTitle($this->lng->txt("paya_buyed_objects"),"icon_pays_access.gif",$this->lng->txt("bookings"));
$tbl->setHeaderNames(array($this->lng->txt("paya_transaction"),
$this->lng->txt("title"),
$this->lng->txt("paya_vendor"),
$this->lng->txt("paya_customer"),
$this->lng->txt("paya_order_date"),
$this->lng->txt("duration"),
$this->lng->txt("price_a"),
$this->lng->txt("paya_coupons_coupon"),
$this->lng->txt("paya_payed_access")));
$header_params = $this->ctrl->getParameterArray($this,'');
$tbl->setHeaderVars(array("transaction",
"title",
"vendor",
"customer",
"order_date",
"duration",
"price",
"discount",
"payed_access"),$header_params);
/*
array("cmd" => "",
"cmdClass" => "ilpaymentbuyedobjectsgui",
"baseClass" => "ilPersonalDesktopGUI",
"cmdNode" => $_GET["cmdNode"]));
*/
$offset = $_GET["offset"];
$order = $_GET["sort_by"];
$direction = $_GET["sort_order"] ? $_GET['sort_order'] : 'desc';
$tbl->setOrderColumn($order,'order_date');
$tbl->setOrderDirection($direction);
$tbl->setOffset($offset);
$tbl->setLimit($_GET["limit"]);
$tbl->setMaxCount(count($a_result_set));
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$tbl->setData($a_result_set);
$tbl->render();
$this->tpl->setVariable("STATISTIC_TABLE",$tbl->tpl->get());
return true;
}

+ Here is the caller graph for this function:

& ilPaymentBuyedObjectsGUI::executeCommand ( )

execute command

Definition at line 61 of file class.ilPaymentBuyedObjectsGUI.php.

References $cmd.

{
global $tree;
$cmd = $this->ctrl->getCmd();
switch ($this->ctrl->getNextClass($this))
{
default:
if(!$cmd = $this->ctrl->getCmd())
{
$cmd = 'showItems';
}
$this->$cmd();
break;
}
}
ilPaymentBuyedObjectsGUI::ilPaymentBuyedObjectsGUI ( $user_obj)

Definition at line 46 of file class.ilPaymentBuyedObjectsGUI.php.

References $ilCtrl, ilPaymentBaseGUI\$tpl, $user_obj, and ilPaymentBaseGUI\ilPaymentBaseGUI().

{
global $ilCtrl,$tpl;
$this->ctrl =& $ilCtrl;
$this->tpl =& $tpl;
$this->ilPaymentBaseGUI();
$this->user_obj =& $user_obj;
}

+ Here is the call graph for this function:

ilPaymentBuyedObjectsGUI::showItems ( )

Definition at line 79 of file class.ilPaymentBuyedObjectsGUI.php.

References __initBookingsObject(), __showStatisticTable(), ilRepositoryExplorer\buildFrameTarget(), ilRepositoryExplorer\buildLinkTarget(), ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), PAY_METHOD_BILL, PAY_METHOD_BMF, PAY_METHOD_PAYPAL, and ilUtil\sendInfo().

{
include_once "./Services/Repository/classes/class.ilRepositoryExplorer.php";
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.pay_personal_statistic.html','payment');
if(!count($bookings = $this->bookings_obj->getBookingsOfCustomer($this->user_obj->getId())))
{
ilUtil::sendInfo($this->lng->txt('pay_not_buyed_any_object'));
return true;
}
$counter = 0;
foreach($bookings as $booking)
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($booking['ref_id'], false);
$tmp_vendor =& ilObjectFactory::getInstanceByObjId($booking['b_vendor_id']);
$tmp_purchaser =& ilObjectFactory::getInstanceByObjId($booking['customer_id']);
$transaction = $booking['transaction_extern'];
switch ($booking['b_pay_method'])
{
$transaction .= " (" . $this->lng->txt("pays_bill") . ")";
break;
$transaction .= " (" . $this->lng->txt("pays_bmf") . ")";
break;
$transaction .= " (" . $this->lng->txt("pays_paypal") . ")";
break;
}
$f_result[$counter][] = $transaction;
if($tmp_obj)
{
$obj_link = ilRepositoryExplorer::buildLinkTarget($booking['ref_id'],$tmp_obj->getType());
$obj_target = ilRepositoryExplorer::buildFrameTarget($tmp_obj->getType(),$booking['ref_id'],$tmp_obj->getId());
$f_result[$counter][] = "<a href=\"".$obj_link."\" target=\"".$obj_target."\">".$tmp_obj->getTitle()."</a>";
}
else
{
$f_result[$counter][] = $this->lng->txt('object_not_found');
}
/*
if ($tmp_obj->getType() == "crs")
{
$f_result[$counter][] = "<a href=\"" . ILIAS_HTTP_PATH . "/repository.php?ref_id=" .
$booking["ref_id"] . "\">" . $tmp_obj->getTitle() . "</a>";
}
else if ($tmp_obj->getType() == "lm")
{
$f_result[$counter][] = "<a href=\"" . ILIAS_HTTP_PATH . "/content/lm_presentation.php?ref_id=" .
$booking["ref_id"] . "\" target=\"_blank\">" . $tmp_obj->getTitle() . "</a>";
}
else
{
$f_result[$counter][] = $tmp_obj->getTitle();
}
*/
$f_result[$counter][] = '['.$tmp_vendor->getLogin().']';
$f_result[$counter][] = '['.$tmp_purchaser->getLogin().']';
$f_result[$counter][] = date("Y-m-d H:i:s", $booking['order_date']);
$f_result[$counter][] = $booking['duration'];
$f_result[$counter][] = $booking['price'];
$f_result[$counter][] = ($booking['discount'] != '' ? $booking['discount'] : '&nbsp;');
$payed_access = $booking['payed'] ?
$this->lng->txt('yes') :
$this->lng->txt('no');
$payed_access .= '/';
$payed_access .= $booking['access'] ?
$this->lng->txt('yes') :
$this->lng->txt('no');
$f_result[$counter][] = $payed_access;
unset($tmp_obj);
unset($tmp_vendor);
unset($tmp_purchaser);
++$counter;
}
return $this->__showStatisticTable($f_result);
}

+ Here is the call graph for this function:

Field Documentation

ilPaymentBuyedObjectsGUI::$ctrl

Definition at line 36 of file class.ilPaymentBuyedObjectsGUI.php.

ilPaymentBuyedObjectsGUI::$lng

Definition at line 38 of file class.ilPaymentBuyedObjectsGUI.php.

ilPaymentBuyedObjectsGUI::$psc_obj = null

Definition at line 44 of file class.ilPaymentBuyedObjectsGUI.php.

ilPaymentBuyedObjectsGUI::$user_obj

Definition at line 39 of file class.ilPaymentBuyedObjectsGUI.php.

Referenced by ilPaymentBuyedObjectsGUI().


The documentation for this class was generated from the following file: