pay_top_conf - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of pay_top_conf.php
- <?php
- // Global variables
- function cot_cfg_paytop()
- {
- global $cfg;
- $tpaset = str_replace("\r\n", "\n", $cfg['plugin']['paytop']['paytopareas']);
- $tpaset = explode("\n", $tpaset);
- $paytopset = array();
- foreach ($tpaset as $lineset)
- {
- $lines = explode("|", $lineset);
- $lines[0] = trim($lines[0]);
- $lines[1] = trim($lines[1]);
- $lines[2] = (float)trim($lines[2]);
- $lines[3] = (int)trim($lines[3]);
- $lines[4] = (int)trim($lines[4]);
- if (!empty($lines[0]) && $lines[2] > 0)
- {
- $lines[3] = (!empty($lines[3])) ? $lines[3] : 2592000;
- $lines[4] = (!empty($lines[4])) ? $lines[4] : 4;
- $paytopset[$lines[0]]['name'] = $lines[1];
- $paytopset[$lines[0]]['cost'] = $lines[2];
- $paytopset[$lines[0]]['period'] = $lines[3];
- $paytopset[$lines[0]]['count'] = $lines[4];
- }
- }
- return $paytopset;
- }
File Description
- pay_top_conf
- PHP Code
- 03 Jul-2021
- 827 Bytes
You can Share it:
Latest PHP Pastes