24 include_once
'payment/classes/class.ilPaymentObject.php';
25 include_once
'payment/classes/class.ilPaymentBookings.php';
26 include_once
'Services/Payment/classes/class.ilFileDataShop.php';
49 $this->lng->loadLanguageModule(
'crs');
60 $ilTabs->setTabActive(
'paya_header');
61 $ilTabs->setSubTabActive(
'paya_object');
66 $cmd = $this->ctrl->getCmd();
67 switch($this->ctrl->getNextClass($this))
69 case 'ilpageobjectgui':
74 $this->tpl->setContent(
$ret);
79 if(!
$cmd = $this->ctrl->getCmd())
93 if(!(
int)
$_GET[
'pobject_id'])
98 $this->ctrl->setParameter($this,
'pobject_id', (
int)$_GET[
'pobject_id']);
101 $this->lng->loadLanguageModule(
'content');
103 $ilTabs->clearTargets();
104 $ilTabs->clearSubTabs();
105 $ilTabs->setBackTarget($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'editDetails'),
'_top');
108 include_once
'Services/COPage/classes/class.ilPageObject.php';
109 include_once
'Services/COPage/classes/class.ilPageObjectGUI.php';
110 include_once(
'./Services/Style/classes/class.ilObjStyleSheet.php');
118 $new_page_object->setParentId(0);
119 $new_page_object->setId($this->pobject->getPobjectId());
120 $new_page_object->createFromXML();
123 $this->ctrl->setReturnByClass(
'ilpageobjectgui',
'edit');
125 $page_gui =
new ilPageObjectGUI(
'shop', $this->pobject->getPobjectId());
126 $this->ctrl->setParameter($page_gui,
'pobject_id', (
int)$_GET[
'pobject_id']);
128 $page_gui->setTemplateTargetVar(
'ADM_CONTENT');
129 $page_gui->setLinkXML(
'');
130 $page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass(array(
'ilpageobjectgui'),
'downloadFile'));
131 $page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass(array(
'ilpageobjectgui'),
'displayMediaFullscreen'));
132 $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass(array(
'ilpageobjectgui'),
'download_paragraph'));
133 $page_gui->setPresentationTitle(
'');
134 $page_gui->setTemplateOutput(
false);
135 $page_gui->setHeader(
'');
136 $page_gui->setEnabledRepositoryObjects(
false);
137 $page_gui->setEnabledFileLists(
true);
138 $page_gui->setEnabledMaps(
true);
139 $page_gui->setEnabledPCTabs(
true);
141 return $this->ctrl->forwardCommand($page_gui);
146 $this->
showButton(
'showObjectSelector', $this->lng->txt(
'paya_sell_object'));
148 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paya_objects.html',
'payment');
159 $img_change =
"<img src=\"".ilUtil::getImagePath(
"edit.gif").
"\" alt=\"".
160 $this->lng->txt(
"edit").
"\" title=\"".$this->lng->txt(
"edit").
161 "\" border=\"0\" vspace=\"0\"/>";
164 foreach($objects as
$data)
167 $f_result[$counter][] = $tmp_obj->getTitle();
170 switch($data[
'status'])
172 case $this->pobject->STATUS_BUYABLE:
173 $f_result[$counter][] = $this->lng->txt(
'paya_buyable');
176 case $this->pobject->STATUS_NOT_BUYABLE:
177 $f_result[$counter][] = $this->lng->txt(
'paya_not_buyable');
180 case $this->pobject->STATUS_EXPIRES:
181 $f_result[$counter][] = $this->lng->txt(
'paya_expires');
184 switch($data[
'pay_method'])
186 case $this->pobject->PAY_METHOD_NOT_SPECIFIED:
187 $f_result[$counter][] = $this->lng->txt(
'paya_pay_method_not_specified');
190 case $this->pobject->PAY_METHOD_BILL:
191 $f_result[$counter][] = $this->lng->txt(
'pays_bill');
194 case $this->pobject->PAY_METHOD_BMF:
195 $f_result[$counter][] = $this->lng->txt(
'pays_bmf');
198 case $this->pobject->PAY_METHOD_PAYPAL:
199 $f_result[$counter][] = $this->lng->txt(
'pays_paypal');
203 $f_result[$counter][] = $tmp_user->getFullname().
' ['.$tmp_user->getLogin().
']';
211 $this->ctrl->setParameter($this,
"pobject_id",$data[
'pobject_id']);
212 # $link_change = "<a href=\"".$this->ctrl->getLinkTarget($this,"editDetails")."\"> ".
213 # $img_change."</a>";
214 $link_change =
"<div class=\"il_ContainerItemCommands\"><a class=\"il_ContainerItemCommand\" href=\"".$this->ctrl->getLinkTarget($this,
"editDetails").
"\">".$this->lng->txt(
"edit").
"</a></div>";
216 $f_result[$counter][] = $link_change;
228 if(!(
int)
$_GET[
'pobject_id'])
235 $this->ctrl->setParameter($this,
'pobject_id', (
int)$_GET[
'pobject_id']);
237 $this->
showButton(
'editDetails', $this->lng->txt(
'paya_edit_details'));
238 $this->
showButton(
'editPrices', $this->lng->txt(
'paya_edit_prices'));
240 $this->tpl->setCurrentBlock(
'btn_cell');
241 $this->tpl->setVariable(
'BTN_LINK', $this->ctrl->getLinkTargetByClass(array(
'ilpageobjectgui'),
'edit'));
242 $this->tpl->setVariable(
'BTN_TXT', $this->lng->txt(
'pay_edit_abstract'));
243 $this->tpl->parseCurrentBlock();
245 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paya_edit.html',
'payment');
249 $this->tpl->setCurrentBlock(
"confirm_delete");
250 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
251 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
252 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDelete');
253 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'confirm'));
254 $this->tpl->parseCurrentBlock();
259 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
261 $oForm->setFormAction($this->ctrl->getFormAction($this,
'updateDetails'));
262 $oForm->setTitle($tmp_obj->getTitle());
268 $oForm->addItem($oPathGUI);
273 $oForm->addItem($oPurchasersGUI);
276 $oVendorsGUI =
new ilSelectInputGUI($this->lng->txt(
'paya_vendor'),
'vendor');
278 $oVendorsGUI->setValue($this->pobject->getVendorId());
279 $oForm->addItem($oVendorsGUI);
284 $oStatusGUI->setValue($this->pobject->getStatus());
285 $oForm->addItem($oStatusGUI);
288 $oPayMethodsGUI =
new ilSelectInputGUI($this->lng->txt(
'paya_pay_method'),
'pay_method');
290 $oPayMethodsGUI->setValue($this->pobject->getPayMethod());
291 $oForm->addItem($oPayMethodsGUI);
298 include_once
'Services/Payment/classes/class.ilShopTopics.php';
300 $topic_options = array();
301 $topic_options[
''] = $this->lng->txt(
'please_choose');
303 foreach($topics as $oTopic)
305 $topic_options[$oTopic->getId()] = $oTopic->getTitle();
308 $oTopicsGUI->setOptions($topic_options);
309 $oTopicsGUI->setValue($this->pobject->getTopicId());
310 $oForm->addItem($oTopicsGUI);
315 if(($webpath_file = $oFile->getCurrentImageWebPath()) !==
false)
317 $oThumbnail->setImage($webpath_file);
319 $oForm->addItem($oThumbnail);
322 $oForm->addCommandButton(
'updateDetails', $this->lng->txt(
'save'));
323 $oForm->addCommandButton(
'deleteObject', $this->lng->txt(
'delete'));
325 $this->tpl->setVariable(
'PAYMENT_OBJECT_FORM', $oForm->getHTML());
330 include_once
'./payment/classes/class.ilPaymentBookings.php';
332 if(!
$_GET[
'pobject_id'])
357 include_once
'./payment/classes/class.ilPaymentPrices.php';
358 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
360 if(!
$_GET[
'pobject_id'])
370 $this->pobject->delete();
374 $price_obj->deleteAllPrices();
395 switch($this->pobject->getPayMethod())
397 case $this->pobject->PAY_METHOD_NOT_SPECIFIED:
402 case $this->pobject->PAY_METHOD_BMF:
407 case $this->pobject->PAY_METHOD_PAYPAL:
420 include_once
'./payment/classes/class.ilPaymentPrices.php';
421 include_once
'./payment/classes/class.ilPaymentCurrency.php';
422 include_once
"./Services/Table/classes/class.ilTableGUI.php";
423 include_once
'./payment/classes/class.ilGeneralSettings.php';
429 if(!
$_GET[
'pobject_id'])
436 $this->ctrl->setParameter($this,
'pobject_id',(
int)
$_GET[
'pobject_id']);
438 $this->
showButton(
'editDetails',$this->lng->txt(
'paya_edit_details'));
439 $this->
showButton(
'editPrices',$this->lng->txt(
'paya_edit_prices'));
441 $this->tpl->setCurrentBlock(
'btn_cell');
442 $this->tpl->setVariable(
'BTN_LINK', $this->ctrl->getLinkTargetByClass(array(
'ilpageobjectgui'),
'edit'));
443 $this->tpl->setVariable(
'BTN_TXT', $this->lng->txt(
'pay_edit_abstract'));
444 $this->tpl->parseCurrentBlock();
447 # $this->__showPayMethodLink();
449 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paya_edit_prices.html',
'payment');
452 $prices = $price_obj->getPrices();
459 $this->tpl->setCurrentBlock(
"price_info");
460 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
461 $this->tpl->setVariable(
"CONFIRM_CMD",
'addPrice');
462 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'paya_add_price'));
463 $this->tpl->parseCurrentBlock();
472 $this->tpl->setCurrentBlock(
"cancel");
473 $this->tpl->setVariable(
"CANCEL_CMD",
'editPrices');
474 $this->tpl->setVariable(
"TXT_CANCEL",$this->lng->txt(
'cancel'));
475 $this->tpl->parseCurrentBlock();
477 $this->tpl->setCurrentBlock(
"price_info");
478 $this->tpl->setVariable(
"CONFIRM_FORMACTION",$this->ctrl->getFormAction($this));
479 $this->tpl->setVariable(
"CONFIRM_CMD",
'performDeletePrice');
480 $this->tpl->setVariable(
"TXT_CONFIRM",$this->lng->txt(
'paya_delete_price'));
481 $this->tpl->parseCurrentBlock();
488 $tpl->setCurrentBlock(
"tbl_form_header");
490 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
491 $tpl->parseCurrentBlock();
493 $tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
'tpl.paya_edit_prices_row.html',
'payment');
496 foreach($prices as $price)
500 $tpl->setCurrentBlock(
"tbl_content");
503 $tpl->setVariable(
"CHECKBOX",ilUtil::formCheckBox(in_array($price[
'price_id'],
$_SESSION[
'price_ids']) ? 1 : 0,
505 $price[
'price_id']));
506 $tpl->setVariable(
"DURATION_NAME",
'prices['.$price[
'price_id'].
'][duration]');
507 $tpl->setVariable(
"DURATION",$price[
'duration']);
508 $tpl->setVariable(
"MONTH",$this->lng->txt(
'paya_months'));
509 $tpl->setVariable(
"UNIT_NAME",
'prices['.$price[
'price_id'].
'][unit_value]');
510 $tpl->setVariable(
"UNIT",$price[
'unit_value']);
511 # $tpl->setVariable("SHORTFORM",$this->lng->txt('currency_'.$currency['unit']));
512 $tpl->setVariable(
"SHORTFORM",$genSet->get(
"currency_unit"));
514 $tpl->setVariable(
"SUB_UNIT_NAME",
'prices['.$price[
'price_id'].
'][sub_unit_value]');
515 $tpl->setVariable(
"SUB_UNIT",$price[
'sub_unit_value']);
516 # $tpl->setVariable("SUB_UNIT_TXT",$this->lng->txt('currency_'.$currency['sub_unit']));
517 $tpl->setVariable(
"SUB_UNIT_TXT",$genSet->get(
"currency_subunit"));
518 $tpl->parseCurrentBlock();
524 $tpl->setCurrentBlock(
"tbl_action_button");
525 $tpl->setVariable(
"BTN_NAME",
"deletePrice");
526 $tpl->setVariable(
"BTN_VALUE",$this->lng->txt(
"paya_delete_price"));
527 $tpl->parseCurrentBlock();
529 $tpl->setCurrentBlock(
"plain_buttons");
530 $tpl->setVariable(
"PBTN_NAME",
"updatePrice");
531 $tpl->setVariable(
"PBTN_VALUE",$this->lng->txt(
"paya_update_price"));
532 $tpl->parseCurrentBlock();
534 $tpl->setCurrentBlock(
"plain_buttons");
535 $tpl->setVariable(
"PBTN_NAME",
"addPrice");
536 $tpl->setVariable(
"PBTN_VALUE",$this->lng->txt(
"paya_add_price"));
537 $tpl->parseCurrentBlock();
540 $tpl->setCurrentBlock(
"tbl_action_row");
541 $tpl->setVariable(
"TPLPATH",$this->tpl->tplPath);
542 $tpl->setVariable(
"COLUMN_COUNTS",4);
544 $tpl->parseCurrentBlock();
548 $tbl->setTemplate(
$tpl);
551 $tbl->setStyle(
'table',
'std');
555 $tbl->setTitle($tmp_obj->getTitle(),
556 "icon_".$tmp_obj->getType().
"_b.gif",
557 $this->lng->txt(
"objs_".$tmp_obj->getType()));
558 $tbl->setHeaderNames(array(
'',
559 $this->lng->txt(
'duration'),
560 $this->lng->txt(
'price_a'),
562 $tbl->setHeaderVars(array(
"",
566 array(
"ref_id" => $this->cur_ref_id));
569 $tbl->setLimit($_GET[
"limit"]);
570 $tbl->setOffset($_GET[
"offset"]);
571 $tbl->setMaxCount(count($price_obj->getPrices()));
573 $tbl->disable(
"sort");
578 $this->tpl->setVariable(
"PRICES_TABLE",
$tpl->get());
585 if(!
$_GET[
'pobject_id'])
593 include_once
'./payment/classes/class.ilGeneralSettings.php';
597 $this->ctrl->setParameter($this,
'pobject_id',(
int)
$_GET[
'pobject_id']);
601 $this->
showButton(
'editDetails',$this->lng->txt(
'paya_edit_details'));
602 $this->
showButton(
'editPrices',$this->lng->txt(
'paya_edit_prices'));
603 # $this->__showPayMethodLink();
605 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paya_add_price.html',
'payment');
607 $this->tpl->setVariable(
"ADD_FORMACTION",$this->ctrl->getFormAction($this));
611 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_'.$tmp_obj->getType()));
612 $this->tpl->setVariable(
"TITLE",$tmp_obj->getTitle());
613 $this->tpl->setVariable(
"DESCRIPTION",$this->lng->txt(
'paya_add_price_title'));
616 # $this->tpl->setVariable("TXT_PRICE_A",$this->lng->txt('currency_euro'));
617 # $this->tpl->setVariable("TXT_PRICE_B",$this->lng->txt('currency_cent'));
618 $this->tpl->setVariable(
"TXT_PRICE_A",$genSet->get(
"currency_unit"));
619 $this->tpl->setVariable(
"TXT_PRICE_B",$genSet->get(
"currency_subunit"));
621 $this->tpl->setVariable(
"MONTH",$this->lng->txt(
'paya_months'));
622 $this->tpl->setVariable(
"TXT_DURATION",$this->lng->txt(
'duration'));
623 $this->tpl->setVariable(
"TXT_PRICE",$this->lng->txt(
'price_a'));
624 $this->tpl->setVariable(
"CANCEL",$this->lng->txt(
'cancel'));
625 $this->tpl->setVariable(
"ADD",$this->lng->txt(
'paya_add_price'));
627 $this->tpl->setVariable(
"DURATION",$_POST[
'duration']);
628 $this->tpl->setVariable(
"UNIT_VALUE",$_POST[
'unit']);
629 $this->tpl->setVariable(
"SUB_UNIT",$_POST[
'SUB_UNIT']);
636 if(!
$_GET[
'pobject_id'])
644 include_once
'./payment/classes/class.ilPaymentPrices.php';
645 include_once
'./payment/classes/class.ilPaymentCurrency.php';
651 $prices->setDuration($_POST[
'duration']);
652 $prices->setUnitValue($_POST[
'unit']);
653 $prices->setSubUnitValue($_POST[
'sub_unit']);
654 $prices->setCurrency($currency[1][
'currency_id']);
656 if(!$prices->validate())
675 if(!
$_GET[
'pobject_id'])
690 include_once
'./payment/classes/class.ilPaymentPrices.php';
694 foreach(
$_SESSION[
'price_ids'] as $price_id)
696 $prices->delete($price_id);
700 if(!count($prices->getPrices()))
704 $this->pobject->setStatus($this->pobject->STATUS_NOT_BUYABLE);
705 $this->pobject->update();
718 if(!
$_GET[
'pobject_id'])
726 if(!count($_POST[
'price_ids']))
733 $_SESSION[
'price_ids'] = $_POST[
'price_ids'];
741 include_once
'./payment/classes/class.ilPaymentPrices.php';
743 if(!
$_GET[
'pobject_id'])
752 $this->ctrl->setParameter($this,
'pobject_id',(
int) $_GET[
'pobject_id']);
755 foreach($_POST[
'prices'] as $price_id => $price)
757 $old_price = $po->getPrice($price_id);
759 $po->setDuration($price[
'duration']);
760 $po->setUnitValue($price[
'unit_value']);
761 $po->setSubUnitValue($price[
'sub_unit_value']);
762 $po->setCurrency($old_price[
'currency']);
776 foreach($_POST[
'prices'] as $price_id => $price)
778 $old_price = $po->getPrice($price_id);
780 $po->setDuration($price[
'duration']);
781 $po->setUnitValue($price[
'unit_value']);
782 $po->setSubUnitValue($price[
'sub_unit_value']);
783 $po->setCurrency($old_price[
'currency']);
785 $po->update($price_id);
796 if(!
$_GET[
'pobject_id'])
804 $this->ctrl->setParameter($this,
'pobject_id', (
int)$_GET[
'pobject_id']);
807 $old_pay_method = $this->pobject->getPayMethod();
808 $old_status = $this->pobject->getStatus();
811 if($old_status == $this->pobject->STATUS_NOT_BUYABLE and
812 (
int) $_POST[
'status'] != $old_status)
815 switch((
int) $_POST[
'pay_method'])
817 case $this->pobject->PAY_METHOD_NOT_SPECIFIED:
823 case $this->pobject->PAY_METHOD_BILL:
824 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
827 if(!$bill_vendor->validate())
840 include_once
'./payment/classes/class.ilPaymentPrices.php';
843 if(!count($prices_obj->getPrices()))
852 $this->pobject->setStatus((
int)$_POST[
'status']);
853 $this->pobject->setVendorId((
int)$_POST[
'vendor']);
854 $this->pobject->setPayMethod((
int)$_POST[
'pay_method']);
855 $this->pobject->setTopicId((
int)$_POST[
'topic_id']);
857 if((
int)$_POST[
'thumbnail_delete'])
862 else if($_FILES[
'thumbnail'][
'tmp_name'] !=
'')
864 $this->lng->loadLanguageModule(
'form');
865 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
867 if($oThumbnail->checkInput())
870 if(($oFile->storeUploadedFile($_FILES[
'thumbnail'])) !==
false)
882 $this->pobject->update();
894 include_once
'./payment/classes/class.ilPaymentObjectSelector.php';
896 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.paya_object_selector.html",
'payment');
897 $this->
showButton(
'showObjects',$this->lng->txt(
'back'));
902 $exp =
new ilPaymentObjectSelector($this->ctrl->getLinkTarget($this,
'showObjectSelector'), strtolower(get_class($this)));
903 $exp->
setExpand(
$_GET[
"paya_link_expand"] ?
$_GET[
"paya_link_expand"] : $tree->readRootId());
904 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showObjectSelector'));
908 $this->tpl->setVariable(
"EXPLORER",$exp->getOutput());
915 if(!(
int)
$_GET[
'sell_id'])
921 $this->
showButton(
'showObjectSelector',$this->lng->txt(
'back'));
924 $this->ctrl->setParameter($this,
'sell_id', (
int)$_GET[
'sell_id']);
926 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
928 $oForm->setFormAction($this->ctrl->getFormAction($this,
'updateDetails'));
929 $oForm->setTitle($this->lng->txt(
'details'));
936 $oTitleGUI->
setValue($tmp_obj->getTitle());
937 $oForm->addItem($oTitleGUI);
941 $oDescriptionGUI->
setValue($tmp_obj->getDescription());
942 $oForm->addItem($oDescriptionGUI);
946 $oOwnerGUI->
setValue($tmp_obj->getOwnerName());
947 $oForm->addItem($oOwnerGUI);
952 $oForm->addItem($oPathGUI);
955 $oVendorsGUI =
new ilSelectInputGUI($this->lng->txt(
'paya_vendor'),
'vendor');
957 $oForm->addItem($oVendorsGUI);
960 $oForm->addCommandButton(
'addObject', $this->lng->txt(
'next'));
961 $oForm->addCommandButton(
'showObjects', $this->lng->txt(
'cancel'));
963 $this->tpl->setVariable(
'ADM_CONTENT', $oForm->getHTML());
968 if(!
$_GET[
'sell_id'])
974 if(!(
int)$_POST[
'vendor'])
987 include_once
'payment/classes/class.ilPaymentObject.php';
991 $p_obj->setRefId((
int)
$_GET[
'sell_id']);
992 $p_obj->setStatus($p_obj->STATUS_NOT_BUYABLE);
993 $p_obj->setPayMethod($p_obj->PAY_METHOD_NOT_SPECIFIED);
994 $p_obj->setVendorId((
int)$_POST[
'vendor']);
995 $p_obj->setTopicId((
int)$_POST[
'topic_id']);
997 if($new_id = $p_obj->add())
1000 $_GET[
'pobject_id'] = $new_id;
1012 include_once
'payment/classes/class.ilPaymentVendors.php';
1018 $vendors[] = $this->user_obj->getId();
1022 $vendors = array_merge($vendors, $vend);
1027 $options[
$vendor] = $tmp_obj->getFullname().
' ['.$tmp_obj->getLogin().
']';
1036 $option[$this->pobject->STATUS_NOT_BUYABLE] = $this->lng->txt(
'paya_not_buyable');
1037 $option[$this->pobject->STATUS_BUYABLE] = $this->lng->txt(
'paya_buyable');
1038 $option[$this->pobject->STATUS_EXPIRES] = $this->lng->txt(
'paya_expires');
1045 include_once
'payment/classes/class.ilPayMethods.php';
1049 $options[$this->pobject->PAY_METHOD_NOT_SPECIFIED] = $this->lng->txt(
'paya_pay_method_not_specified');
1052 $options[$this->pobject->PAY_METHOD_BILL] = $this->lng->txt(
'pays_bill');
1056 $options[$this->pobject->PAY_METHOD_BMF] = $this->lng->txt(
'pays_bmf');
1060 $options[$this->pobject->PAY_METHOD_PAYPAL] = $this->lng->txt(
'pays_paypal');
1068 switch($this->pobject->getPayMethod())
1070 case $this->pobject->PAY_METHOD_NOT_SPECIFIED:
1071 $this->
showButton(
'editPayMethod',$this->lng->txt(
'paya_edit_pay_method'));
1074 case $this->pobject->PAY_METHOD_BILL:
1076 $this->ctrl->setParameterByClass(
'ilpaymentbilladmingui',
'pobject_id',(
int)
$_GET[
'pobject_id']);
1077 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
1078 $this->tpl->setCurrentBlock(
"btn_cell");
1079 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilpaymentbilladmingui'));
1080 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'paya_edit_pay_method'));
1081 $this->tpl->parseCurrentBlock();
1084 case $this->pobject->PAY_METHOD_BMF:
1085 $this->
showButton(
'editPayMethod',$this->lng->txt(
'paya_edit_pay_method'));
1088 case $this->pobject->PAY_METHOD_PAYPAL:
1089 $this->
showButton(
'editPayMethod',$this->lng->txt(
'paya_edit_pay_method'));
1096 $tpl =& $tbl->getTemplateObject();
1099 $tpl->setCurrentBlock(
"tbl_form_header");
1101 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
1102 $tpl->parseCurrentBlock();
1121 $tbl->setTitle($this->lng->txt(
"objects"),
"icon_pays.gif",$this->lng->txt(
"objects"));
1122 $tbl->setHeaderNames(array($this->lng->txt(
"title"),
1123 $this->lng->txt(
"status"),
1124 $this->lng->txt(
"paya_pay_method"),
1125 $this->lng->txt(
"paya_vendor"),
1126 $this->lng->txt(
"paya_count_purchaser"),
1128 $header_params = $this->ctrl->getParameterArray($this,
'');
1129 $tbl->setHeaderVars(array(
"title",
1134 "options"),$header_params);
1140 $tbl->setColumnWidth(array(
"15%",
"15%",
"15%",
"20%",
"20%"));
1142 # $this->setTableGUIBasicData($tbl,$a_result_set);
1144 $offset =
$_GET[
"offset"];
1145 $order =
$_GET[
"sort_by"];
1146 $direction =
$_GET[
"sort_order"] ?
$_GET[
'sort_order'] :
'desc';
1148 $tbl->setOrderColumn($order,
'order_date');
1149 $tbl->setOrderDirection($direction);
1150 $tbl->setOffset($offset);
1151 $tbl->setLimit(
$_GET[
"limit"]);
1152 $tbl->setMaxCount(count($a_result_set));
1153 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1154 $tbl->setData($a_result_set);
1158 $this->tpl->setVariable(
"OBJECTS_TABLE",$tbl->tpl->get());
1168 $path = $tree->getPathFull($a_ref_id);
1171 foreach($path as
$data)
1173 $html .= $data[
'title'].
' > ';
1175 return substr($html,0,-2);
1180 include_once
'./payment/classes/class.ilPaymentObject.php';