Example #1
0
            }
            $purchase = array(BaClient::PURCHASE_DEFAULT => $L['Default'], BaClient::PURCHASE_UNLIMITED => $L['ba_unlimited'], BaClient::PURCHASE_YEARLY => $L['ba_pt_yearly'], BaClient::PURCHASE_MONTHLY => $L['ba_pt_monthly'], BaClient::PURCHASE_WEEKLY => $L['ba_pt_weekly'], BaClient::PURCHASE_DAILY => $L['ba_pt_daily']);
            $temp_array = array();
            if ($client->bac_id > 0) {
                $item_link = cot_url('admin', array('m' => 'other', 'p' => 'banners', 'n' => 'clients', 'a' => 'edit', 'id' => $client->bac_id));
                $temp_array = array('URL' => $item_link, 'ID' => $client->bac_id, 'TITLE' => htmlspecialchars($client->bac_title), 'PUBLISHED' => $client->bac_published ? $L['Yes'] : $L['No'], 'PURCHASE' => $client->bac_purchase_type, 'PURCHASE_TEXT' => $purchase[$client->bac_purchase_type]);
                /* === Hook === */
                foreach ($extp_main as $pl) {
                    include $pl;
                }
                /* ===== */
                $cacheitem && ($cache[$client->bac_id] = $temp_array);
            } else {
                // Клиента не существует
            }
        }
        $return_array = array();
        foreach ($temp_array as $key => $val) {
            $return_array[$tagPrefix . $key] = $val;
        }
        return $return_array;
    }
    public static function fieldList()
    {
        $fields = array('id' => array('type' => 'int', 'description' => 'id', 'primary' => true), 'title' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'nullable' => false, 'description' => cot::$L['Title']), 'email' => array('type' => 'varchar', 'length' => '255', 'default' => '', 'description' => cot::$L['Email']), 'extrainfo' => array('type' => 'text', 'default' => '', 'description' => cot::$L['brs_extrainfo']), 'published' => array('type' => 'tinyint', 'length' => '1', 'default' => 0, 'description' => cot::$L['brs_published']), 'purchase_type' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_purchase_type']), 'track_clicks' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_track_clicks']), 'track_impressions' => array('type' => 'tinyint', 'default' => -1, 'description' => cot::$L['brs_track_impressions']));
        return $fields;
    }
}
// Class initialization for some static variables
brs_model_Client::__init();