/*==================================================================*\ ###################################################################### # # # Copyright 2005 Arca Solutions, Inc. All Rights Reserved. # # # # This file may not be redistributed in whole or part. # # eDirectory is licensed on a per-domain basis. # # # # ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- # # # # http://www.edirectory.com | http://www.edirectory.com/license.html # ###################################################################### \*==================================================================*/ # ---------------------------------------------------------------------------------------------------- # * FILE: /functions/payment_funct.php # ---------------------------------------------------------------------------------------------------- function payment_getRenewalPeriod($item) { return constant(string_strtoupper($item)."_RENEWAL_PERIOD"); } function payment_getRenewalCycle($item) { return string_substr(constant(string_strtoupper($item)."_RENEWAL_PERIOD"), 0, string_strlen(constant(string_strtoupper($item)."_RENEWAL_PERIOD"))-1); } function payment_getRenewalUnit($item) { return string_substr(constant(string_strtoupper($item)."_RENEWAL_PERIOD"), string_strlen(constant(string_strtoupper($item)."_RENEWAL_PERIOD"))-1); } function payment_getRenewalUnitName($item) { $unit = payment_getRenewalUnit($item); if ($unit == "Y") $unitname = system_showText(LANG_YEAR); elseif ($unit == "M") $unitname = system_showText(LANG_MONTH); elseif ($unit == "D") $unitname = system_showText(LANG_DAY); return $unitname; } function payment_getRenewalUnitNamePlural($item) { $unit = payment_getRenewalUnit($item); if ($unit == "Y") $unitname = system_showText(LANG_YEAR_PLURAL); elseif ($unit == "M") $unitname = system_showText(LANG_MONTH_PLURAL); elseif ($unit == "D") $unitname = system_showText(LANG_DAY_PLURAL); return $unitname; } function payment_writeSettingPaymentFile($array_PaymentSetting) { $filePath = EDIRECTORY_ROOT.'/custom/domain_'.SELECTED_DOMAIN_ID.'/payment/payment.inc.php'; if (!$file = fopen($filePath, 'w+')) { return false; } $buffer = "