<?php
/**
 * Добавляем таблицы для модуля IP-телефонии Oktell
 * Created by: Andrey
 * Release: 12.06.2014
 * App Version: 2.0.3
 * Copyright: Clientbase (www.clientbase.ru)
 */

run_query("CREATE TABLE IF NOT EXISTS " . $config['table_prefix'] . "module_oktell_servers (id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
                                                                                        name VARCHAR(255) NOT NULL,
                                                                                        server VARCHAR(255) NOT NULL,
                                                                                        city_code int NOT NULL,
                                                                                        inter_code int NOT NULL,
                                                                                        from_city_code int NOT NULL,
                                                                                        to_city_code int NOT NULL,
                                                                                        max_phone_numbers int NOT NULL);");
run_query("CREATE TABLE IF NOT EXISTS " . $config['table_prefix'] . "module_oktell_users   (id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
                                                                                        server_id int NOT NULL,
                                                                                        user_id int NOT NULL,
                                                                                        login VARCHAR(255) NOT NULL,
                                                                                        password VARCHAR(255) NOT NULL,
                                                                                        from_browser int NOT NULL);");
?>