HEX
Server: Apache
System: Linux vps.teamads.com 4.18.0-553.126.1.el8_10.x86_64 #1 SMP Thu May 28 06:44:09 EDT 2026 x86_64
User: teamadsc (1024)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/teamadsc/public_html/wp-content/plugins/arprice/arprice_cs/includes/arprice-cs/controls.php
<?php

/**
 * Element Controls: ARPrice
 */
global $wpdb;
$tablename = $wpdb->prefix . 'arp_arprice';

$results = $wpdb->get_results($wpdb->prepare("SELECT ID,table_name FROM `{$tablename}` WHERE is_template = %d", 0));

$tables = array();

$tables[0]['value'] = '';
$tables[0]['label'] = esc_html__('Please Select Pricing Table', 'ARPrice');

if (!empty($results)) {
    $n = 1;
    foreach ($results as $key => $table) {
        $tables[$n]['value'] = $table->ID;
        $tables[$n]['label'] = $table->table_name . ' [' . $table->ID . ']';
        $n++;
    }
}

$arprice_cs_control = array();

$arprice_cs_control['arprice_templates'] = array(
    'type' => 'select',
    'ui' => array(
        'title' => esc_html__('Select Pricing Table', 'ARPrice')
    ),
    'options' => array(
        'choices' => $tables
    )
);

return $arprice_cs_control;