cot_cfg_paytop - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
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 cot_cfg_paytop.php
- <?php
- function cot_get_paytop ($area='', $count=0, $order = "s.service_id ASC")
- {
- global $db, $cfg, $sys, $db_payments_services, $db_users;
- $pt_cfg = cot_cfg_paytop();
- if ($area не існує в cot_cfg_paytop)
- {
- cot_die(404);
- }
- if($count == 0)
- {
- $count = $pt_cfg[$area]['count'];
- }
- if (empty($area) && !isset($pt_cfg[$area]['cost']))
- {
- return false;
- }
- $paytopcount = $db->query("SELECT COUNT(*) FROM $db_payments_services as s
- LEFT JOIN $db_users AS u ON u.user_id=s.service_userid
- WHERE u.user_id>0 AND s.service_area='paytop.".$db->prep($area)."' AND service_expire > " . $sys['now'])->fetchColumn();
- $paytops = $db->query("SELECT * FROM $db_payments_services as s
- LEFT JOIN $db_users AS u ON u.user_id=s.service_userid
- WHERE u.user_id>0 AND s.service_area='paytop.".$db->prep($area)."' AND service_expire > " . $sys['now'] . " ORDER BY $order LIMIT " . $count)->fetchAll();
- }