Initial commit
This commit is contained in:
commit
fc503adc66
BIN
SNA - Navodila za namestitev aplikacije.pdf
Normal file
BIN
SNA - Navodila za namestitev aplikacije.pdf
Normal file
Binary file not shown.
BIN
SNA - Navodila za uporabo.pdf
Normal file
BIN
SNA - Navodila za uporabo.pdf
Normal file
Binary file not shown.
360
digital_atlas.sql
Normal file
360
digital_atlas.sql
Normal file
|
@ -0,0 +1,360 @@
|
||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 4.5.4.1deb2ubuntu2
|
||||||
|
-- http://www.phpmyadmin.net
|
||||||
|
--
|
||||||
|
-- Gostitelj: localhost
|
||||||
|
-- Čas nastanka: 12. avg 2017 ob 12.57
|
||||||
|
-- Različica strežnika: 5.7.19-0ubuntu0.16.04.1
|
||||||
|
-- Različica PHP: 7.0.22-0ubuntu0.16.04.1
|
||||||
|
|
||||||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
SET time_zone = "+00:00";
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Zbirka podatkov: `digital_atlas`
|
||||||
|
--
|
||||||
|
CREATE DATABASE IF NOT EXISTS `digital_atlas` DEFAULT CHARACTER SET utf8 COLLATE utf8_slovenian_ci;
|
||||||
|
USE `digital_atlas`;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `dialects`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `dialects` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`type` tinyint(4) NOT NULL COMMENT '/1-skupina, 2-narecje, 3-podnarecje',
|
||||||
|
`id_parent` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Odloži podatke za tabelo `dialects`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `dialects` (`id`, `name`, `type`, `id_parent`) VALUES
|
||||||
|
(1, 'gorenjska narečna skupina', 1, NULL),
|
||||||
|
(2, 'gorenjsko narečje', 2, 1),
|
||||||
|
(3, 'vzhodnogorenjsko podnarečje', 3, 2),
|
||||||
|
(4, 'selško narečje', 2, 1),
|
||||||
|
(5, 'dolenjska narečna skupina', 1, NULL),
|
||||||
|
(6, 'dolenjsko narečje', 2, 5),
|
||||||
|
(7, 'vzhodnodolenjsko podnarečje', 3, 6),
|
||||||
|
(8, 'severnobelokranjsko narečje', 2, 5),
|
||||||
|
(9, 'južnobelokranjsko narečje', 2, 5),
|
||||||
|
(10, 'kostelsko narečje', 2, 5),
|
||||||
|
(11, 'mešani kočevski govori', 2, 5),
|
||||||
|
(12, 'štajerska narečna skupina', 1, NULL),
|
||||||
|
(13, 'srednjesavinjsko narečje', 2, 12),
|
||||||
|
(14, 'zgornjesavinjsko narečje', 2, 12),
|
||||||
|
(15, 'solčavsko podnarečje', 3, 14),
|
||||||
|
(16, 'srednještajersko narečje', 2, 12),
|
||||||
|
(17, 'južnopohorsko narečje', 2, 12),
|
||||||
|
(18, 'kozjaško podnarečje', 3, 17),
|
||||||
|
(19, 'kozjansko-bizeljsko narečje', 2, 12),
|
||||||
|
(20, 'posavsko narečje', 2, 12),
|
||||||
|
(21, 'zagorsko-trboveljsko podnarečje', 3, 20),
|
||||||
|
(22, 'laško podnarečje ', 3, 20),
|
||||||
|
(23, 'sevniško-krško podnarečje', 3, 20),
|
||||||
|
(24, 'panonska narečna skupina', 1, NULL),
|
||||||
|
(25, 'prekmursko narečje ', 2, 24),
|
||||||
|
(26, 'slovenskogoriško narečje', 2, 24),
|
||||||
|
(27, 'prleško narečje ', 2, 24),
|
||||||
|
(28, 'haloško narečje', 2, 24),
|
||||||
|
(29, 'koroška narečna skupina', 1, NULL),
|
||||||
|
(30, 'severnopohorsko-remšniško narečje', 2, 29),
|
||||||
|
(31, 'mežiško narečje', 2, 29),
|
||||||
|
(32, 'podjunsko narečje', 2, 29),
|
||||||
|
(33, 'rožansko narečje', 2, 29),
|
||||||
|
(34, 'obirsko narečje', 2, 29),
|
||||||
|
(35, 'ziljsko narečje', 2, 29),
|
||||||
|
(36, 'kranjskogorsko podnarečje', 3, 35),
|
||||||
|
(37, 'primorska narečna skupina', 1, NULL),
|
||||||
|
(38, 'rezijansko narečje', 2, 37),
|
||||||
|
(39, 'obsoško narečje', 2, 37),
|
||||||
|
(40, 'tersko narečje', 2, 37),
|
||||||
|
(41, 'nadiško narečje', 2, 37),
|
||||||
|
(42, 'briško narečje', 2, 37),
|
||||||
|
(43, 'kraško narečje', 2, 37),
|
||||||
|
(44, 'banjško podnarečje', 3, 43),
|
||||||
|
(45, 'istrsko narečje', 2, 37),
|
||||||
|
(46, 'rižansko podnarečje', 3, 45),
|
||||||
|
(47, 'šavrinsko podnarečje', 3, 45),
|
||||||
|
(48, 'notranjsko narečje', 2, 37),
|
||||||
|
(49, 'čiško narečje', 2, 37),
|
||||||
|
(50, 'rovtarska narečna skupina', 1, NULL),
|
||||||
|
(51, 'tolminsko narečje', 2, 50),
|
||||||
|
(52, 'baško podnarečje', 3, 51),
|
||||||
|
(53, 'cerkljansko narečje', 2, 50),
|
||||||
|
(54, 'poljansko narečje', 2, 50),
|
||||||
|
(55, 'škofjeloško narečje', 2, 50),
|
||||||
|
(56, 'črnovrško narečje', 2, 50),
|
||||||
|
(57, 'horjulsko narečje', 2, 50);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `lexems`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `lexems` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`title` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`icon` varchar(500) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`id_word` int(11) NOT NULL,
|
||||||
|
`icon_color` varchar(255) COLLATE utf8_slovenian_ci NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `locations`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `locations` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`short_name` varchar(50) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`lat` decimal(10,6) NOT NULL,
|
||||||
|
`long` decimal(10,6) NOT NULL,
|
||||||
|
`id_dialect` int(11) NOT NULL,
|
||||||
|
`id_subdialect` int(11) NOT NULL,
|
||||||
|
`id_subsubdialect` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `subjects`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `subjects` (
|
||||||
|
`id` int(1) NOT NULL,
|
||||||
|
`title` varchar(255) COLLATE utf8_slovenian_ci NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `subject_locations`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `subject_locations` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`id_subject` int(11) DEFAULT NULL,
|
||||||
|
`id_location` int(11) NOT NULL,
|
||||||
|
`checked` tinyint(4) NOT NULL DEFAULT '1'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `transcriptions`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `transcriptions` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`phonetic_writing` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`audio` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`id_lexem` int(1) NOT NULL,
|
||||||
|
`id_location` int(11) NOT NULL,
|
||||||
|
`trans_text` text COLLATE utf8_slovenian_ci NOT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `users`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `users` (
|
||||||
|
`id` int(1) NOT NULL,
|
||||||
|
`username` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`name` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`lastname` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`password_hash` varchar(255) COLLATE utf8_slovenian_ci NOT NULL,
|
||||||
|
`sess_expiration` int(60) NOT NULL DEFAULT '60'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Odloži podatke za tabelo `users`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `users` (`id`, `username`, `name`, `lastname`, `password_hash`, `sess_expiration`) VALUES
|
||||||
|
(1, 'admin', 'Admin', '', '$2y$10$bvfsnL9h3A5Dt6IaRT.m7eh/4GXmSgA/5s6wBUHJYrGgBtjDVoxYq', 60);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Struktura tabele `words`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `words` (
|
||||||
|
`id` int(11) NOT NULL,
|
||||||
|
`title` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`image` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`comment` varchar(255) COLLATE utf8_slovenian_ci NOT NULL DEFAULT '',
|
||||||
|
`id_subject` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_slovenian_ci;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi zavrženih tabel
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `dialects`
|
||||||
|
--
|
||||||
|
ALTER TABLE `dialects`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `FK_dialects_dialects` (`id_parent`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `lexems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `lexems`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `FK_leksems_words` (`id_word`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `locations`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `FK_locations_dialects` (`id_dialect`),
|
||||||
|
ADD KEY `FK_locations_dialects_2` (`id_subdialect`),
|
||||||
|
ADD KEY `FK_locations_dialects_3` (`id_subsubdialect`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `subjects`
|
||||||
|
--
|
||||||
|
ALTER TABLE `subjects`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `subject_locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `subject_locations`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `FK_subject_locations_locations` (`id_location`),
|
||||||
|
ADD KEY `FK_subject_locations_subjects` (`id_subject`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `transcriptions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `transcriptions`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD UNIQUE KEY `id_location_uniq` (`id_location`,`id_lexem`),
|
||||||
|
ADD KEY `id_word` (`id_lexem`),
|
||||||
|
ADD KEY `id_location` (`id_location`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `users`
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Indeksi tabele `words`
|
||||||
|
--
|
||||||
|
ALTER TABLE `words`
|
||||||
|
ADD PRIMARY KEY (`id`),
|
||||||
|
ADD KEY `id_subject` (`id_subject`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT zavrženih tabel
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `dialects`
|
||||||
|
--
|
||||||
|
ALTER TABLE `dialects`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `lexems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `lexems`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `locations`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `subjects`
|
||||||
|
--
|
||||||
|
ALTER TABLE `subjects`
|
||||||
|
MODIFY `id` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `subject_locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `subject_locations`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `transcriptions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `transcriptions`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `users`
|
||||||
|
--
|
||||||
|
ALTER TABLE `users`
|
||||||
|
MODIFY `id` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
||||||
|
--
|
||||||
|
-- AUTO_INCREMENT tabele `words`
|
||||||
|
--
|
||||||
|
ALTER TABLE `words`
|
||||||
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||||
|
--
|
||||||
|
-- Omejitve tabel za povzetek stanja
|
||||||
|
--
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `dialects`
|
||||||
|
--
|
||||||
|
ALTER TABLE `dialects`
|
||||||
|
ADD CONSTRAINT `FK_dialects_dialects` FOREIGN KEY (`id_parent`) REFERENCES `dialects` (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `lexems`
|
||||||
|
--
|
||||||
|
ALTER TABLE `lexems`
|
||||||
|
ADD CONSTRAINT `FK_leksems_words` FOREIGN KEY (`id_word`) REFERENCES `words` (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `locations`
|
||||||
|
ADD CONSTRAINT `FK_locations_dialects` FOREIGN KEY (`id_dialect`) REFERENCES `dialects` (`id`),
|
||||||
|
ADD CONSTRAINT `FK_locations_dialects_2` FOREIGN KEY (`id_subdialect`) REFERENCES `dialects` (`id`),
|
||||||
|
ADD CONSTRAINT `FK_locations_dialects_3` FOREIGN KEY (`id_subsubdialect`) REFERENCES `dialects` (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `subject_locations`
|
||||||
|
--
|
||||||
|
ALTER TABLE `subject_locations`
|
||||||
|
ADD CONSTRAINT `FK_subject_locations_locations` FOREIGN KEY (`id_location`) REFERENCES `locations` (`id`),
|
||||||
|
ADD CONSTRAINT `FK_subject_locations_subjects` FOREIGN KEY (`id_subject`) REFERENCES `subjects` (`id`) ON DELETE SET NULL ON UPDATE SET NULL;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `transcriptions`
|
||||||
|
--
|
||||||
|
ALTER TABLE `transcriptions`
|
||||||
|
ADD CONSTRAINT `FK_transcriptions_leksems` FOREIGN KEY (`id_lexem`) REFERENCES `lexems` (`id`),
|
||||||
|
ADD CONSTRAINT `FK_transcriptions_locations` FOREIGN KEY (`id_location`) REFERENCES `locations` (`id`);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Omejitve za tabelo `words`
|
||||||
|
--
|
||||||
|
ALTER TABLE `words`
|
||||||
|
ADD CONSTRAINT `FK_words_subjects` FOREIGN KEY (`id_subject`) REFERENCES `subjects` (`id`);
|
||||||
|
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
8
readme.txt
Normal file
8
readme.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Projekt SNA (Slovenski narečni atlas / Slovenian dialectal atlas)
|
||||||
|
|
||||||
|
Direktorij projekta vsebuje:
|
||||||
|
- to datoteko readme.txt
|
||||||
|
- kodo aplikacije v direktoriju sna
|
||||||
|
- začetno podatkovno bazo v datoteki digital_atlas.sql
|
||||||
|
- navodila za namestitev aplikacije
|
||||||
|
- navodila za uporabo aplikacije
|
15
sna/.editorconfig
Normal file
15
sna/.editorconfig
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# Matches multiple files with brace expansion notation
|
||||||
|
# Set default charset
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
# Tab indentation (no size specified)
|
||||||
|
indent_style = tab
|
9
sna/.htaccess
Normal file
9
sna/.htaccess
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_URI} !/assets
|
||||||
|
|
||||||
|
RewriteRule ^(.*)$ index.php/$1 [L]
|
696
sna/COPYING.gpl-3.0.htm
Normal file
696
sna/COPYING.gpl-3.0.htm
Normal file
|
@ -0,0 +1,696 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title>
|
||||||
|
<link rel="alternate" type="application/rdf+xml"
|
||||||
|
href="http://www.gnu.org/licenses/gpl-3.0.rdf" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
|
||||||
|
<p style="text-align: center;">Version 3, 29 June 2007</p>
|
||||||
|
|
||||||
|
<p>Copyright © 2007 Free Software Foundation, Inc.
|
||||||
|
<<a href="http://fsf.org/">http://fsf.org/</a>></p><p>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.</p>
|
||||||
|
|
||||||
|
<h3><a name="preamble"></a>Preamble</h3>
|
||||||
|
|
||||||
|
<p>The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.</p>
|
||||||
|
|
||||||
|
<p>The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.</p>
|
||||||
|
|
||||||
|
<p>When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.</p>
|
||||||
|
|
||||||
|
<p>To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.</p>
|
||||||
|
|
||||||
|
<p>For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.</p>
|
||||||
|
|
||||||
|
<p>Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.</p>
|
||||||
|
|
||||||
|
<p>For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.</p>
|
||||||
|
|
||||||
|
<p>Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.</p>
|
||||||
|
|
||||||
|
<p>Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.</p>
|
||||||
|
|
||||||
|
<p>The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.</p>
|
||||||
|
|
||||||
|
<h3><a name="terms"></a>TERMS AND CONDITIONS</h3>
|
||||||
|
|
||||||
|
<h4><a name="section0"></a>0. Definitions.</h4>
|
||||||
|
|
||||||
|
<p>“This License” refers to version 3 of the GNU General Public License.</p>
|
||||||
|
|
||||||
|
<p>“Copyright” also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.</p>
|
||||||
|
|
||||||
|
<p>“The Program” refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as “you”. “Licensees” and
|
||||||
|
“recipients” may be individuals or organizations.</p>
|
||||||
|
|
||||||
|
<p>To “modify” a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a “modified version” of the
|
||||||
|
earlier work or a work “based on” the earlier work.</p>
|
||||||
|
|
||||||
|
<p>A “covered work” means either the unmodified Program or a work based
|
||||||
|
on the Program.</p>
|
||||||
|
|
||||||
|
<p>To “propagate” a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.</p>
|
||||||
|
|
||||||
|
<p>To “convey” a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.</p>
|
||||||
|
|
||||||
|
<p>An interactive user interface displays “Appropriate Legal Notices”
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.</p>
|
||||||
|
|
||||||
|
<h4><a name="section1"></a>1. Source Code.</h4>
|
||||||
|
|
||||||
|
<p>The “source code” for a work means the preferred form of the work
|
||||||
|
for making modifications to it. “Object code” means any non-source
|
||||||
|
form of a work.</p>
|
||||||
|
|
||||||
|
<p>A “Standard Interface” means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.</p>
|
||||||
|
|
||||||
|
<p>The “System Libraries” of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
“Major Component”, in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.</p>
|
||||||
|
|
||||||
|
<p>The “Corresponding Source” for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.</p>
|
||||||
|
|
||||||
|
<p>The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.</p>
|
||||||
|
|
||||||
|
<p>The Corresponding Source for a work in source code form is that
|
||||||
|
same work.</p>
|
||||||
|
|
||||||
|
<h4><a name="section2"></a>2. Basic Permissions.</h4>
|
||||||
|
|
||||||
|
<p>All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.</p>
|
||||||
|
|
||||||
|
<p>You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.</p>
|
||||||
|
|
||||||
|
<p>Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.</p>
|
||||||
|
|
||||||
|
<h4><a name="section3"></a>3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h4>
|
||||||
|
|
||||||
|
<p>No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.</p>
|
||||||
|
|
||||||
|
<p>When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.</p>
|
||||||
|
|
||||||
|
<h4><a name="section4"></a>4. Conveying Verbatim Copies.</h4>
|
||||||
|
|
||||||
|
<p>You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.</p>
|
||||||
|
|
||||||
|
<p>You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.</p>
|
||||||
|
|
||||||
|
<h4><a name="section5"></a>5. Conveying Modified Source Versions.</h4>
|
||||||
|
|
||||||
|
<p>You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.</li>
|
||||||
|
|
||||||
|
<li>b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
“keep intact all notices”.</li>
|
||||||
|
|
||||||
|
<li>c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.</li>
|
||||||
|
|
||||||
|
<li>d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
“aggregate” if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.</p>
|
||||||
|
|
||||||
|
<h4><a name="section6"></a>6. Conveying Non-Source Forms.</h4>
|
||||||
|
|
||||||
|
<p>You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.</li>
|
||||||
|
|
||||||
|
<li>b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.</li>
|
||||||
|
|
||||||
|
<li>c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.</li>
|
||||||
|
|
||||||
|
<li>d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.</li>
|
||||||
|
|
||||||
|
<li>e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.</p>
|
||||||
|
|
||||||
|
<p>A “User Product” is either (1) a “consumer product”, which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, “normally used” refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.</p>
|
||||||
|
|
||||||
|
<p>“Installation Information” for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.</p>
|
||||||
|
|
||||||
|
<p>If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).</p>
|
||||||
|
|
||||||
|
<p>The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.</p>
|
||||||
|
|
||||||
|
<p>Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.</p>
|
||||||
|
|
||||||
|
<h4><a name="section7"></a>7. Additional Terms.</h4>
|
||||||
|
|
||||||
|
<p>“Additional permissions” are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.</p>
|
||||||
|
|
||||||
|
<p>When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.</p>
|
||||||
|
|
||||||
|
<p>Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or</li>
|
||||||
|
|
||||||
|
<li>b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or</li>
|
||||||
|
|
||||||
|
<li>c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or</li>
|
||||||
|
|
||||||
|
<li>d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or</li>
|
||||||
|
|
||||||
|
<li>e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or</li>
|
||||||
|
|
||||||
|
<li>f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>All other non-permissive additional terms are considered “further
|
||||||
|
restrictions” within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.</p>
|
||||||
|
|
||||||
|
<p>If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.</p>
|
||||||
|
|
||||||
|
<p>Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.</p>
|
||||||
|
|
||||||
|
<h4><a name="section8"></a>8. Termination.</h4>
|
||||||
|
|
||||||
|
<p>You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).</p>
|
||||||
|
|
||||||
|
<p>However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.</p>
|
||||||
|
|
||||||
|
<p>Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.</p>
|
||||||
|
|
||||||
|
<p>Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.</p>
|
||||||
|
|
||||||
|
<h4><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h4>
|
||||||
|
|
||||||
|
<p>You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.</p>
|
||||||
|
|
||||||
|
<h4><a name="section10"></a>10. Automatic Licensing of Downstream Recipients.</h4>
|
||||||
|
|
||||||
|
<p>Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.</p>
|
||||||
|
|
||||||
|
<p>An “entity transaction” is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.</p>
|
||||||
|
|
||||||
|
<p>You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.</p>
|
||||||
|
|
||||||
|
<h4><a name="section11"></a>11. Patents.</h4>
|
||||||
|
|
||||||
|
<p>A “contributor” is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's “contributor version”.</p>
|
||||||
|
|
||||||
|
<p>A contributor's “essential patent claims” are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, “control” includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.</p>
|
||||||
|
|
||||||
|
<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.</p>
|
||||||
|
|
||||||
|
<p>In the following three paragraphs, a “patent license” is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To “grant” such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.</p>
|
||||||
|
|
||||||
|
<p>If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. “Knowingly relying” means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.</p>
|
||||||
|
|
||||||
|
<p>If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.</p>
|
||||||
|
|
||||||
|
<p>A patent license is “discriminatory” if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.</p>
|
||||||
|
|
||||||
|
<p>Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.</p>
|
||||||
|
|
||||||
|
<h4><a name="section12"></a>12. No Surrender of Others' Freedom.</h4>
|
||||||
|
|
||||||
|
<p>If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.</p>
|
||||||
|
|
||||||
|
<h4><a name="section13"></a>13. Use with the GNU Affero General Public License.</h4>
|
||||||
|
|
||||||
|
<p>Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.</p>
|
||||||
|
|
||||||
|
<h4><a name="section14"></a>14. Revised Versions of this License.</h4>
|
||||||
|
|
||||||
|
<p>The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.</p>
|
||||||
|
|
||||||
|
<p>Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License “or any later version” applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.</p>
|
||||||
|
|
||||||
|
<p>If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.</p>
|
||||||
|
|
||||||
|
<p>Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.</p>
|
||||||
|
|
||||||
|
<h4><a name="section15"></a>15. Disclaimer of Warranty.</h4>
|
||||||
|
|
||||||
|
<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
|
||||||
|
|
||||||
|
<h4><a name="section16"></a>16. Limitation of Liability.</h4>
|
||||||
|
|
||||||
|
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.</p>
|
||||||
|
|
||||||
|
<h4><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h4>
|
||||||
|
|
||||||
|
<p>If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.</p>
|
||||||
|
|
||||||
|
<p>END OF TERMS AND CONDITIONS</p>
|
||||||
|
|
||||||
|
<h3><a name="howto"></a>How to Apply These Terms to Your New Programs</h3>
|
||||||
|
|
||||||
|
<p>If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.</p>
|
||||||
|
|
||||||
|
<p>To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the “copyright” line and a pointer to where the full notice is found.</p>
|
||||||
|
|
||||||
|
<pre> <one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>Also add information on how to contact you by electronic and paper mail.</p>
|
||||||
|
|
||||||
|
<p>If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:</p>
|
||||||
|
|
||||||
|
<pre> <program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an “about box”.</p>
|
||||||
|
|
||||||
|
<p>You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.</p>
|
||||||
|
|
||||||
|
<p>The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<<a href="http://www.gnu.org/philosophy/why-not-lgpl.html">http://www.gnu.org/philosophy/why-not-lgpl.html</a>>.</p>
|
||||||
|
|
||||||
|
</body></html>
|
674
sna/COPYING.gpl-3.0.txt
Normal file
674
sna/COPYING.gpl-3.0.txt
Normal file
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
95
sna/CodeIgniter.contributing.md
Normal file
95
sna/CodeIgniter.contributing.md
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
# Contributing to CodeIgniter
|
||||||
|
|
||||||
|
|
||||||
|
CodeIgniter is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or [Pull Requests](http://help.github.com/send-pull-requests/) on the [CodeIgniter repository](https://github.com/bcit-ci/CodeIgniter>) on GitHub.
|
||||||
|
|
||||||
|
Issues are a quick way to point out a bug. If you find a bug or documentation error in CodeIgniter then please check a few things first:
|
||||||
|
|
||||||
|
1. There is not already an open Issue
|
||||||
|
2. The issue has already been fixed (check the develop branch, or look for closed Issues)
|
||||||
|
3. Is it something really obvious that you can fix yourself?
|
||||||
|
|
||||||
|
Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git.
|
||||||
|
|
||||||
|
## Guidelines
|
||||||
|
|
||||||
|
Before we look into how, here are the guidelines. If your Pull Requests fail
|
||||||
|
to pass these guidelines it will be declined and you will need to re-submit
|
||||||
|
when you’ve made the changes. This might sound a bit tough, but it is required
|
||||||
|
for us to maintain quality of the code-base.
|
||||||
|
|
||||||
|
### PHP Style
|
||||||
|
|
||||||
|
All code must meet the [Style Guide](https://codeigniter.com/user_guide/general/styleguide.html), which is
|
||||||
|
essentially the [Allman indent style](https://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible.
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
If you change anything that requires a change to documentation then you will need to add it. New classes, methods, parameters, changing default values, etc are all things that will require a change to documentation. The change-log must also be updated for every change. Also PHPDoc blocks must be maintained.
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
|
||||||
|
CodeIgniter recommends PHP 5.4 or newer to be used, but it should be
|
||||||
|
compatible with PHP 5.2.4 so all code supplied must stick to this
|
||||||
|
requirement. If PHP 5.3 (and above) functions or features are used then
|
||||||
|
there must be a fallback for PHP 5.2.4.
|
||||||
|
|
||||||
|
### Branching
|
||||||
|
|
||||||
|
CodeIgniter uses the [Git-Flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model which requires all pull requests to be sent to the "develop" branch. This is
|
||||||
|
where the next planned version will be developed. The "master" branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g: an emergency security patch) can be applied to master to create a new version, without worrying about other features holding it up. For this reason all commits need to be made to "develop" and any sent to "master" will be closed automatically. If you have multiple changes to submit, please place all changes into their own branch on your fork.
|
||||||
|
|
||||||
|
One thing at a time: A pull request should only contain one change. That does not mean only one commit, but one change - however many commits it took. The reason for this is that if you change X and Y but send a pull request for both at the same time, we might really want X but disagree with Y, meaning we cannot merge the request. Using the Git-Flow branching model you can create new branches for both of these features and send two requests.
|
||||||
|
|
||||||
|
### Signing
|
||||||
|
|
||||||
|
You must sign your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open source project. git makes this trivial as you merely have to use `--signoff` on your commits to your CodeIgniter fork.
|
||||||
|
|
||||||
|
`git commit --signoff`
|
||||||
|
|
||||||
|
or simply
|
||||||
|
|
||||||
|
`git commit -s`
|
||||||
|
|
||||||
|
This will sign your commits with the information setup in your git config, e.g.
|
||||||
|
|
||||||
|
`Signed-off-by: John Q Public <john.public@example.com>`
|
||||||
|
|
||||||
|
If you are using [Tower](http://www.git-tower.com/) there is a "Sign-Off" checkbox in the commit window. You could even alias git commit to use the `-s` flag so you don’t have to think about it.
|
||||||
|
|
||||||
|
By signing your work in this manner, you certify to a "Developer's Certificate of Origin". The current version of this certificate is in the `DCO.txt` file in the root of this repository.
|
||||||
|
|
||||||
|
|
||||||
|
## How-to Guide
|
||||||
|
|
||||||
|
There are two ways to make changes, the easy way and the hard way. Either way you will need to [create a GitHub account](https://github.com/signup/free).
|
||||||
|
|
||||||
|
Easy way GitHub allows in-line editing of files for making simple typo changes and quick-fixes. This is not the best way as you are unable to test the code works. If you do this you could be introducing syntax errors, etc, but for a Git-phobic user this is good for a quick-fix.
|
||||||
|
|
||||||
|
Hard way The best way to contribute is to "clone" your fork of CodeIgniter to your development area. That sounds like some jargon, but "forking" on GitHub means "making a copy of that repo to your account" and "cloning" means "copying that code to your environment so you can work on it".
|
||||||
|
|
||||||
|
1. Set up Git (Windows, Mac & Linux)
|
||||||
|
2. Go to the CodeIgniter repo
|
||||||
|
3. Fork it
|
||||||
|
4. Clone your CodeIgniter repo: git@github.com:<your-name>/CodeIgniter.git
|
||||||
|
5. Checkout the "develop" branch At this point you are ready to start making changes.
|
||||||
|
6. Fix existing bugs on the Issue tracker after taking a look to see nobody else is working on them.
|
||||||
|
7. Commit the files
|
||||||
|
8. Push your develop branch to your fork
|
||||||
|
9. Send a pull request [http://help.github.com/send-pull-requests/](http://help.github.com/send-pull-requests/)
|
||||||
|
|
||||||
|
The Reactor Engineers will now be alerted about the change and at least one of the team will respond. If your change fails to meet the guidelines it will be bounced, or feedback will be provided to help you improve it.
|
||||||
|
|
||||||
|
Once the Reactor Engineer handling your pull request is happy with it they will merge it into develop and your patch will be part of the next release.
|
||||||
|
|
||||||
|
### Keeping your fork up-to-date
|
||||||
|
|
||||||
|
Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for a URL of a Git repository. By default your fork will have a remote named "origin" which points to your fork, but you can add another remote named "codeigniter" which points to `git://github.com/bcit-ci/CodeIgniter.git`. This is a read-only remote but you can pull from this develop branch to update your own.
|
||||||
|
|
||||||
|
If you are using command-line you can do the following:
|
||||||
|
|
||||||
|
1. `git remote add codeigniter git://github.com/bcit-ci/CodeIgniter.git`
|
||||||
|
2. `git pull codeigniter develop`
|
||||||
|
3. `git push origin develop`
|
||||||
|
|
||||||
|
Now your fork is up to date. This should be done regularly, or before you send a pull request at least.
|
70
sna/CodeIgniter.readme.rst
Normal file
70
sna/CodeIgniter.readme.rst
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
###################
|
||||||
|
What is CodeIgniter
|
||||||
|
###################
|
||||||
|
|
||||||
|
CodeIgniter is an Application Development Framework - a toolkit - for people
|
||||||
|
who build web sites using PHP. Its goal is to enable you to develop projects
|
||||||
|
much faster than you could if you were writing code from scratch, by providing
|
||||||
|
a rich set of libraries for commonly needed tasks, as well as a simple
|
||||||
|
interface and logical structure to access these libraries. CodeIgniter lets
|
||||||
|
you creatively focus on your project by minimizing the amount of code needed
|
||||||
|
for a given task.
|
||||||
|
|
||||||
|
*******************
|
||||||
|
Release Information
|
||||||
|
*******************
|
||||||
|
|
||||||
|
This repo contains in-development code for future releases. To download the
|
||||||
|
latest stable release please visit the `CodeIgniter Downloads
|
||||||
|
<https://codeigniter.com/download>`_ page.
|
||||||
|
|
||||||
|
**************************
|
||||||
|
Changelog and New Features
|
||||||
|
**************************
|
||||||
|
|
||||||
|
You can find a list of all changes for each release in the `user
|
||||||
|
guide change log <https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/changelog.rst>`_.
|
||||||
|
|
||||||
|
*******************
|
||||||
|
Server Requirements
|
||||||
|
*******************
|
||||||
|
|
||||||
|
PHP version 5.6 or newer is recommended.
|
||||||
|
|
||||||
|
It should work on 5.3.7 as well, but we strongly advise you NOT to run
|
||||||
|
such old versions of PHP, because of potential security and performance
|
||||||
|
issues, as well as missing features.
|
||||||
|
|
||||||
|
************
|
||||||
|
Installation
|
||||||
|
************
|
||||||
|
|
||||||
|
Please see the `installation section <https://codeigniter.com/user_guide/installation/index.html>`_
|
||||||
|
of the CodeIgniter User Guide.
|
||||||
|
|
||||||
|
*******
|
||||||
|
License
|
||||||
|
*******
|
||||||
|
|
||||||
|
Please see the `license
|
||||||
|
agreement <https://github.com/bcit-ci/CodeIgniter/blob/develop/user_guide_src/source/license.rst>`_.
|
||||||
|
|
||||||
|
*********
|
||||||
|
Resources
|
||||||
|
*********
|
||||||
|
|
||||||
|
- `User Guide <https://codeigniter.com/docs>`_
|
||||||
|
- `Language File Translations <https://github.com/bcit-ci/codeigniter3-translations>`_
|
||||||
|
- `Community Forums <http://forum.codeigniter.com/>`_
|
||||||
|
- `Community Wiki <https://github.com/bcit-ci/CodeIgniter/wiki>`_
|
||||||
|
- `Community IRC <https://webchat.freenode.net/?channels=%23codeigniter>`_
|
||||||
|
|
||||||
|
Report security issues to our `Security Panel <mailto:security@codeigniter.com>`_
|
||||||
|
or via our `page on HackerOne <https://hackerone.com/codeigniter>`_, thank you.
|
||||||
|
|
||||||
|
***************
|
||||||
|
Acknowledgement
|
||||||
|
***************
|
||||||
|
|
||||||
|
The CodeIgniter team would like to thank EllisLab, all the
|
||||||
|
contributors to the CodeIgniter project and you, the CodeIgniter user.
|
21
sna/MIT-license.txt
Normal file
21
sna/MIT-license.txt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 - 2017, British Columbia Institute of Technology
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
9
sna/application/.htaccess
Normal file
9
sna/application/.htaccess
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#RewriteEngine On
|
||||||
|
|
||||||
|
#RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
|
||||||
|
#RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
|
||||||
|
#RewriteCond %{REQUEST_URI} !/assets
|
||||||
|
|
||||||
|
#RewriteRule ^(.*)$ index.php/$1 [L]
|
6
sna/application/cache/.htaccess
vendored
Normal file
6
sna/application/cache/.htaccess
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<IfModule authz_core_module>
|
||||||
|
Require all denied
|
||||||
|
</IfModule>
|
||||||
|
<IfModule !authz_core_module>
|
||||||
|
Deny from all
|
||||||
|
</IfModule>
|
11
sna/application/cache/index.html
vendored
Normal file
11
sna/application/cache/index.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
135
sna/application/config/autoload.php
Normal file
135
sna/application/config/autoload.php
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| AUTO-LOADER
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file specifies which systems should be loaded by default.
|
||||||
|
|
|
||||||
|
| In order to keep the framework as light-weight as possible only the
|
||||||
|
| absolute minimal resources are loaded by default. For example,
|
||||||
|
| the database is not connected to automatically since no assumption
|
||||||
|
| is made regarding whether you intend to use it. This file lets
|
||||||
|
| you globally define which systems you would like loaded with every
|
||||||
|
| request.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Instructions
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These are the things you can load automatically:
|
||||||
|
|
|
||||||
|
| 1. Packages
|
||||||
|
| 2. Libraries
|
||||||
|
| 3. Drivers
|
||||||
|
| 4. Helper files
|
||||||
|
| 5. Custom config files
|
||||||
|
| 6. Language files
|
||||||
|
| 7. Models
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Packages
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['packages'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Libraries
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| These are the classes located in system/libraries/ or your
|
||||||
|
| application/libraries/ directory, with the addition of the
|
||||||
|
| 'database' library, which is somewhat of a special case.
|
||||||
|
|
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative library name to be assigned
|
||||||
|
| in the controller:
|
||||||
|
|
|
||||||
|
| $autoload['libraries'] = array('user_agent' => 'ua');
|
||||||
|
*/
|
||||||
|
$autoload['libraries'] = array('session');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Drivers
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| These classes are located in system/libraries/ or in your
|
||||||
|
| application/libraries/ directory, but are also placed inside their
|
||||||
|
| own subdirectory and they extend the CI_Driver_Library class. They
|
||||||
|
| offer multiple interchangeable driver options.
|
||||||
|
|
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['drivers'] = array('cache');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative property name to be assigned in
|
||||||
|
| the controller:
|
||||||
|
|
|
||||||
|
| $autoload['drivers'] = array('cache' => 'cch');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['drivers'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Helper Files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['helper'] = array('url', 'file');
|
||||||
|
*/
|
||||||
|
$autoload['helper'] = array('url','function');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Config files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['config'] = array('config1', 'config2');
|
||||||
|
|
|
||||||
|
| NOTE: This item is intended for use ONLY if you have created custom
|
||||||
|
| config files. Otherwise, leave it blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['config'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Language files
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['language'] = array('lang1', 'lang2');
|
||||||
|
|
|
||||||
|
| NOTE: Do not include the "_lang" part of your file. For example
|
||||||
|
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$autoload['language'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Auto-load Models
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Prototype:
|
||||||
|
|
|
||||||
|
| $autoload['model'] = array('first_model', 'second_model');
|
||||||
|
|
|
||||||
|
| You can also supply an alternative model name to be assigned
|
||||||
|
| in the controller:
|
||||||
|
|
|
||||||
|
| $autoload['model'] = array('first_model' => 'first');
|
||||||
|
*/
|
||||||
|
$autoload['model'] = array();
|
530
sna/application/config/config.php
Normal file
530
sna/application/config/config.php
Normal file
|
@ -0,0 +1,530 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Site URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| URL to your CodeIgniter root. Typically this will be your base URL,
|
||||||
|
| WITH a trailing slash:
|
||||||
|
|
|
||||||
|
| http://example.com/
|
||||||
|
|
|
||||||
|
| WARNING: You MUST set this value!
|
||||||
|
|
|
||||||
|
| If it is not set, then CodeIgniter will try guess the protocol and path
|
||||||
|
| your installation, but due to security concerns the hostname will be set
|
||||||
|
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
|
||||||
|
| The auto-detection mechanism exists only for convenience during
|
||||||
|
| development and MUST NOT be used in production!
|
||||||
|
|
|
||||||
|
| If you need to allow multiple domains, remember that this file is still
|
||||||
|
| a PHP script and you can easily do that on your own.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
if($_SERVER['SERVER_NAME']=='localhost')
|
||||||
|
{
|
||||||
|
$config['base_url'] = 'http://localhost/sna/';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$config['base_url'] = 'http://my-server-name.si/sna';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Index File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Typically this will be your index.php file, unless you've renamed it to
|
||||||
|
| something else. If you are using mod_rewrite to remove the page set this
|
||||||
|
| variable so that it is blank.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['index_page'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URI PROTOCOL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item determines which server global should be used to retrieve the
|
||||||
|
| URI string. The default setting of 'REQUEST_URI' works for most servers.
|
||||||
|
| If your links do not seem to work, try one of the other delicious flavors:
|
||||||
|
|
|
||||||
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
|
||||||
|
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
|
||||||
|
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
||||||
|
|
|
||||||
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
|
||||||
|
*/
|
||||||
|
$config['uri_protocol'] = 'REQUEST_URI';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| URL suffix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
|
||||||
|
| For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/urls.html
|
||||||
|
*/
|
||||||
|
$config['url_suffix'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Language
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which set of language files should be used. Make sure
|
||||||
|
| there is an available translation if you intend to use something other
|
||||||
|
| than english.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['language'] = 'english';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Character Set
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This determines which character set is used by default in various methods
|
||||||
|
| that require a character set to be provided.
|
||||||
|
|
|
||||||
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['charset'] = 'UTF-8';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable System Hooks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you would like to use the 'hooks' feature you must enable it by
|
||||||
|
| setting this variable to TRUE (boolean). See the user guide for details.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['enable_hooks'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Extension Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This item allows you to set the filename/classname prefix when extending
|
||||||
|
| native libraries. For more information please see the user guide:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/core_classes.html
|
||||||
|
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['subclass_prefix'] = 'MY_';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Composer auto-loading
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enabling this setting will tell CodeIgniter to look for a Composer
|
||||||
|
| package auto-loader script in application/vendor/autoload.php.
|
||||||
|
|
|
||||||
|
| $config['composer_autoload'] = TRUE;
|
||||||
|
|
|
||||||
|
| Or if you have your vendor/ directory located somewhere else, you
|
||||||
|
| can opt to set a specific path as well:
|
||||||
|
|
|
||||||
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
||||||
|
|
|
||||||
|
| For more information about Composer, please visit http://getcomposer.org/
|
||||||
|
|
|
||||||
|
| Note: This will NOT disable or override the CodeIgniter-specific
|
||||||
|
| autoloading (application/config/autoload.php)
|
||||||
|
*/
|
||||||
|
$config['composer_autoload'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allowed URL Characters
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This lets you specify which characters are permitted within your URLs.
|
||||||
|
| When someone tries to submit a URL with disallowed characters they will
|
||||||
|
| get a warning message.
|
||||||
|
|
|
||||||
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
|
||||||
|
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
||||||
|
|
|
||||||
|
| Leave blank to allow all characters -- but only if you are insane.
|
||||||
|
|
|
||||||
|
| The configured value is actually a regular expression character group
|
||||||
|
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
||||||
|
|
|
||||||
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable Query Strings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
|
||||||
|
| example.com/who/what/where/
|
||||||
|
|
|
||||||
|
| You can optionally enable standard query string based URLs:
|
||||||
|
| example.com?who=me&what=something&where=here
|
||||||
|
|
|
||||||
|
| Options are: TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
| The other items let you set the query string 'words' that will
|
||||||
|
| invoke your controllers and its functions:
|
||||||
|
| example.com/index.php?c=controller&m=function
|
||||||
|
|
|
||||||
|
| Please note that some of the helpers won't work as expected when
|
||||||
|
| this feature is enabled, since CodeIgniter is designed primarily to
|
||||||
|
| use segment based URLs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['enable_query_strings'] = FALSE;
|
||||||
|
$config['controller_trigger'] = 'c';
|
||||||
|
$config['function_trigger'] = 'm';
|
||||||
|
$config['directory_trigger'] = 'd';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Allow $_GET array
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default CodeIgniter enables access to the $_GET array. If for some
|
||||||
|
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['allow_get_array'] = TRUE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Threshold
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You can enable error logging by setting a threshold over zero. The
|
||||||
|
| threshold determines what gets logged. Threshold options are:
|
||||||
|
|
|
||||||
|
| 0 = Disables logging, Error logging TURNED OFF
|
||||||
|
| 1 = Error Messages (including PHP errors)
|
||||||
|
| 2 = Debug Messages
|
||||||
|
| 3 = Informational Messages
|
||||||
|
| 4 = All Messages
|
||||||
|
|
|
||||||
|
| You can also pass an array with threshold levels to show individual error types
|
||||||
|
|
|
||||||
|
| array(2) = Debug Messages, without Error Messages
|
||||||
|
|
|
||||||
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
|
||||||
|
| your log files will fill up very fast.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_threshold'] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Logging Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/logs/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log File Extension
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The default filename extension for log files. The default 'php' allows for
|
||||||
|
| protecting the log files via basic scripting, when they are to be stored
|
||||||
|
| under a publicly accessible directory.
|
||||||
|
|
|
||||||
|
| Note: Leaving it blank will default to 'php'.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_file_extension'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log File Permissions
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The file system permissions to be applied on newly created log files.
|
||||||
|
|
|
||||||
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
|
||||||
|
| integer notation (i.e. 0700, 0644, etc.)
|
||||||
|
*/
|
||||||
|
$config['log_file_permissions'] = 0644;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Date Format for Logs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Each item that is logged has an associated date. You can use PHP date
|
||||||
|
| codes to set your own date formatting
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['log_date_format'] = 'Y-m-d H:i:s';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Error Views Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/views/errors/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['error_views_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Directory Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Leave this BLANK unless you would like to set something other than the default
|
||||||
|
| application/cache/ directory. Use a full server path with trailing slash.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cache_path'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Include Query String
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Whether to take the URL query string into consideration when generating
|
||||||
|
| output cache files. Valid options are:
|
||||||
|
|
|
||||||
|
| FALSE = Disabled
|
||||||
|
| TRUE = Enabled, take all query parameters into account.
|
||||||
|
| Please be aware that this may result in numerous cache
|
||||||
|
| files generated for the same page over and over again.
|
||||||
|
| array('q') = Enabled, but only take into account the specified list
|
||||||
|
| of query parameters.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cache_query_string'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you use the Encryption class, you must set an encryption key.
|
||||||
|
| See the user guide for more info.
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['encryption_key'] = '';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'sess_driver'
|
||||||
|
|
|
||||||
|
| The storage driver to use: files, database, redis, memcached
|
||||||
|
|
|
||||||
|
| 'sess_cookie_name'
|
||||||
|
|
|
||||||
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
||||||
|
|
|
||||||
|
| 'sess_expiration'
|
||||||
|
|
|
||||||
|
| The number of SECONDS you want the session to last.
|
||||||
|
| Setting to 0 (zero) means expire when the browser is closed.
|
||||||
|
|
|
||||||
|
| 'sess_save_path'
|
||||||
|
|
|
||||||
|
| The location to save sessions to, driver dependent.
|
||||||
|
|
|
||||||
|
| For the 'files' driver, it's a path to a writable directory.
|
||||||
|
| WARNING: Only absolute paths are supported!
|
||||||
|
|
|
||||||
|
| For the 'database' driver, it's a table name.
|
||||||
|
| Please read up the manual for the format with other session drivers.
|
||||||
|
|
|
||||||
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
||||||
|
|
|
||||||
|
| 'sess_match_ip'
|
||||||
|
|
|
||||||
|
| Whether to match the user's IP address when reading the session data.
|
||||||
|
|
|
||||||
|
| WARNING: If you're using the database driver, don't forget to update
|
||||||
|
| your session table's PRIMARY KEY when changing this setting.
|
||||||
|
|
|
||||||
|
| 'sess_time_to_update'
|
||||||
|
|
|
||||||
|
| How many seconds between CI regenerating the session ID.
|
||||||
|
|
|
||||||
|
| 'sess_regenerate_destroy'
|
||||||
|
|
|
||||||
|
| Whether to destroy session data associated with the old session ID
|
||||||
|
| when auto-regenerating the session ID. When set to FALSE, the data
|
||||||
|
| will be later deleted by the garbage collector.
|
||||||
|
|
|
||||||
|
| Other session cookie settings are shared with the rest of the application,
|
||||||
|
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['sess_driver'] = 'files';
|
||||||
|
$config['sess_cookie_name'] = 'ci_session';
|
||||||
|
$config['sess_expiration'] = 7200;
|
||||||
|
$config['sess_save_path'] = NULL;
|
||||||
|
$config['sess_match_ip'] = FALSE;
|
||||||
|
$config['sess_time_to_update'] = 300;
|
||||||
|
$config['sess_regenerate_destroy'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cookie Related Variables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
|
||||||
|
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
|
||||||
|
| 'cookie_path' = Typically will be a forward slash
|
||||||
|
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
|
||||||
|
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
||||||
|
|
|
||||||
|
| Note: These settings (with the exception of 'cookie_prefix' and
|
||||||
|
| 'cookie_httponly') will also affect sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['cookie_prefix'] = '';
|
||||||
|
$config['cookie_domain'] = '';
|
||||||
|
$config['cookie_path'] = '/';
|
||||||
|
$config['cookie_secure'] = FALSE;
|
||||||
|
$config['cookie_httponly'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Standardize newlines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines whether to standardize newline characters in input data,
|
||||||
|
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['standardize_newlines'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global XSS Filtering
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Determines whether the XSS filter is always active when GET, POST or
|
||||||
|
| COOKIE data is encountered
|
||||||
|
|
|
||||||
|
| WARNING: This feature is DEPRECATED and currently available only
|
||||||
|
| for backwards compatibility purposes!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['global_xss_filtering'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross Site Request Forgery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
|
||||||
|
| checked on a submitted form. If you are accepting user data, it is strongly
|
||||||
|
| recommended CSRF protection be enabled.
|
||||||
|
|
|
||||||
|
| 'csrf_token_name' = The token name
|
||||||
|
| 'csrf_cookie_name' = The cookie name
|
||||||
|
| 'csrf_expire' = The number in seconds the token should expire.
|
||||||
|
| 'csrf_regenerate' = Regenerate token on every submission
|
||||||
|
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
|
||||||
|
*/
|
||||||
|
$config['csrf_protection'] = FALSE;
|
||||||
|
$config['csrf_token_name'] = 'csrf_test_name';
|
||||||
|
$config['csrf_cookie_name'] = 'csrf_cookie_name';
|
||||||
|
$config['csrf_expire'] = 7200;
|
||||||
|
$config['csrf_regenerate'] = TRUE;
|
||||||
|
$config['csrf_exclude_uris'] = array();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Output Compression
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enables Gzip output compression for faster page loads. When enabled,
|
||||||
|
| the output class will test whether your server supports Gzip.
|
||||||
|
| Even if it does, however, not all browsers support compression
|
||||||
|
| so enable only if you are reasonably sure your visitors can handle it.
|
||||||
|
|
|
||||||
|
| Only used if zlib.output_compression is turned off in your php.ini.
|
||||||
|
| Please do not use it together with httpd-level output compression.
|
||||||
|
|
|
||||||
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
|
||||||
|
| means you are prematurely outputting something to your browser. It could
|
||||||
|
| even be a line of whitespace at the end of one of your scripts. For
|
||||||
|
| compression to work, nothing can be sent before the output buffer is called
|
||||||
|
| by the output class. Do not 'echo' any values with compression enabled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['compress_output'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Master Time Reference
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Options are 'local' or any PHP supported timezone. This preference tells
|
||||||
|
| the system whether to use your server's local time as the master 'now'
|
||||||
|
| reference, or convert it to the configured one timezone. See the 'date
|
||||||
|
| helper' page of the user guide for information regarding date handling.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['time_reference'] = 'local';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Rewrite PHP Short Tags
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your PHP installation does not have short tag support enabled CI
|
||||||
|
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
|
||||||
|
| in your view files. Options are TRUE or FALSE (boolean)
|
||||||
|
|
|
||||||
|
| Note: You need to have eval() enabled for this to work.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['rewrite_short_tags'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Reverse Proxy IPs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your server is behind a reverse proxy, you must whitelist the proxy
|
||||||
|
| IP addresses from which CodeIgniter should trust headers such as
|
||||||
|
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
|
||||||
|
| the visitor's IP address.
|
||||||
|
|
|
||||||
|
| You can use both an array or a comma-separated list of proxy addresses,
|
||||||
|
| as well as specifying whole subnets. Here are a few examples:
|
||||||
|
|
|
||||||
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
|
||||||
|
| Array: array('10.0.1.200', '192.168.5.0/24')
|
||||||
|
*/
|
||||||
|
$config['proxy_ips'] = '';
|
85
sna/application/config/constants.php
Normal file
85
sna/application/config/constants.php
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Display Debug backtrace
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
|
||||||
|
| error_reporting is disabled, the backtrace will not display, regardless
|
||||||
|
| of this setting
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File and Directory Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These prefs are used when checking and setting modes when working
|
||||||
|
| with the file system. The defaults are fine on servers with proper
|
||||||
|
| security, but you may wish (or even need) to change the values in
|
||||||
|
| certain environments (Apache running a separate process for each
|
||||||
|
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
|
||||||
|
| always be used to set the mode correctly.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
|
||||||
|
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
|
||||||
|
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
|
||||||
|
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File Stream Modes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These modes are used when working with fopen()/popen()
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
|
||||||
|
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
|
||||||
|
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
|
||||||
|
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
|
||||||
|
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
|
||||||
|
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
|
||||||
|
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
|
||||||
|
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Exit Status Codes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Used to indicate the conditions under which the script is exit()ing.
|
||||||
|
| While there is no universal standard for error codes, there are some
|
||||||
|
| broad conventions. Three such conventions are mentioned below, for
|
||||||
|
| those who wish to make use of them. The CodeIgniter defaults were
|
||||||
|
| chosen for the least overlap with these conventions, while still
|
||||||
|
| leaving room for others to be defined in future versions and user
|
||||||
|
| applications.
|
||||||
|
|
|
||||||
|
| The three main conventions used for determining exit status codes
|
||||||
|
| are as follows:
|
||||||
|
|
|
||||||
|
| Standard C/C++ Library (stdlibc):
|
||||||
|
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
|
||||||
|
| (This link also contains other GNU-specific conventions)
|
||||||
|
| BSD sysexits.h:
|
||||||
|
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
|
||||||
|
| Bash scripting:
|
||||||
|
| http://tldp.org/LDP/abs/html/exitcodes.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
|
||||||
|
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
|
||||||
|
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
|
||||||
|
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
|
||||||
|
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
|
||||||
|
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
|
||||||
|
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
|
||||||
|
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
|
||||||
|
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||||
|
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
96
sna/application/config/database.php
Normal file
96
sna/application/config/database.php
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| DATABASE CONNECTIVITY SETTINGS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file will contain the settings needed to access your database.
|
||||||
|
|
|
||||||
|
| For complete instructions please consult the 'Database Connection'
|
||||||
|
| page of the User Guide.
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| EXPLANATION OF VARIABLES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| ['dsn'] The full DSN string describe a connection to the database.
|
||||||
|
| ['hostname'] The hostname of your database server.
|
||||||
|
| ['username'] The username used to connect to the database
|
||||||
|
| ['password'] The password used to connect to the database
|
||||||
|
| ['database'] The name of the database you want to connect to
|
||||||
|
| ['dbdriver'] The database driver. e.g.: mysqli.
|
||||||
|
| Currently supported:
|
||||||
|
| cubrid, ibase, mssql, mysql, mysqli, oci8,
|
||||||
|
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
|
||||||
|
| ['dbprefix'] You can add an optional prefix, which will be added
|
||||||
|
| to the table name when using the Query Builder class
|
||||||
|
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
|
||||||
|
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
|
||||||
|
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
|
||||||
|
| ['cachedir'] The path to the folder where cache files should be stored
|
||||||
|
| ['char_set'] The character set used in communicating with the database
|
||||||
|
| ['dbcollat'] The character collation used in communicating with the database
|
||||||
|
| NOTE: For MySQL and MySQLi databases, this setting is only used
|
||||||
|
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
|
||||||
|
| (and in table creation queries made with DB Forge).
|
||||||
|
| There is an incompatibility in PHP with mysql_real_escape_string() which
|
||||||
|
| can make your site vulnerable to SQL injection if you are using a
|
||||||
|
| multi-byte character set and are running versions lower than these.
|
||||||
|
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|
||||||
|
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
|
||||||
|
| ['encrypt'] Whether or not to use an encrypted connection.
|
||||||
|
|
|
||||||
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
|
||||||
|
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
||||||
|
|
|
||||||
|
| 'ssl_key' - Path to the private key file
|
||||||
|
| 'ssl_cert' - Path to the public key certificate file
|
||||||
|
| 'ssl_ca' - Path to the certificate authority file
|
||||||
|
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
|
||||||
|
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
|
||||||
|
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
||||||
|
|
|
||||||
|
| ['compress'] Whether or not to use client compression (MySQL only)
|
||||||
|
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|
||||||
|
| - good for ensuring strict SQL while developing
|
||||||
|
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
|
||||||
|
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
|
||||||
|
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
|
||||||
|
| NOTE: Disabling this will also effectively disable both
|
||||||
|
| $this->db->last_query() and profiling of DB queries.
|
||||||
|
| When you run a query, with this setting set to TRUE (default),
|
||||||
|
| CodeIgniter will store the SQL statement for debugging purposes.
|
||||||
|
| However, this may cause high memory usage, especially if you run
|
||||||
|
| a lot of SQL queries ... disable this to avoid that problem.
|
||||||
|
|
|
||||||
|
| The $active_group variable lets you choose which connection group to
|
||||||
|
| make active. By default there is only one group (the 'default' group).
|
||||||
|
|
|
||||||
|
| The $query_builder variables lets you determine whether or not to load
|
||||||
|
| the query builder class.
|
||||||
|
*/
|
||||||
|
$active_group = 'default';
|
||||||
|
$query_builder = TRUE;
|
||||||
|
|
||||||
|
$db['default'] = array(
|
||||||
|
'dsn' => '',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'username' => 'my-username',
|
||||||
|
'password' => 'my-passwd',
|
||||||
|
'database' => 'digital_atlas',
|
||||||
|
'dbdriver' => 'mysqli',
|
||||||
|
'dbprefix' => '',
|
||||||
|
'pconnect' => FALSE,
|
||||||
|
'db_debug' => (ENVIRONMENT !== 'production'),
|
||||||
|
'cache_on' => FALSE,
|
||||||
|
'cachedir' => '',
|
||||||
|
'char_set' => 'utf8',
|
||||||
|
'dbcollat' => 'utf8_general_ci',
|
||||||
|
'swap_pre' => '',
|
||||||
|
'encrypt' => FALSE,
|
||||||
|
'compress' => FALSE,
|
||||||
|
'stricton' => FALSE,
|
||||||
|
'failover' => array(),
|
||||||
|
'save_queries' => TRUE
|
||||||
|
);
|
24
sna/application/config/doctypes.php
Normal file
24
sna/application/config/doctypes.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
$_doctypes = array(
|
||||||
|
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
|
||||||
|
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||||
|
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||||
|
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||||
|
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
|
||||||
|
'html5' => '<!DOCTYPE html>',
|
||||||
|
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||||
|
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||||
|
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||||
|
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
|
||||||
|
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
|
||||||
|
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
|
||||||
|
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
|
||||||
|
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
|
||||||
|
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
|
||||||
|
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
|
||||||
|
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
|
||||||
|
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
|
||||||
|
);
|
103
sna/application/config/foreign_chars.php
Normal file
103
sna/application/config/foreign_chars.php
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| Foreign Characters
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of foreign characters for transliteration
|
||||||
|
| conversion used by the Text helper
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$foreign_characters = array(
|
||||||
|
'/ä|æ|ǽ/' => 'ae',
|
||||||
|
'/ö|œ/' => 'oe',
|
||||||
|
'/ü/' => 'ue',
|
||||||
|
'/Ä/' => 'Ae',
|
||||||
|
'/Ü/' => 'Ue',
|
||||||
|
'/Ö/' => 'Oe',
|
||||||
|
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
|
||||||
|
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
|
||||||
|
'/Б/' => 'B',
|
||||||
|
'/б/' => 'b',
|
||||||
|
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
|
||||||
|
'/ç|ć|ĉ|ċ|č/' => 'c',
|
||||||
|
'/Д/' => 'D',
|
||||||
|
'/д/' => 'd',
|
||||||
|
'/Ð|Ď|Đ|Δ/' => 'Dj',
|
||||||
|
'/ð|ď|đ|δ/' => 'dj',
|
||||||
|
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
|
||||||
|
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
|
||||||
|
'/Ф/' => 'F',
|
||||||
|
'/ф/' => 'f',
|
||||||
|
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
|
||||||
|
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
|
||||||
|
'/Ĥ|Ħ/' => 'H',
|
||||||
|
'/ĥ|ħ/' => 'h',
|
||||||
|
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
|
||||||
|
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
|
||||||
|
'/Ĵ/' => 'J',
|
||||||
|
'/ĵ/' => 'j',
|
||||||
|
'/Ķ|Κ|К/' => 'K',
|
||||||
|
'/ķ|κ|к/' => 'k',
|
||||||
|
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
|
||||||
|
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
|
||||||
|
'/М/' => 'M',
|
||||||
|
'/м/' => 'm',
|
||||||
|
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
|
||||||
|
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
|
||||||
|
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
|
||||||
|
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
|
||||||
|
'/П/' => 'P',
|
||||||
|
'/п/' => 'p',
|
||||||
|
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
|
||||||
|
'/ŕ|ŗ|ř|ρ|р/' => 'r',
|
||||||
|
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
|
||||||
|
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
|
||||||
|
'/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
|
||||||
|
'/ț|ţ|ť|ŧ|т/' => 't',
|
||||||
|
'/Þ|þ/' => 'th',
|
||||||
|
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
|
||||||
|
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
|
||||||
|
'/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
|
||||||
|
'/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
|
||||||
|
'/В/' => 'V',
|
||||||
|
'/в/' => 'v',
|
||||||
|
'/Ŵ/' => 'W',
|
||||||
|
'/ŵ/' => 'w',
|
||||||
|
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
|
||||||
|
'/ź|ż|ž|ζ|з/' => 'z',
|
||||||
|
'/Æ|Ǽ/' => 'AE',
|
||||||
|
'/ß/' => 'ss',
|
||||||
|
'/IJ/' => 'IJ',
|
||||||
|
'/ij/' => 'ij',
|
||||||
|
'/Œ/' => 'OE',
|
||||||
|
'/ƒ/' => 'f',
|
||||||
|
'/ξ/' => 'ks',
|
||||||
|
'/π/' => 'p',
|
||||||
|
'/β/' => 'v',
|
||||||
|
'/μ/' => 'm',
|
||||||
|
'/ψ/' => 'ps',
|
||||||
|
'/Ё/' => 'Yo',
|
||||||
|
'/ё/' => 'yo',
|
||||||
|
'/Є/' => 'Ye',
|
||||||
|
'/є/' => 'ye',
|
||||||
|
'/Ї/' => 'Yi',
|
||||||
|
'/Ж/' => 'Zh',
|
||||||
|
'/ж/' => 'zh',
|
||||||
|
'/Х/' => 'Kh',
|
||||||
|
'/х/' => 'kh',
|
||||||
|
'/Ц/' => 'Ts',
|
||||||
|
'/ц/' => 'ts',
|
||||||
|
'/Ч/' => 'Ch',
|
||||||
|
'/ч/' => 'ch',
|
||||||
|
'/Ш/' => 'Sh',
|
||||||
|
'/ш/' => 'sh',
|
||||||
|
'/Щ/' => 'Shch',
|
||||||
|
'/щ/' => 'shch',
|
||||||
|
'/Ъ|ъ|Ь|ь/' => '',
|
||||||
|
'/Ю/' => 'Yu',
|
||||||
|
'/ю/' => 'yu',
|
||||||
|
'/Я/' => 'Ya',
|
||||||
|
'/я/' => 'ya'
|
||||||
|
);
|
13
sna/application/config/hooks.php
Normal file
13
sna/application/config/hooks.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Hooks
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you define "hooks" to extend CI without hacking the core
|
||||||
|
| files. Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/hooks.html
|
||||||
|
|
|
||||||
|
*/
|
11
sna/application/config/index.html
Normal file
11
sna/application/config/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
19
sna/application/config/memcached.php
Normal file
19
sna/application/config/memcached.php
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Memcached settings
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Your Memcached servers can be specified below.
|
||||||
|
|
|
||||||
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config = array(
|
||||||
|
'default' => array(
|
||||||
|
'hostname' => '127.0.0.1',
|
||||||
|
'port' => '11211',
|
||||||
|
'weight' => '1',
|
||||||
|
),
|
||||||
|
);
|
84
sna/application/config/migration.php
Normal file
84
sna/application/config/migration.php
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Enable/Disable Migrations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Migrations are disabled by default for security reasons.
|
||||||
|
| You should enable migrations whenever you intend to do a schema migration
|
||||||
|
| and disable it back when you're done.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_enabled'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Type
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Migration file names may be based on a sequential identifier or on
|
||||||
|
| a timestamp. Options are:
|
||||||
|
|
|
||||||
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
|
||||||
|
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
|
||||||
|
| Use timestamp format YYYYMMDDHHIISS.
|
||||||
|
|
|
||||||
|
| Note: If this configuration value is missing the Migration library
|
||||||
|
| defaults to 'sequential' for backward compatibility with CI2.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_type'] = 'timestamp';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the name of the table that will store the current migrations state.
|
||||||
|
| When migrations runs it will store in a database table which migration
|
||||||
|
| level the system is at. It then compares the migration level in this
|
||||||
|
| table to the $config['migration_version'] if they are not the same it
|
||||||
|
| will migrate up. This must be set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_table'] = 'migrations';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Auto Migrate To Latest
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If this is set to TRUE when you load the migrations class and have
|
||||||
|
| $config['migration_enabled'] set to TRUE the system will auto migrate
|
||||||
|
| to your latest migration (whatever $config['migration_version'] is
|
||||||
|
| set to). This way you do not have to call migrations anywhere else
|
||||||
|
| in your code to have the latest migration.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_auto_latest'] = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations version
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is used to set migration version that the file system should be on.
|
||||||
|
| If you run $this->migration->current() this is the version that schema will
|
||||||
|
| be upgraded / downgraded to.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_version'] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migrations Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Path to your migrations folder.
|
||||||
|
| Typically, it will be within your application path.
|
||||||
|
| Also, writing permission is required within the migrations path.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$config['migration_path'] = APPPATH.'migrations/';
|
183
sna/application/config/mimes.php
Normal file
183
sna/application/config/mimes.php
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| MIME TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of mime types. It is used by the
|
||||||
|
| Upload class to help identify allowed file types.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
return array(
|
||||||
|
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
|
||||||
|
'cpt' => 'application/mac-compactpro',
|
||||||
|
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
|
||||||
|
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
|
||||||
|
'dms' => 'application/octet-stream',
|
||||||
|
'lha' => 'application/octet-stream',
|
||||||
|
'lzh' => 'application/octet-stream',
|
||||||
|
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||||
|
'class' => 'application/octet-stream',
|
||||||
|
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
|
||||||
|
'so' => 'application/octet-stream',
|
||||||
|
'sea' => 'application/octet-stream',
|
||||||
|
'dll' => 'application/octet-stream',
|
||||||
|
'oda' => 'application/oda',
|
||||||
|
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
|
||||||
|
'ai' => array('application/pdf', 'application/postscript'),
|
||||||
|
'eps' => 'application/postscript',
|
||||||
|
'ps' => 'application/postscript',
|
||||||
|
'smi' => 'application/smil',
|
||||||
|
'smil' => 'application/smil',
|
||||||
|
'mif' => 'application/vnd.mif',
|
||||||
|
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
|
||||||
|
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
|
||||||
|
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
|
||||||
|
'wbxml' => 'application/wbxml',
|
||||||
|
'wmlc' => 'application/wmlc',
|
||||||
|
'dcr' => 'application/x-director',
|
||||||
|
'dir' => 'application/x-director',
|
||||||
|
'dxr' => 'application/x-director',
|
||||||
|
'dvi' => 'application/x-dvi',
|
||||||
|
'gtar' => 'application/x-gtar',
|
||||||
|
'gz' => 'application/x-gzip',
|
||||||
|
'gzip' => 'application/x-gzip',
|
||||||
|
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
|
||||||
|
'php4' => 'application/x-httpd-php',
|
||||||
|
'php3' => 'application/x-httpd-php',
|
||||||
|
'phtml' => 'application/x-httpd-php',
|
||||||
|
'phps' => 'application/x-httpd-php-source',
|
||||||
|
'js' => array('application/x-javascript', 'text/plain'),
|
||||||
|
'swf' => 'application/x-shockwave-flash',
|
||||||
|
'sit' => 'application/x-stuffit',
|
||||||
|
'tar' => 'application/x-tar',
|
||||||
|
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||||
|
'z' => 'application/x-compress',
|
||||||
|
'xhtml' => 'application/xhtml+xml',
|
||||||
|
'xht' => 'application/xhtml+xml',
|
||||||
|
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
|
||||||
|
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
|
||||||
|
'mid' => 'audio/midi',
|
||||||
|
'midi' => 'audio/midi',
|
||||||
|
'mpga' => 'audio/mpeg',
|
||||||
|
'mp2' => 'audio/mpeg',
|
||||||
|
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||||
|
'aif' => array('audio/x-aiff', 'audio/aiff'),
|
||||||
|
'aiff' => array('audio/x-aiff', 'audio/aiff'),
|
||||||
|
'aifc' => 'audio/x-aiff',
|
||||||
|
'ram' => 'audio/x-pn-realaudio',
|
||||||
|
'rm' => 'audio/x-pn-realaudio',
|
||||||
|
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||||
|
'ra' => 'audio/x-realaudio',
|
||||||
|
'rv' => 'video/vnd.rn-realvideo',
|
||||||
|
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
|
||||||
|
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
|
||||||
|
'gif' => 'image/gif',
|
||||||
|
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||||
|
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
|
||||||
|
'png' => array('image/png', 'image/x-png'),
|
||||||
|
'tiff' => 'image/tiff',
|
||||||
|
'tif' => 'image/tiff',
|
||||||
|
'css' => array('text/css', 'text/plain'),
|
||||||
|
'html' => array('text/html', 'text/plain'),
|
||||||
|
'htm' => array('text/html', 'text/plain'),
|
||||||
|
'shtml' => array('text/html', 'text/plain'),
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'text' => 'text/plain',
|
||||||
|
'log' => array('text/plain', 'text/x-log'),
|
||||||
|
'rtx' => 'text/richtext',
|
||||||
|
'rtf' => 'text/rtf',
|
||||||
|
'xml' => array('application/xml', 'text/xml', 'text/plain'),
|
||||||
|
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
|
||||||
|
'mpeg' => 'video/mpeg',
|
||||||
|
'mpg' => 'video/mpeg',
|
||||||
|
'mpe' => 'video/mpeg',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
'mov' => 'video/quicktime',
|
||||||
|
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
|
||||||
|
'movie' => 'video/x-sgi-movie',
|
||||||
|
'doc' => array('application/msword', 'application/vnd.ms-office'),
|
||||||
|
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
|
||||||
|
'dot' => array('application/msword', 'application/vnd.ms-office'),
|
||||||
|
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
|
||||||
|
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
|
||||||
|
'word' => array('application/msword', 'application/octet-stream'),
|
||||||
|
'xl' => 'application/excel',
|
||||||
|
'eml' => 'message/rfc822',
|
||||||
|
'json' => array('application/json', 'text/json'),
|
||||||
|
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
|
||||||
|
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
|
||||||
|
'p12' => 'application/x-pkcs12',
|
||||||
|
'p7a' => 'application/x-pkcs7-signature',
|
||||||
|
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||||
|
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
|
||||||
|
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||||
|
'p7s' => 'application/pkcs7-signature',
|
||||||
|
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
|
||||||
|
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
|
||||||
|
'der' => 'application/x-x509-ca-cert',
|
||||||
|
'kdb' => 'application/octet-stream',
|
||||||
|
'pgp' => 'application/pgp',
|
||||||
|
'gpg' => 'application/gpg-keys',
|
||||||
|
'sst' => 'application/octet-stream',
|
||||||
|
'csr' => 'application/octet-stream',
|
||||||
|
'rsa' => 'application/x-pkcs7',
|
||||||
|
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
|
||||||
|
'3g2' => 'video/3gpp2',
|
||||||
|
'3gp' => array('video/3gp', 'video/3gpp'),
|
||||||
|
'mp4' => 'video/mp4',
|
||||||
|
'm4a' => 'audio/x-m4a',
|
||||||
|
'f4v' => array('video/mp4', 'video/x-f4v'),
|
||||||
|
'flv' => 'video/x-flv',
|
||||||
|
'webm' => 'video/webm',
|
||||||
|
'aac' => 'audio/x-acc',
|
||||||
|
'm4u' => 'application/vnd.mpegurl',
|
||||||
|
'm3u' => 'text/plain',
|
||||||
|
'xspf' => 'application/xspf+xml',
|
||||||
|
'vlc' => 'application/videolan',
|
||||||
|
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
|
||||||
|
'au' => 'audio/x-au',
|
||||||
|
'ac3' => 'audio/ac3',
|
||||||
|
'flac' => 'audio/x-flac',
|
||||||
|
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
|
||||||
|
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
|
||||||
|
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
|
||||||
|
'ics' => 'text/calendar',
|
||||||
|
'ical' => 'text/calendar',
|
||||||
|
'zsh' => 'text/x-scriptzsh',
|
||||||
|
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
|
||||||
|
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
|
||||||
|
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
|
||||||
|
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
|
||||||
|
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
|
||||||
|
'vcf' => 'text/x-vcard',
|
||||||
|
'srt' => array('text/srt', 'text/plain'),
|
||||||
|
'vtt' => array('text/vtt', 'text/plain'),
|
||||||
|
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'),
|
||||||
|
'odc' => 'application/vnd.oasis.opendocument.chart',
|
||||||
|
'otc' => 'application/vnd.oasis.opendocument.chart-template',
|
||||||
|
'odf' => 'application/vnd.oasis.opendocument.formula',
|
||||||
|
'otf' => 'application/vnd.oasis.opendocument.formula-template',
|
||||||
|
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||||
|
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
|
||||||
|
'odi' => 'application/vnd.oasis.opendocument.image',
|
||||||
|
'oti' => 'application/vnd.oasis.opendocument.image-template',
|
||||||
|
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||||
|
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
|
||||||
|
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||||
|
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||||
|
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||||
|
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||||
|
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||||
|
'oth' => 'application/vnd.oasis.opendocument.text-web'
|
||||||
|
);
|
14
sna/application/config/profiler.php
Normal file
14
sna/application/config/profiler.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| Profiler Sections
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you determine whether or not various sections of Profiler
|
||||||
|
| data are displayed when the Profiler is enabled.
|
||||||
|
| Please see the user guide for info:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/profiling.html
|
||||||
|
|
|
||||||
|
*/
|
57
sna/application/config/routes.php
Normal file
57
sna/application/config/routes.php
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| URI ROUTING
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| This file lets you re-map URI requests to specific controller functions.
|
||||||
|
|
|
||||||
|
| Typically there is a one-to-one relationship between a URL string
|
||||||
|
| and its corresponding controller class/method. The segments in a
|
||||||
|
| URL normally follow this pattern:
|
||||||
|
|
|
||||||
|
| example.com/class/method/id/
|
||||||
|
|
|
||||||
|
| In some instances, however, you may want to remap this relationship
|
||||||
|
| so that a different class/function is called than the one
|
||||||
|
| corresponding to the URL.
|
||||||
|
|
|
||||||
|
| Please see the user guide for complete details:
|
||||||
|
|
|
||||||
|
| https://codeigniter.com/user_guide/general/routing.html
|
||||||
|
|
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
| RESERVED ROUTES
|
||||||
|
| -------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| There are three reserved routes:
|
||||||
|
|
|
||||||
|
| $route['default_controller'] = 'welcome';
|
||||||
|
|
|
||||||
|
| This route indicates which controller class should be loaded if the
|
||||||
|
| URI contains no data. In the above example, the "welcome" class
|
||||||
|
| would be loaded.
|
||||||
|
|
|
||||||
|
| $route['404_override'] = 'errors/page_missing';
|
||||||
|
|
|
||||||
|
| This route will tell the Router which controller/method to use if those
|
||||||
|
| provided in the URL cannot be matched to a valid route.
|
||||||
|
|
|
||||||
|
| $route['translate_uri_dashes'] = FALSE;
|
||||||
|
|
|
||||||
|
| This is not exactly a route, but allows you to automatically route
|
||||||
|
| controller and method names that contain dashes. '-' isn't a valid
|
||||||
|
| class or method name character, so it requires translation.
|
||||||
|
| When you set this option to TRUE, it will replace ALL dashes in the
|
||||||
|
| controller and method URI segments.
|
||||||
|
|
|
||||||
|
| Examples: my-controller/index -> my_controller/index
|
||||||
|
| my-controller/my-method -> my_controller/my_method
|
||||||
|
*/
|
||||||
|
$route['default_controller'] = 'home';
|
||||||
|
$route['404_override'] = '';
|
||||||
|
$route['admin'] = 'admin/index';
|
||||||
|
$route['home']='/';
|
||||||
|
|
||||||
|
$route['translate_uri_dashes'] = FALSE;
|
64
sna/application/config/smileys.php
Normal file
64
sna/application/config/smileys.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| SMILEYS
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains an array of smileys for use with the emoticon helper.
|
||||||
|
| Individual images can be used to replace multiple smileys. For example:
|
||||||
|
| :-) and :) use the same image replacement.
|
||||||
|
|
|
||||||
|
| Please see user guide for more info:
|
||||||
|
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
$smileys = array(
|
||||||
|
|
||||||
|
// smiley image name width height alt
|
||||||
|
|
||||||
|
':-)' => array('grin.gif', '19', '19', 'grin'),
|
||||||
|
':lol:' => array('lol.gif', '19', '19', 'LOL'),
|
||||||
|
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
|
||||||
|
':)' => array('smile.gif', '19', '19', 'smile'),
|
||||||
|
';-)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
';)' => array('wink.gif', '19', '19', 'wink'),
|
||||||
|
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
|
||||||
|
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
|
||||||
|
':-S' => array('confused.gif', '19', '19', 'confused'),
|
||||||
|
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
|
||||||
|
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
|
||||||
|
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
|
||||||
|
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
|
||||||
|
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
|
||||||
|
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
|
||||||
|
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
|
||||||
|
':long:' => array('longface.gif', '19', '19', 'long face'),
|
||||||
|
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
|
||||||
|
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
|
||||||
|
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
|
||||||
|
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
|
||||||
|
':down:' => array('downer.gif', '19', '19', 'downer'),
|
||||||
|
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
|
||||||
|
':sick:' => array('sick.gif', '19', '19', 'sick'),
|
||||||
|
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
|
||||||
|
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
|
||||||
|
'>:(' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
':mad:' => array('mad.gif', '19', '19', 'mad'),
|
||||||
|
'>:-(' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':angry:' => array('angry.gif', '19', '19', 'angry'),
|
||||||
|
':zip:' => array('zip.gif', '19', '19', 'zipper'),
|
||||||
|
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
|
||||||
|
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
|
||||||
|
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
|
||||||
|
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
|
||||||
|
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
|
||||||
|
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
|
||||||
|
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
|
||||||
|
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
|
||||||
|
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
|
||||||
|
':snake:' => array('snake.gif', '19', '19', 'snake'),
|
||||||
|
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
|
||||||
|
':question:' => array('question.gif', '19', '19', 'question')
|
||||||
|
|
||||||
|
);
|
214
sna/application/config/user_agents.php
Normal file
214
sna/application/config/user_agents.php
Normal file
|
@ -0,0 +1,214 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
/*
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| USER AGENT TYPES
|
||||||
|
| -------------------------------------------------------------------
|
||||||
|
| This file contains four arrays of user agent data. It is used by the
|
||||||
|
| User Agent Class to help identify browser, platform, robot, and
|
||||||
|
| mobile device data. The array keys are used to identify the device
|
||||||
|
| and the array values are used to set the actual name of the item.
|
||||||
|
*/
|
||||||
|
$platforms = array(
|
||||||
|
'windows nt 10.0' => 'Windows 10',
|
||||||
|
'windows nt 6.3' => 'Windows 8.1',
|
||||||
|
'windows nt 6.2' => 'Windows 8',
|
||||||
|
'windows nt 6.1' => 'Windows 7',
|
||||||
|
'windows nt 6.0' => 'Windows Vista',
|
||||||
|
'windows nt 5.2' => 'Windows 2003',
|
||||||
|
'windows nt 5.1' => 'Windows XP',
|
||||||
|
'windows nt 5.0' => 'Windows 2000',
|
||||||
|
'windows nt 4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt4.0' => 'Windows NT 4.0',
|
||||||
|
'winnt 4.0' => 'Windows NT',
|
||||||
|
'winnt' => 'Windows NT',
|
||||||
|
'windows 98' => 'Windows 98',
|
||||||
|
'win98' => 'Windows 98',
|
||||||
|
'windows 95' => 'Windows 95',
|
||||||
|
'win95' => 'Windows 95',
|
||||||
|
'windows phone' => 'Windows Phone',
|
||||||
|
'windows' => 'Unknown Windows OS',
|
||||||
|
'android' => 'Android',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'iphone' => 'iOS',
|
||||||
|
'ipad' => 'iOS',
|
||||||
|
'ipod' => 'iOS',
|
||||||
|
'os x' => 'Mac OS X',
|
||||||
|
'ppc mac' => 'Power PC Mac',
|
||||||
|
'freebsd' => 'FreeBSD',
|
||||||
|
'ppc' => 'Macintosh',
|
||||||
|
'linux' => 'Linux',
|
||||||
|
'debian' => 'Debian',
|
||||||
|
'sunos' => 'Sun Solaris',
|
||||||
|
'beos' => 'BeOS',
|
||||||
|
'apachebench' => 'ApacheBench',
|
||||||
|
'aix' => 'AIX',
|
||||||
|
'irix' => 'Irix',
|
||||||
|
'osf' => 'DEC OSF',
|
||||||
|
'hp-ux' => 'HP-UX',
|
||||||
|
'netbsd' => 'NetBSD',
|
||||||
|
'bsdi' => 'BSDi',
|
||||||
|
'openbsd' => 'OpenBSD',
|
||||||
|
'gnu' => 'GNU/Linux',
|
||||||
|
'unix' => 'Unknown Unix OS',
|
||||||
|
'symbian' => 'Symbian OS'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// The order of this array should NOT be changed. Many browsers return
|
||||||
|
// multiple browser types so we want to identify the sub-type first.
|
||||||
|
$browsers = array(
|
||||||
|
'OPR' => 'Opera',
|
||||||
|
'Flock' => 'Flock',
|
||||||
|
'Edge' => 'Spartan',
|
||||||
|
'Chrome' => 'Chrome',
|
||||||
|
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
|
||||||
|
'Opera.*?Version' => 'Opera',
|
||||||
|
'Opera' => 'Opera',
|
||||||
|
'MSIE' => 'Internet Explorer',
|
||||||
|
'Internet Explorer' => 'Internet Explorer',
|
||||||
|
'Trident.* rv' => 'Internet Explorer',
|
||||||
|
'Shiira' => 'Shiira',
|
||||||
|
'Firefox' => 'Firefox',
|
||||||
|
'Chimera' => 'Chimera',
|
||||||
|
'Phoenix' => 'Phoenix',
|
||||||
|
'Firebird' => 'Firebird',
|
||||||
|
'Camino' => 'Camino',
|
||||||
|
'Netscape' => 'Netscape',
|
||||||
|
'OmniWeb' => 'OmniWeb',
|
||||||
|
'Safari' => 'Safari',
|
||||||
|
'Mozilla' => 'Mozilla',
|
||||||
|
'Konqueror' => 'Konqueror',
|
||||||
|
'icab' => 'iCab',
|
||||||
|
'Lynx' => 'Lynx',
|
||||||
|
'Links' => 'Links',
|
||||||
|
'hotjava' => 'HotJava',
|
||||||
|
'amaya' => 'Amaya',
|
||||||
|
'IBrowse' => 'IBrowse',
|
||||||
|
'Maxthon' => 'Maxthon',
|
||||||
|
'Ubuntu' => 'Ubuntu Web Browser'
|
||||||
|
);
|
||||||
|
|
||||||
|
$mobiles = array(
|
||||||
|
// legacy array, old values commented out
|
||||||
|
'mobileexplorer' => 'Mobile Explorer',
|
||||||
|
// 'openwave' => 'Open Wave',
|
||||||
|
// 'opera mini' => 'Opera Mini',
|
||||||
|
// 'operamini' => 'Opera Mini',
|
||||||
|
// 'elaine' => 'Palm',
|
||||||
|
'palmsource' => 'Palm',
|
||||||
|
// 'digital paths' => 'Palm',
|
||||||
|
// 'avantgo' => 'Avantgo',
|
||||||
|
// 'xiino' => 'Xiino',
|
||||||
|
'palmscape' => 'Palmscape',
|
||||||
|
// 'nokia' => 'Nokia',
|
||||||
|
// 'ericsson' => 'Ericsson',
|
||||||
|
// 'blackberry' => 'BlackBerry',
|
||||||
|
// 'motorola' => 'Motorola'
|
||||||
|
|
||||||
|
// Phones and Manufacturers
|
||||||
|
'motorola' => 'Motorola',
|
||||||
|
'nokia' => 'Nokia',
|
||||||
|
'palm' => 'Palm',
|
||||||
|
'iphone' => 'Apple iPhone',
|
||||||
|
'ipad' => 'iPad',
|
||||||
|
'ipod' => 'Apple iPod Touch',
|
||||||
|
'sony' => 'Sony Ericsson',
|
||||||
|
'ericsson' => 'Sony Ericsson',
|
||||||
|
'blackberry' => 'BlackBerry',
|
||||||
|
'cocoon' => 'O2 Cocoon',
|
||||||
|
'blazer' => 'Treo',
|
||||||
|
'lg' => 'LG',
|
||||||
|
'amoi' => 'Amoi',
|
||||||
|
'xda' => 'XDA',
|
||||||
|
'mda' => 'MDA',
|
||||||
|
'vario' => 'Vario',
|
||||||
|
'htc' => 'HTC',
|
||||||
|
'samsung' => 'Samsung',
|
||||||
|
'sharp' => 'Sharp',
|
||||||
|
'sie-' => 'Siemens',
|
||||||
|
'alcatel' => 'Alcatel',
|
||||||
|
'benq' => 'BenQ',
|
||||||
|
'ipaq' => 'HP iPaq',
|
||||||
|
'mot-' => 'Motorola',
|
||||||
|
'playstation portable' => 'PlayStation Portable',
|
||||||
|
'playstation 3' => 'PlayStation 3',
|
||||||
|
'playstation vita' => 'PlayStation Vita',
|
||||||
|
'hiptop' => 'Danger Hiptop',
|
||||||
|
'nec-' => 'NEC',
|
||||||
|
'panasonic' => 'Panasonic',
|
||||||
|
'philips' => 'Philips',
|
||||||
|
'sagem' => 'Sagem',
|
||||||
|
'sanyo' => 'Sanyo',
|
||||||
|
'spv' => 'SPV',
|
||||||
|
'zte' => 'ZTE',
|
||||||
|
'sendo' => 'Sendo',
|
||||||
|
'nintendo dsi' => 'Nintendo DSi',
|
||||||
|
'nintendo ds' => 'Nintendo DS',
|
||||||
|
'nintendo 3ds' => 'Nintendo 3DS',
|
||||||
|
'wii' => 'Nintendo Wii',
|
||||||
|
'open web' => 'Open Web',
|
||||||
|
'openweb' => 'OpenWeb',
|
||||||
|
|
||||||
|
// Operating Systems
|
||||||
|
'android' => 'Android',
|
||||||
|
'symbian' => 'Symbian',
|
||||||
|
'SymbianOS' => 'SymbianOS',
|
||||||
|
'elaine' => 'Palm',
|
||||||
|
'series60' => 'Symbian S60',
|
||||||
|
'windows ce' => 'Windows CE',
|
||||||
|
|
||||||
|
// Browsers
|
||||||
|
'obigo' => 'Obigo',
|
||||||
|
'netfront' => 'Netfront Browser',
|
||||||
|
'openwave' => 'Openwave Browser',
|
||||||
|
'mobilexplorer' => 'Mobile Explorer',
|
||||||
|
'operamini' => 'Opera Mini',
|
||||||
|
'opera mini' => 'Opera Mini',
|
||||||
|
'opera mobi' => 'Opera Mobile',
|
||||||
|
'fennec' => 'Firefox Mobile',
|
||||||
|
|
||||||
|
// Other
|
||||||
|
'digital paths' => 'Digital Paths',
|
||||||
|
'avantgo' => 'AvantGo',
|
||||||
|
'xiino' => 'Xiino',
|
||||||
|
'novarra' => 'Novarra Transcoder',
|
||||||
|
'vodafone' => 'Vodafone',
|
||||||
|
'docomo' => 'NTT DoCoMo',
|
||||||
|
'o2' => 'O2',
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
'mobile' => 'Generic Mobile',
|
||||||
|
'wireless' => 'Generic Mobile',
|
||||||
|
'j2me' => 'Generic Mobile',
|
||||||
|
'midp' => 'Generic Mobile',
|
||||||
|
'cldc' => 'Generic Mobile',
|
||||||
|
'up.link' => 'Generic Mobile',
|
||||||
|
'up.browser' => 'Generic Mobile',
|
||||||
|
'smartphone' => 'Generic Mobile',
|
||||||
|
'cellphone' => 'Generic Mobile'
|
||||||
|
);
|
||||||
|
|
||||||
|
// There are hundreds of bots but these are the most common.
|
||||||
|
$robots = array(
|
||||||
|
'googlebot' => 'Googlebot',
|
||||||
|
'msnbot' => 'MSNBot',
|
||||||
|
'baiduspider' => 'Baiduspider',
|
||||||
|
'bingbot' => 'Bing',
|
||||||
|
'slurp' => 'Inktomi Slurp',
|
||||||
|
'yahoo' => 'Yahoo',
|
||||||
|
'ask jeeves' => 'Ask Jeeves',
|
||||||
|
'fastcrawler' => 'FastCrawler',
|
||||||
|
'infoseek' => 'InfoSeek Robot 1.0',
|
||||||
|
'lycos' => 'Lycos',
|
||||||
|
'yandex' => 'YandexBot',
|
||||||
|
'mediapartners-google' => 'MediaPartners Google',
|
||||||
|
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
|
||||||
|
'adsbot-google' => 'AdsBot Google',
|
||||||
|
'feedfetcher-google' => 'Feedfetcher Google',
|
||||||
|
'curious george' => 'Curious George',
|
||||||
|
'ia_archiver' => 'Alexa Crawler',
|
||||||
|
'MJ12bot' => 'Majestic-12',
|
||||||
|
'Uptimebot' => 'Uptimebot'
|
||||||
|
);
|
2801
sna/application/controllers/Admin.php
Normal file
2801
sna/application/controllers/Admin.php
Normal file
File diff suppressed because it is too large
Load Diff
109
sna/application/controllers/Home.php
Normal file
109
sna/application/controllers/Home.php
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Home extends CI_Controller {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->url=base_url().'home/';
|
||||||
|
|
||||||
|
$this->load->model('home_model');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$data=array(
|
||||||
|
'title'=>'Slovenski narečni atlas',
|
||||||
|
);
|
||||||
|
|
||||||
|
$data['subjects']=array(0=>'Izberite temo')+$this->home_model->subjects('select');
|
||||||
|
$data['words']=array(0=>'Izberite besedo');
|
||||||
|
|
||||||
|
$this->load_master_view('home/index_view.php',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_change_subject()
|
||||||
|
{
|
||||||
|
$id_subject=$this->input->post('id_subject',true);
|
||||||
|
|
||||||
|
//load words
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
$data['words']=array(0=>'Izberite besedo')+$this->home_model->subject_words($id_subject,'select');
|
||||||
|
|
||||||
|
$data['status']='ok';
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_add_locations()
|
||||||
|
{
|
||||||
|
$id_word=$this->input->post('id_word',true);
|
||||||
|
$id_subject=$this->input->post('id_subject',true);
|
||||||
|
|
||||||
|
//get transprictions and locations
|
||||||
|
$result=$this->home_model->words_trascriptions($id_word,$id_subject);
|
||||||
|
|
||||||
|
$data['words_transcriptions']=$result['transcriptions'];
|
||||||
|
$data['word']=$this->home_model->word($id_word);
|
||||||
|
$data['legend']=$result['legend'];
|
||||||
|
$data['transcriptions_count']=$this->home_model->transcriptions_count($id_word);
|
||||||
|
|
||||||
|
//load views
|
||||||
|
$data['view_legend']=$this->load->view('home/legend_view.php',$data,true);
|
||||||
|
$data['view_modals']=$data['view']=$this->load->view('home/transcription_popup_view.php',$data,true);
|
||||||
|
|
||||||
|
$data['status']='ok';
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_update_word_data()
|
||||||
|
{
|
||||||
|
$id_word=$this->input->post('id_word',true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$data['status']='ok';
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function about()
|
||||||
|
{
|
||||||
|
$data=array(
|
||||||
|
'title'=>'O spletni aplikaciji',
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->load_master_view('home/about.php',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function load_master_view($page,$data)
|
||||||
|
{
|
||||||
|
$this->load->view('header.php',$data);
|
||||||
|
$this->load->view($page);
|
||||||
|
$this->load->view('footer.php',$data);
|
||||||
|
}
|
||||||
|
}
|
11
sna/application/controllers/index.html
Normal file
11
sna/application/controllers/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/core/index.html
Normal file
11
sna/application/core/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/helpers/index.html
Normal file
11
sna/application/helpers/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/hooks/index.html
Normal file
11
sna/application/hooks/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/index.html
Normal file
11
sna/application/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/language/english/index.html
Normal file
11
sna/application/language/english/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/language/index.html
Normal file
11
sna/application/language/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
2263
sna/application/libraries/Googlemaps.php
Normal file
2263
sna/application/libraries/Googlemaps.php
Normal file
File diff suppressed because it is too large
Load Diff
352
sna/application/libraries/Jsmin.php
Normal file
352
sna/application/libraries/Jsmin.php
Normal file
|
@ -0,0 +1,352 @@
|
||||||
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
/**
|
||||||
|
* jsmin.php - PHP implementation of Douglas Crockford's JSMin.
|
||||||
|
*
|
||||||
|
* This is pretty much a direct port of jsmin.c to PHP with just a few
|
||||||
|
* PHP-specific performance tweaks. Also, whereas jsmin.c reads from stdin and
|
||||||
|
* outputs to stdout, this library accepts a string as input and returns another
|
||||||
|
* string as output.
|
||||||
|
*
|
||||||
|
* PHP 5 or higher is required.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted to use this version of the library under the
|
||||||
|
* same terms as jsmin.c, which has the following license:
|
||||||
|
*
|
||||||
|
* --
|
||||||
|
* Copyright (c) 2002 Douglas Crockford (www.crockford.com)
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
* of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
* so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* The Software shall be used for Good, not Evil.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
* --
|
||||||
|
*
|
||||||
|
* @package JSMin
|
||||||
|
* @author Ryan Grove <ryan@wonko.com>
|
||||||
|
* @copyright 2002 Douglas Crockford <douglas@crockford.com> (jsmin.c)
|
||||||
|
* @copyright 2008 Ryan Grove <ryan@wonko.com> (PHP port)
|
||||||
|
* @license http://opensource.org/licenses/mit-license.php MIT License
|
||||||
|
* @version 1.1.1 (2008-03-02)
|
||||||
|
* @link https://github.com/rgrove/jsmin-php/
|
||||||
|
*/
|
||||||
|
|
||||||
|
class JSMin {
|
||||||
|
const ORD_LF = 10;
|
||||||
|
const ORD_SPACE = 32;
|
||||||
|
const ACTION_KEEP_A = 1;
|
||||||
|
const ACTION_DELETE_A = 2;
|
||||||
|
const ACTION_DELETE_A_B = 3;
|
||||||
|
|
||||||
|
protected $a = '';
|
||||||
|
protected $b = '';
|
||||||
|
protected $input = '';
|
||||||
|
protected $inputIndex = 0;
|
||||||
|
protected $inputLength = 0;
|
||||||
|
protected $lookAhead = null;
|
||||||
|
protected $output = '';
|
||||||
|
|
||||||
|
// -- Protected Instance Methods ---------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action -- do something! What to do is determined by the $command argument.
|
||||||
|
*
|
||||||
|
* action treats a string as a single character. Wow!
|
||||||
|
* action recognizes a regular expression if it is preceded by ( or , or =.
|
||||||
|
*
|
||||||
|
* @uses next()
|
||||||
|
* @uses get()
|
||||||
|
* @throws JSMinException If parser errors are found:
|
||||||
|
* - Unterminated string literal
|
||||||
|
* - Unterminated regular expression set in regex literal
|
||||||
|
* - Unterminated regular expression literal
|
||||||
|
* @param int $command One of class constants:
|
||||||
|
* ACTION_KEEP_A Output A. Copy B to A. Get the next B.
|
||||||
|
* ACTION_DELETE_A Copy B to A. Get the next B. (Delete A).
|
||||||
|
* ACTION_DELETE_A_B Get the next B. (Delete B).
|
||||||
|
*/
|
||||||
|
protected function action($command) {
|
||||||
|
switch($command) {
|
||||||
|
case self::ACTION_KEEP_A:
|
||||||
|
$this->output .= $this->a;
|
||||||
|
|
||||||
|
case self::ACTION_DELETE_A:
|
||||||
|
$this->a = $this->b;
|
||||||
|
|
||||||
|
if ($this->a === "'" || $this->a === '"') {
|
||||||
|
for (;;) {
|
||||||
|
$this->output .= $this->a;
|
||||||
|
$this->a = $this->get();
|
||||||
|
|
||||||
|
if ($this->a === $this->b) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ord($this->a) <= self::ORD_LF) {
|
||||||
|
throw new JSMinException('Unterminated string literal.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->a === '\\') {
|
||||||
|
$this->output .= $this->a;
|
||||||
|
$this->a = $this->get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
case self::ACTION_DELETE_A_B:
|
||||||
|
$this->b = $this->next();
|
||||||
|
|
||||||
|
if ($this->b === '/' && (
|
||||||
|
$this->a === '(' || $this->a === ',' || $this->a === '=' ||
|
||||||
|
$this->a === ':' || $this->a === '[' || $this->a === '!' ||
|
||||||
|
$this->a === '&' || $this->a === '|' || $this->a === '?' ||
|
||||||
|
$this->a === '{' || $this->a === '}' || $this->a === ';' ||
|
||||||
|
$this->a === "\n" )) {
|
||||||
|
|
||||||
|
$this->output .= $this->a . $this->b;
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
$this->a = $this->get();
|
||||||
|
|
||||||
|
if ($this->a === '[') {
|
||||||
|
/*
|
||||||
|
inside a regex [...] set, which MAY contain a '/' itself. Example: mootools Form.Validator near line 460:
|
||||||
|
return Form.Validator.getValidator('IsEmpty').test(element) || (/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]\.?){0,63}[a-z0-9!#$%&'*+/=?^_`{|}~-]@(?:(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\])$/i).test(element.get('value'));
|
||||||
|
*/
|
||||||
|
for (;;) {
|
||||||
|
$this->output .= $this->a;
|
||||||
|
$this->a = $this->get();
|
||||||
|
|
||||||
|
if ($this->a === ']') {
|
||||||
|
break;
|
||||||
|
} elseif ($this->a === '\\') {
|
||||||
|
$this->output .= $this->a;
|
||||||
|
$this->a = $this->get();
|
||||||
|
} elseif (ord($this->a) <= self::ORD_LF) {
|
||||||
|
throw new JSMinException('Unterminated regular expression set in regex literal.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($this->a === '/') {
|
||||||
|
break;
|
||||||
|
} elseif ($this->a === '\\') {
|
||||||
|
$this->output .= $this->a;
|
||||||
|
$this->a = $this->get();
|
||||||
|
} elseif (ord($this->a) <= self::ORD_LF) {
|
||||||
|
throw new JSMinException('Unterminated regular expression literal.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->output .= $this->a;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->b = $this->next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get next char. Convert ctrl char to space.
|
||||||
|
*
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
protected function get() {
|
||||||
|
$c = $this->lookAhead;
|
||||||
|
$this->lookAhead = null;
|
||||||
|
|
||||||
|
if ($c === null) {
|
||||||
|
if ($this->inputIndex < $this->inputLength) {
|
||||||
|
$c = substr($this->input, $this->inputIndex, 1);
|
||||||
|
$this->inputIndex += 1;
|
||||||
|
} else {
|
||||||
|
$c = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($c === "\r") {
|
||||||
|
return "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($c === null || $c === "\n" || ord($c) >= self::ORD_SPACE) {
|
||||||
|
return $c;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is $c a letter, digit, underscore, dollar sign, or non-ASCII character.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function isAlphaNum($c) {
|
||||||
|
return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform minification, return result
|
||||||
|
*
|
||||||
|
* @uses action()
|
||||||
|
* @uses isAlphaNum()
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function min($js) {
|
||||||
|
|
||||||
|
$this->input = str_replace("\r\n", "\n", $js);
|
||||||
|
$this->inputLength = strlen($this->input);
|
||||||
|
|
||||||
|
$this->a = "\n";
|
||||||
|
$this->action(self::ACTION_DELETE_A_B);
|
||||||
|
|
||||||
|
while ($this->a !== null) {
|
||||||
|
switch ($this->a) {
|
||||||
|
case ' ':
|
||||||
|
if ($this->isAlphaNum($this->b)) {
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
} else {
|
||||||
|
$this->action(self::ACTION_DELETE_A);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "\n":
|
||||||
|
switch ($this->b) {
|
||||||
|
case '{':
|
||||||
|
case '[':
|
||||||
|
case '(':
|
||||||
|
case '+':
|
||||||
|
case '-':
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ' ':
|
||||||
|
$this->action(self::ACTION_DELETE_A_B);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if ($this->isAlphaNum($this->b)) {
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->action(self::ACTION_DELETE_A);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
switch ($this->b) {
|
||||||
|
case ' ':
|
||||||
|
if ($this->isAlphaNum($this->a)) {
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->action(self::ACTION_DELETE_A_B);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "\n":
|
||||||
|
switch ($this->a) {
|
||||||
|
case '}':
|
||||||
|
case ']':
|
||||||
|
case ')':
|
||||||
|
case '+':
|
||||||
|
case '-':
|
||||||
|
case '"':
|
||||||
|
case "'":
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if ($this->isAlphaNum($this->a)) {
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->action(self::ACTION_DELETE_A_B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$this->action(self::ACTION_KEEP_A);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the next character, skipping over comments. peek() is used to see
|
||||||
|
* if a '/' is followed by a '/' or '*'.
|
||||||
|
*
|
||||||
|
* @uses get()
|
||||||
|
* @uses peek()
|
||||||
|
* @throws JSMinException On unterminated comment.
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function next() {
|
||||||
|
$c = $this->get();
|
||||||
|
|
||||||
|
if ($c === '/') {
|
||||||
|
switch($this->peek()) {
|
||||||
|
case '/':
|
||||||
|
for (;;) {
|
||||||
|
$c = $this->get();
|
||||||
|
|
||||||
|
if (ord($c) <= self::ORD_LF) {
|
||||||
|
return $c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
case '*':
|
||||||
|
$this->get();
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
switch($this->get()) {
|
||||||
|
case '*':
|
||||||
|
if ($this->peek() === '/') {
|
||||||
|
$this->get();
|
||||||
|
return ' ';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case null:
|
||||||
|
throw new JSMinException('Unterminated comment.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
return $c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $c;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get next char. If is ctrl character, translate to a space or newline.
|
||||||
|
*
|
||||||
|
* @uses get()
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
protected function peek() {
|
||||||
|
$this->lookAhead = $this->get();
|
||||||
|
return $this->lookAhead;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Exceptions ---------------------------------------------------------------
|
||||||
|
class JSMinException extends Exception {}
|
||||||
|
?>
|
11
sna/application/libraries/index.html
Normal file
11
sna/application/libraries/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/logs/index.html
Normal file
11
sna/application/logs/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
563
sna/application/models/Admin_model.php
Normal file
563
sna/application/models/Admin_model.php
Normal file
|
@ -0,0 +1,563 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Class Admin_model extends CI_Model {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->load->database();
|
||||||
|
}
|
||||||
|
|
||||||
|
function users()
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*');
|
||||||
|
$this->db->from("users AS t1");
|
||||||
|
$result=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function user($id_user)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*');
|
||||||
|
$this->db->from("users AS t1");
|
||||||
|
$this->db->where('t1.id',$id_user);
|
||||||
|
$user=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
|
|
||||||
|
function perform_login($username,$password)
|
||||||
|
{
|
||||||
|
$this->db->select("
|
||||||
|
t1.*,
|
||||||
|
");
|
||||||
|
$this->db->from('users AS t1');
|
||||||
|
$this->db->where('t1.username',$username);
|
||||||
|
$user=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
if(password_verify($password, $user['password_hash']))
|
||||||
|
{
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function subject($id)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('subjects AS t1');
|
||||||
|
$this->db->where('id',$id);
|
||||||
|
$subject=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
function subjects()
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('subjects AS t1');
|
||||||
|
$subjects=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
$data=array();
|
||||||
|
foreach($subjects as $subject)
|
||||||
|
{
|
||||||
|
$data[$subject['id']]=$subject['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function word($id)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*');
|
||||||
|
$this->db->from("words AS t1");
|
||||||
|
$this->db->where("t1.id",$id);
|
||||||
|
$word=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
if(isset($word['image']))
|
||||||
|
{
|
||||||
|
$word['image']=$word['image'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($word['comment']))
|
||||||
|
{
|
||||||
|
$word['comment']=$word['comment'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return $word;
|
||||||
|
}
|
||||||
|
|
||||||
|
function transcriptions($id_word=0,$id_location=0,$id_subject=0,$id_transcription=0,$id_lexem=0)
|
||||||
|
{
|
||||||
|
$this->db->select('
|
||||||
|
t1.*,
|
||||||
|
t2.name,
|
||||||
|
t3.title AS lexem_title,
|
||||||
|
t4.title AS word_title,
|
||||||
|
t5.title AS subject_title,
|
||||||
|
');
|
||||||
|
$this->db->from('transcriptions AS t1');
|
||||||
|
$this->db->join('locations AS t2','on t1.id_location=t2.id','LEFT');
|
||||||
|
$this->db->join('lexems AS t3','on t1.id_lexem=t3.id','LEFT');
|
||||||
|
$this->db->join('words AS t4','on t3.id_word=t4.id','LEFT');
|
||||||
|
$this->db->join('subjects AS t5','on t4.id_subject=t5.id','LEFT');
|
||||||
|
if($id_subject)
|
||||||
|
{
|
||||||
|
$this->db->where('t4.id_subject',$id_subject);
|
||||||
|
}
|
||||||
|
if($id_word)
|
||||||
|
{
|
||||||
|
$this->db->where('t3.id_word',$id_word);
|
||||||
|
}
|
||||||
|
if($id_location)
|
||||||
|
{
|
||||||
|
$this->db->where('t1.id_location',$id_location);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($id_transcription)
|
||||||
|
{
|
||||||
|
$this->db->where('t1.id!=',$id_transcription);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($id_lexem)
|
||||||
|
{
|
||||||
|
$this->db->where('t1.id_lexem',$id_lexem);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->order_by('lexem_title','ASC');
|
||||||
|
|
||||||
|
$result=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function transcription($id)
|
||||||
|
{
|
||||||
|
$this->db->select('
|
||||||
|
t1.*,
|
||||||
|
t2.title AS lexem_title,
|
||||||
|
t3.id_subject,
|
||||||
|
t3.id AS id_word,
|
||||||
|
');
|
||||||
|
$this->db->from('transcriptions AS t1');
|
||||||
|
$this->db->join('lexems AS t2','on t1.id_lexem=t2.id');
|
||||||
|
$this->db->join('words AS t3','on t2.id_word=t3.id');
|
||||||
|
$this->db->where('t1.id',$id);
|
||||||
|
|
||||||
|
$result=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function titles($id_word)
|
||||||
|
{
|
||||||
|
$this->db->select('id,title');
|
||||||
|
$this->db->from('lexems');
|
||||||
|
$this->db->where('id_word',$id_word);
|
||||||
|
$this->db->group_by('title,id');
|
||||||
|
$this->db->order_by('title','ASC');
|
||||||
|
$titles=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
foreach($titles as $title)
|
||||||
|
{
|
||||||
|
$data[$title['id']]=$title['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function locations($id_subject)
|
||||||
|
{
|
||||||
|
$this->db->select('t2.*');
|
||||||
|
$this->db->from('subject_locations AS t1');
|
||||||
|
$this->db->join('locations AS t2','t2.id=t1.id_location');
|
||||||
|
if($id_subject)
|
||||||
|
{
|
||||||
|
$this->db->where('t1.id_subject',$id_subject);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->order_by('t2.name','ASC');
|
||||||
|
$this->db->group_by('t2.id');
|
||||||
|
|
||||||
|
$result=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
foreach($result as $location)
|
||||||
|
{
|
||||||
|
$data[$location['id']]=$location['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function locations_all()
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('locations');
|
||||||
|
$this->db->order_by('name','ASC');
|
||||||
|
$result=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function location($id_location)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('locations');
|
||||||
|
$this->db->where('id',$id_location);
|
||||||
|
|
||||||
|
$location=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $location;
|
||||||
|
}
|
||||||
|
|
||||||
|
function subject_locations($id_location)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('subject_locations');
|
||||||
|
$this->db->where('id_location',$id_location);
|
||||||
|
$subject_locations=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
$data=array();
|
||||||
|
foreach($subject_locations as $entry)
|
||||||
|
{
|
||||||
|
$data[$entry['id_subject']]=$entry['id_subject'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dialects($options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('dialects');
|
||||||
|
$this->db->where('type',1);
|
||||||
|
$dialects=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options)
|
||||||
|
{
|
||||||
|
$data=array();
|
||||||
|
foreach($dialects as $dialect)
|
||||||
|
{
|
||||||
|
$data[$dialect['id']]=$dialect['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $dialects;
|
||||||
|
}
|
||||||
|
|
||||||
|
function subdialects($id_dialect,$options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('dialects');
|
||||||
|
$this->db->where('type',2);
|
||||||
|
$this->db->where('id_parent',$id_dialect);
|
||||||
|
$subdialects=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options)
|
||||||
|
{
|
||||||
|
$data=array();
|
||||||
|
foreach($subdialects as $dialect)
|
||||||
|
{
|
||||||
|
$data[$dialect['id']]=$dialect['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $subdialects;
|
||||||
|
}
|
||||||
|
|
||||||
|
function subsubdialects($id_subdialect,$options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('dialects');
|
||||||
|
$this->db->where('type',3);
|
||||||
|
$this->db->where('id_parent',$id_subdialect);
|
||||||
|
$subsubdialects=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options)
|
||||||
|
{
|
||||||
|
$data=array();
|
||||||
|
foreach($subsubdialects as $dialect)
|
||||||
|
{
|
||||||
|
$data[$dialect['id']]=$dialect['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $subsubdialects;
|
||||||
|
}
|
||||||
|
|
||||||
|
function locations_by_word($id_word)
|
||||||
|
{
|
||||||
|
//get selected locations
|
||||||
|
$this->db->select("
|
||||||
|
t2.*
|
||||||
|
");
|
||||||
|
$this->db->from('transcriptions as t1');
|
||||||
|
$this->db->join('locations as t2','on t1.id_location=t2.id');
|
||||||
|
$this->db->where('t1.id_word',$id_word);
|
||||||
|
$selected_locations=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
//all locations
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('locations');
|
||||||
|
$locations=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
//init data array for unselected locations
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
foreach($locations as $location)
|
||||||
|
{
|
||||||
|
if(!in_array($location,$selected_locations))
|
||||||
|
{
|
||||||
|
$data[$location['id']]=$location['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lexems($id_word=0,$id_subject=0,$options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('
|
||||||
|
t1.*,
|
||||||
|
t2.title AS word_title,
|
||||||
|
t3.title AS subject_title,
|
||||||
|
');
|
||||||
|
$this->db->from('lexems AS t1');
|
||||||
|
$this->db->join('words AS t2','t1.id_word=t2.id');
|
||||||
|
$this->db->join('subjects AS t3','t2.id_subject=t3.id');
|
||||||
|
if($id_subject)
|
||||||
|
{
|
||||||
|
$this->db->where('t2.id_subject',$id_subject);
|
||||||
|
}
|
||||||
|
if($id_word)
|
||||||
|
{
|
||||||
|
$this->db->where('t1.id_word',$id_word);
|
||||||
|
}
|
||||||
|
$this->db->order_by('t1.title','ASC');
|
||||||
|
$lexems=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options)
|
||||||
|
{
|
||||||
|
$data=array();
|
||||||
|
foreach($lexems as $lexem)
|
||||||
|
{
|
||||||
|
$data[$lexem['id']]=$lexem['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lexems;
|
||||||
|
}
|
||||||
|
|
||||||
|
function word_lexems($id_word,$options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('
|
||||||
|
t1.*,
|
||||||
|
t2.title AS word_title,
|
||||||
|
');
|
||||||
|
$this->db->from('lexems AS t1');
|
||||||
|
$this->db->join('words AS t2','t1.id_word=t2.id');
|
||||||
|
$this->db->where('t1.id_word',$id_word);
|
||||||
|
$this->db->order_by('t1.title','ASC');
|
||||||
|
$lexems=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options)
|
||||||
|
{
|
||||||
|
$data=array();
|
||||||
|
foreach($lexems as $lexem)
|
||||||
|
{
|
||||||
|
$data[$lexem['id']]=$lexem['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lexems;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lexem($id)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*,t2.id_subject');
|
||||||
|
$this->db->from('lexems AS t1');
|
||||||
|
$this->db->join('words AS t2','t2.id=t1.id_word');
|
||||||
|
$this->db->where('t1.id',$id);
|
||||||
|
$lexem=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $lexem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function subject_title_exists($title,$id=0)
|
||||||
|
{
|
||||||
|
$this->db->from('subjects');
|
||||||
|
$this->db->where('title',$title);
|
||||||
|
if($id)
|
||||||
|
{
|
||||||
|
$this->db->where('id!=',$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$exists=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
function words_title_exists($title,$id=0,$id_subject)
|
||||||
|
{
|
||||||
|
$this->db->from('words');
|
||||||
|
$this->db->where('title',$title);
|
||||||
|
if($id)
|
||||||
|
{
|
||||||
|
$this->db->where('id!=',$id);
|
||||||
|
}
|
||||||
|
$this->db->where('id_subject',$id_subject);
|
||||||
|
$exists=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
function location_exists($field,$parameter,$id=0)
|
||||||
|
{
|
||||||
|
$this->db->from('locations');
|
||||||
|
$this->db->where($field,$parameter);
|
||||||
|
if($id)
|
||||||
|
{
|
||||||
|
$this->db->where('id!=',$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$exists=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
function location_short_name_exists($short_name,$id=0)
|
||||||
|
{
|
||||||
|
$this->db->select('short_name');
|
||||||
|
$this->db->from('locations');
|
||||||
|
$this->db->where('short_name',$short_name);
|
||||||
|
if($id)
|
||||||
|
{
|
||||||
|
$this->db->where('id!=',$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$names=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
$identical=false;
|
||||||
|
foreach($names as $name)
|
||||||
|
{
|
||||||
|
if(strcmp($name['short_name'],$short_name)==0)
|
||||||
|
{
|
||||||
|
$identical=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $identical;
|
||||||
|
}
|
||||||
|
|
||||||
|
function coordinates_exists($lat,$long,$id=0)
|
||||||
|
{
|
||||||
|
$this->db->from('locations');
|
||||||
|
$this->db->where('lat',$lat);
|
||||||
|
$this->db->where('long',$long);
|
||||||
|
if($id)
|
||||||
|
{
|
||||||
|
$this->db->where('id!=',$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$exists=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lexem_title_exists($id=0,$title,$id_subject,$id_word)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function username_exists($username,$id_user)
|
||||||
|
{
|
||||||
|
$this->db->from('users');
|
||||||
|
$this->db->where('username',$username);
|
||||||
|
$this->db->where('id!=',$id_user);
|
||||||
|
$exists=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
function subject_links($id_subject)
|
||||||
|
{
|
||||||
|
//words
|
||||||
|
$this->db->from('words');
|
||||||
|
$this->db->where('id_subject',$id_subject);
|
||||||
|
$word_c=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $word_c;
|
||||||
|
}
|
||||||
|
|
||||||
|
function locations_links($id_location)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('transcriptions');
|
||||||
|
$this->db->where('id_location',$id_location);
|
||||||
|
$links=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $links;
|
||||||
|
}
|
||||||
|
|
||||||
|
function word_links($id_word)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('lexems');
|
||||||
|
$this->db->where('id_word',$id_word);
|
||||||
|
$links=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $links;
|
||||||
|
}
|
||||||
|
|
||||||
|
function lexem_links($id)
|
||||||
|
{
|
||||||
|
$this->db->select('*');
|
||||||
|
$this->db->from('transcriptions');
|
||||||
|
$this->db->where('id_lexem',$id);
|
||||||
|
$links=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
return $links;
|
||||||
|
}
|
||||||
|
}
|
292
sna/application/models/Home_model.php
Normal file
292
sna/application/models/Home_model.php
Normal file
|
@ -0,0 +1,292 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Class Home_model extends CI_Model {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->load->database();
|
||||||
|
}
|
||||||
|
|
||||||
|
function subjects($options=false)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*');
|
||||||
|
$this->db->from("subjects AS t1");
|
||||||
|
$this->db->order_by('title','ASC');
|
||||||
|
$subjects=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options=='select')
|
||||||
|
{
|
||||||
|
//init
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
foreach($subjects as $subject)
|
||||||
|
{
|
||||||
|
$data[$subject['id']]=$subject['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $subjects;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function subject_words($id_subject,$options='select')
|
||||||
|
{
|
||||||
|
$this->db->select('t2.*');
|
||||||
|
$this->db->from("subjects AS t1");
|
||||||
|
$this->db->join("words as t2","t2.id_subject=t1.id");
|
||||||
|
$this->db->where("t1.id",$id_subject);
|
||||||
|
$this->db->order_by('t2.title','ASC');
|
||||||
|
$words=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
if($options=='select')
|
||||||
|
{
|
||||||
|
//init
|
||||||
|
$data=array();
|
||||||
|
|
||||||
|
foreach($words as $word)
|
||||||
|
{
|
||||||
|
$data[$word['id']]=$word['title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $words;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function words_trascriptions($id_word,$id_subject)
|
||||||
|
{
|
||||||
|
if($id_word)
|
||||||
|
{
|
||||||
|
//init
|
||||||
|
$used=array();
|
||||||
|
$result=array();
|
||||||
|
|
||||||
|
$this->db->select('
|
||||||
|
t2.*,
|
||||||
|
t3.name AS dialect_title,
|
||||||
|
t4.name AS subdialect_title,
|
||||||
|
t5.name AS subsubdialect_title,
|
||||||
|
');
|
||||||
|
$this->db->from('subject_locations AS t1');
|
||||||
|
$this->db->join('locations AS t2','t1.id_location=t2.id');
|
||||||
|
$this->db->join('dialects AS t3','t2.id_dialect=t3.id');
|
||||||
|
$this->db->join('dialects AS t4','t2.id_subdialect=t4.id');
|
||||||
|
$this->db->join('dialects AS t5','t2.id_subsubdialect=t5.id','LEFT');
|
||||||
|
$this->db->where('t1.id_subject',$id_subject);
|
||||||
|
$locations=$this->db->get()->result_array();
|
||||||
|
|
||||||
|
foreach($locations as $i=>$location)
|
||||||
|
{
|
||||||
|
$pixels=$this->convert_to_pixels($location['lat'],$location['long']);
|
||||||
|
|
||||||
|
$result[$i]['x']=$pixels['x'];
|
||||||
|
$result[$i]['y']=$pixels['y'];
|
||||||
|
$result[$i]['name']=$location['name'];
|
||||||
|
$result[$i]['short_name']=$location['short_name'];
|
||||||
|
$result[$i]['dialect']=$location['dialect_title'];
|
||||||
|
$result[$i]['subdialect']=$location['subdialect_title'];
|
||||||
|
if(isset($location['subsubdialect_title']))
|
||||||
|
{
|
||||||
|
$result[$i]['subsubdialect']=$location['subsubdialect_title'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->db->select('
|
||||||
|
t1.*,
|
||||||
|
t2.title,
|
||||||
|
t2.icon,
|
||||||
|
t2.id_word,
|
||||||
|
t2.icon_color,
|
||||||
|
');
|
||||||
|
$this->db->from('transcriptions AS t1');
|
||||||
|
$this->db->join('lexems AS t2','t1.id_lexem=t2.id');
|
||||||
|
$this->db->where('t2.id_word',$id_word);
|
||||||
|
$this->db->where('t1.id_location',$location['id']);
|
||||||
|
$transcription=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
if($transcription)
|
||||||
|
{
|
||||||
|
$result[$i]['pin']=$transcription['icon'];
|
||||||
|
$result[$i]['id']=$transcription['id'];
|
||||||
|
$result[$i]['title']=$transcription['title'];
|
||||||
|
$result[$i]['phonetic_writing']=$transcription['phonetic_writing'];
|
||||||
|
$result[$i]['audio']=$transcription['audio'];
|
||||||
|
$result[$i]['id_word']=$transcription['id_word'];
|
||||||
|
$result[$i]['id_location']=$transcription['id_location'];
|
||||||
|
$result[$i]['trans_text']=$transcription['trans_text'];
|
||||||
|
$result[$i]['icon']=$transcription['icon'];
|
||||||
|
$result[$i]['icon_color']=$transcription['icon_color'];
|
||||||
|
|
||||||
|
//only allowed chars
|
||||||
|
$code_title = preg_replace('/[^a-zA-Z0-9]/','', $transcription['title']);
|
||||||
|
$result[$i]['code_title']=$code_title;
|
||||||
|
|
||||||
|
if(!array_key_exists($transcription['title'],$used))
|
||||||
|
{
|
||||||
|
if($transcription['icon'])
|
||||||
|
{
|
||||||
|
$used[$transcription['title']]=array(
|
||||||
|
'icon'=>$transcription['icon'],
|
||||||
|
'icon_color'=>$transcription['icon_color'],
|
||||||
|
'code_title'=>$code_title,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result[$i]['pin']="no_title";
|
||||||
|
$result[$i]['title']='no_title';
|
||||||
|
$result[$i]['code_title']='no_title';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//add no title for the last
|
||||||
|
$used['no_title']=array(
|
||||||
|
'icon'=>'/',
|
||||||
|
'icon_color'=>"#000000",
|
||||||
|
'code_title'=>'no_title'
|
||||||
|
);
|
||||||
|
|
||||||
|
$data=array(
|
||||||
|
'legend'=>$used,
|
||||||
|
'transcriptions'=>$result,
|
||||||
|
);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function convert_to_pixels($lat,$long)
|
||||||
|
{
|
||||||
|
//init
|
||||||
|
//corners min, max in geo
|
||||||
|
$min_lat=46.996232;
|
||||||
|
$min_long=13.059296;
|
||||||
|
$max_lat=45.400639;
|
||||||
|
$max_long=16.620767;
|
||||||
|
|
||||||
|
//height,width of canvas
|
||||||
|
$height=719; //719.964
|
||||||
|
$width=1111; //1111.625
|
||||||
|
|
||||||
|
//error
|
||||||
|
$height_err=0; //20
|
||||||
|
$width_err=30; //35
|
||||||
|
|
||||||
|
//calculate pixes per degree
|
||||||
|
$ppd_height=number_format($height/($min_lat-$max_lat),6);
|
||||||
|
$ppd_width=number_format($width/abs($min_long-$max_long),6);
|
||||||
|
|
||||||
|
//perform calculations
|
||||||
|
$delta_x=number_format(abs($min_long-$long),6);
|
||||||
|
$delta_y=number_format(abs($min_lat-$lat),6);
|
||||||
|
|
||||||
|
$x=(int)($delta_x*$ppd_width)-$width_err;
|
||||||
|
$y=(int)($delta_y*$ppd_height)-$height_err;
|
||||||
|
|
||||||
|
$result=array(
|
||||||
|
'x'=>$x,
|
||||||
|
'y'=>$y,
|
||||||
|
);
|
||||||
|
|
||||||
|
//print_r($result);die();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function transcriptions_count($id_word)
|
||||||
|
{
|
||||||
|
$this->db->from('transcriptions AS t1');
|
||||||
|
$this->db->join('lexems AS t2','t1.id_lexem=t2.id');
|
||||||
|
$this->db->where('t2.id_word',$id_word);
|
||||||
|
$c=$this->db->count_all_results();
|
||||||
|
|
||||||
|
return $c;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function word_title($id_word)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.title');
|
||||||
|
$this->db->from("words AS t1");
|
||||||
|
$this->db->where("t1.id",$id_word);
|
||||||
|
$word=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
return $word;
|
||||||
|
}
|
||||||
|
|
||||||
|
function word($id)
|
||||||
|
{
|
||||||
|
$this->db->select('t1.*');
|
||||||
|
$this->db->from("words AS t1");
|
||||||
|
$this->db->where("t1.id",$id);
|
||||||
|
$word=$this->db->get()->row_array();
|
||||||
|
|
||||||
|
if(isset($word['image']) and $word['image'])
|
||||||
|
{
|
||||||
|
$word['image']=$word['image'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$word['image']='';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($word['comment']) and $word['comment'])
|
||||||
|
{
|
||||||
|
$word['comment']=base_url().$word['comment'].'#zoom=100';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$word['comment']='';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $word;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_icons()
|
||||||
|
{
|
||||||
|
//init
|
||||||
|
$icons=array();
|
||||||
|
|
||||||
|
$images = glob('images/icons/*.{jpeg,gif,png,svg}', GLOB_BRACE);
|
||||||
|
|
||||||
|
foreach($images as $image)
|
||||||
|
{
|
||||||
|
$icons[]=basename($image);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $icons;
|
||||||
|
}
|
||||||
|
}
|
11
sna/application/models/index.html
Normal file
11
sna/application/models/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/third_party/index.html
vendored
Normal file
11
sna/application/third_party/index.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
225
sna/application/views/admin/add_location_view.php
Normal file
225
sna/application/views/admin/add_location_view.php
Normal file
|
@ -0,0 +1,225 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>locations">Lokacije</a></li>
|
||||||
|
<li><a href="#">Nova lokacija</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted">Nova lokacija</h4></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_add_location" method="POST" id="edit_location">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name" class="col-sm-2 control-label">Kraj<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['name']?>" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Kratek naziv<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['short_name']?>" id="short_name" name="short_name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Zemljepisna širina (lat)<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" style="width:120px;" class="form-control input-md input-short" value="<?=$location['lat']?>" id="lat" name="lat">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Zemljepisna dolžina (long)<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" style="width:120px;" class="form-control input-md input-short" value="<?=$location['long']?>" id="long" name="long" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="dialects" class="col-sm-2 control-label">Narečna skupina<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="dialects" name="dialects" onchange="ajax_update_subdialects();">
|
||||||
|
<?
|
||||||
|
foreach($dialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_dialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subdialects" class="col-sm-2 control-label">Narečje<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subdialects" name="subdialects" onchange="ajax_update_subsubdialects();">
|
||||||
|
<?
|
||||||
|
foreach($subdialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_subdialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subsubdialects" class="col-sm-2 control-label">Podnarečje</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subsubdialects" name="subsubdialects">
|
||||||
|
<?
|
||||||
|
foreach($subsubdialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_subsubdialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subsubdialects" class="col-sm-2 control-label">Vsebovana v temah</label>
|
||||||
|
<div class="col-sm-10" style="padding-top:10px;">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="subjects[]" value="<?=$id?>"> <?=$subject?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_update_subdialects()
|
||||||
|
{
|
||||||
|
var id_dialect=$("#dialects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_subdialects",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_dialect: id_dialect
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#subdialects').empty();
|
||||||
|
|
||||||
|
$.each(data.subdialects, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#subdialects').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_update_subsubdialects()
|
||||||
|
{
|
||||||
|
var id_subdialect=$("#subdialects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_subsubdialects",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subdialect: id_subdialect
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#subsubdialects').empty();
|
||||||
|
|
||||||
|
$.each(data.subsubdialects, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#subsubdialects').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
90
sna/application/views/admin/add_subject_view.php
Normal file
90
sna/application/views/admin/add_subject_view.php
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>edit_content">Teme</a></li>
|
||||||
|
<li><a href="#">Nova tema</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted">Nova tema</h4></div>
|
||||||
|
<div class="col-sm-3 text-right"></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_add_subject" method="POST" id="add_subject">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Naziv teme<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$subject['title']?>" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
254
sna/application/views/admin/add_transcription_view.php
Normal file
254
sna/application/views/admin/add_transcription_view.php
Normal file
|
@ -0,0 +1,254 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>transcriptions">Fonetični zapisi</a></li>
|
||||||
|
<li><a href="#"><span class="ZRCola">Nov fonetični zapis</span></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted ZRCola">Nov fonetični zapis</h4></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_add_transcription" method="POST" enctype="multipart/form-data" id="add_transcription">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="phonetic_writing" class="col-sm-2 control-label">Fonetični zapis<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md ZRCola" style="width:300px;" value="<?=$transcription['phonetic_writing']?>" id="phonetic_writing" name="phonetic_writing">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="col-sm-2 control-label">Tema<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subjects" name="subjects" onchange="ajax_update_words();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_subject']?'selected="selected"':''?> ><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="col-sm-2 control-label">Beseda<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="words" id="words" onchange="ajax_update_lexems();">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_word']?'selected="selected"':''?>><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lexems_select" class="col-sm-2 control-label">Leksem<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" id="lexems_select" name="lexems_select" style="width:300px;" >
|
||||||
|
<?
|
||||||
|
foreach($lexems as $id=>$title)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_lexem']?'selected="selected"':''?>><?=$title?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Kraj<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="locations" id="locations_select">
|
||||||
|
<?
|
||||||
|
foreach($locations as $id=>$location)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_location']?'selected="selected"':''?>><?=$location?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Zvočni posnetek</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="file" class="upload-btn" id="audio_file" name="audio_file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="trans_text" class="col-sm-2 control-label">Beseda - besedilo</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea type="text" class="form-control ZRCola textarea-size" style="width:300px;" id="trans_text" name="trans_text"><?=$transcription['trans_text']?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function ajax_update_words()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_words",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
var locations;
|
||||||
|
$('#locations_select').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var location in data.locations) {
|
||||||
|
sortable.push([location, data.locations[location]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
locations += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#locations_select').append(locations);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_update_lexems()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_lexems",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word: id_word,
|
||||||
|
id_subject:id_subject,
|
||||||
|
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#lexems_select').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var lexem in data.lexems) {
|
||||||
|
sortable.push([lexem, data.lexems[lexem]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
options += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#lexems_select').append(options);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
106
sna/application/views/admin/add_word_view.php
Normal file
106
sna/application/views/admin/add_word_view.php
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>edit_content">Teme</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_subject/<?=$subject['id']?>"><?=$subject['title']?></a></li>
|
||||||
|
<li><a href="#">Nova beseda</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Nova beseda</h4></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-danger glyphicon glyphicon-exclamation-sign"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_add_word" method="POST" enctype="multipart/form-data" id="add_word">
|
||||||
|
<input type="hidden" id="id_subject" name="id_subject" value="<?=$subject['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Naziv besede<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$word['title']?>" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Slika besede</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="file" class="upload-btn" accept="image/x-png,image/gif,image/jpeg" id="image_file" name="image_file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Komentar besede</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="file" class="upload-btn" id="comment_file" name="comment_file">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name="save_close">Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
31
sna/application/views/admin/admin_nav.php
Normal file
31
sna/application/views/admin/admin_nav.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<ul class="nav nav-pills nav-stacked nav-bordered">
|
||||||
|
<li role="presentation" class="<?=($tab=='my_profile')?'active':''?>" id="my_profile"><a href="<?=$this->url?>">Profil in uporabniki</a></li>
|
||||||
|
<li role="presentation" class="<?=($tab=='subjects_words')?'active':''?>" id="content"><a href="<?=$this->url?>edit_content">Teme in besede</a></li>
|
||||||
|
<li role="presentation" class="<?=($tab=='locations')?'active':''?>" id="locations"><a href="<?=$this->url?>locations">Lokacije</a></li>
|
||||||
|
<li role="presentation" class="<?=($tab=='lexems')?'active':''?>" id="lexems"><a href="<?=$this->url?>lexems">Leksemi</a></li>
|
||||||
|
<li role="presentation" class="<?=($tab=='transcriptions')?'active':''?>" id="transcriptions"><a href="<?=$this->url?>transcriptions">Fonetični zapisi</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
47
sna/application/views/admin/comment_popup_view.php
Normal file
47
sna/application/views/admin/comment_popup_view.php
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(isset($words) and $words)
|
||||||
|
{
|
||||||
|
foreach($words as $word)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="modal fade" id="modal_comment-<?=$word['id']?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel"><?=$word['title']?> komentar</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body text-center" id="modal_comment_content">
|
||||||
|
<iframe id="modal_iframe" frameBorder="0" src="<?=base_url().$word['comment']?>#zoom=100"></iframe>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
244
sna/application/views/admin/edit_location_view.php
Normal file
244
sna/application/views/admin/edit_location_view.php
Normal file
|
@ -0,0 +1,244 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>locations">Lokacije</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_location/<?=$location['id']?>"><?=$location['name']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted"><?=$location['name']?> (<?=$location['short_name']?>)</h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>location_delete/<?=$location['id']?>" title="Odstrani lokacijo">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_location" method="POST" id="edit_subject">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?=$location['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name" class="col-sm-2 control-label">Kraj<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['name']?>" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Kratek naziv<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['short_name']?>" id="short_name" name="short_name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Zemljepisna širina (lat)<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" style="width:120px;" class="form-control input-md input-short" value="<?=$location['lat']?>" id="lat" name="lat">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Zemljepisna dolžina (long)<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" style="width:120px;" class="form-control input-md input-short" value="<?=$location['long']?>" id="long" name="long" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="dialects" class="col-sm-2 control-label">Narečna skupina<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="dialects" name="dialects" onchange="ajax_update_subdialects();">
|
||||||
|
<?
|
||||||
|
foreach($dialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_dialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subdialects" class="col-sm-2 control-label">Narečje<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subdialects" name="subdialects" onchange="ajax_update_subsubdialects();">
|
||||||
|
<?
|
||||||
|
foreach($subdialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_subdialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subsubdialects" class="col-sm-2 control-label">Podnarečje</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subsubdialects" name="subsubdialects">
|
||||||
|
<?
|
||||||
|
foreach($subsubdialects as $id=>$dialect)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$location['id_subsubdialect']?'selected="selected"':''?>><?=$dialect?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subsubdialects" class="col-sm-2 control-label">Vsebovana v temah</label>
|
||||||
|
<div class="col-sm-10" style="padding-top:10px;">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="subjects[]" value="<?=$id?>" <?=(isset($subject_locations[$id]))?'checked':''?>> <?=$subject?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši lokacijo?");
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_update_subdialects()
|
||||||
|
{
|
||||||
|
var id_dialect=$("#dialects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_subdialects",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_dialect: id_dialect
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#subdialects').empty();
|
||||||
|
|
||||||
|
$.each(data.subdialects, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#subdialects').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_update_subsubdialects()
|
||||||
|
{
|
||||||
|
var id_subdialect=$("#subdialects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_subsubdialects",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subdialect: id_subdialect
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#subsubdialects').empty();
|
||||||
|
|
||||||
|
$.each(data.subsubdialects, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#subsubdialects').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
115
sna/application/views/admin/edit_my_profile_view.php
Normal file
115
sna/application/views/admin/edit_my_profile_view.php
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>">Profil in uporabniki</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<h4 class="text-muted">Urejanje uporabnika - sprememba gesla</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<?
|
||||||
|
if($this->session->userdata('uid')==1)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<a class="btn btn-primary" href="<?=$this->url?>users" title="Pregled uporabnikov">Pregled uporabnikov</a>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_my_profile" method="POST" id="edit_personal_data">
|
||||||
|
<input type="hidden" id="id_user" name="id_user" value="<?=$user['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ime" class="col-sm-3 control-label">Geslo</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" class="form-control input-md" value="" id="pass1" name="pass1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lastname" class="col-sm-3 control-label">Ponovi geslo</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" class="form-control input-md" value="" id="pass2" name="pass2" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-3 col-sm-9">
|
||||||
|
<button type="submit" class="btn btn-success">Shrani</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
288
sna/application/views/admin/edit_subject_view.php
Normal file
288
sna/application/views/admin/edit_subject_view.php
Normal file
|
@ -0,0 +1,288 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>edit_content">Teme</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_subject/<?=$subject['id']?>"><?=$subject['title']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted"><?=$subject['title']?></h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<a class="btn btn-success" href="<?=$this->url?>add_word/<?=$subject['id']?>" title="Dodaj besedo">Dodaj</a>
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>subject_delete/<?=$subject['id']?>" title="Odstrani temo">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="alert fade in hidden" id="alert" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span id="alert_text"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="javascript:;" onsubmit="ajax_edit_subject_save();" id="edit_subject">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?=$subject['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Naziv teme<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$subject['title']?>" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
<div class="list">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="10%">Št.</th>
|
||||||
|
<th width="30%">Beseda</th>
|
||||||
|
<th width="25%" class="text-center">Slika</th>
|
||||||
|
<th width="25%" class="text-center">Komentar</th>
|
||||||
|
<th width="10%" class="text-center">Odstrani</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
foreach($words as $i=>$word)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr id="row-<?=$word['id']?>" onclick="window.document.location='<?=$this->url?>edit_word/<?=$word['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$word['title']?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<?
|
||||||
|
if($word['image'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<span class="glyphicon glyphicon-picture" onclick="open_modal('<?=$word['modal_image_target']?>');" ></span>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
-
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
<?
|
||||||
|
if($word['comment'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<span class="glyphicon glyphicon-book" onclick="open_modal('<?=$word['modal_comment_target']?>')"></span>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
-
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="text-center"><span class="glyphicon glyphicon-remove text-danger" onclick="if(confirm('Izbriši besedo?')){ajax_word_delete(<?=$word['id']?>)};event.stopPropagation();"></span></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="modals_images">
|
||||||
|
<?=$view_images;?>
|
||||||
|
</div>
|
||||||
|
<div id="modals_comments">
|
||||||
|
<?=$view_comments;?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="modal_image" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel">Slika</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body text-center" id="modal_image_content">
|
||||||
|
<img src="" style="height:500px;">
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
$('#alert').fadeOut(500);
|
||||||
|
$('alert').addClass('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši temo?");
|
||||||
|
});
|
||||||
|
|
||||||
|
function open_modal(modal_id)
|
||||||
|
{
|
||||||
|
event.stopPropagation();
|
||||||
|
$(modal_id).modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_edit_subject_save()
|
||||||
|
{
|
||||||
|
var form=$('#edit_subject');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_edit_subject_save",
|
||||||
|
cache: false,
|
||||||
|
data:form.serialize(),
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
status('ok','Spremembe uspešno shranjene!');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_word_delete(id_word)
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_word_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_word:id_word
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//remove row
|
||||||
|
$('#row-'+id_word).remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function status(status,text)
|
||||||
|
{
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
//change div color
|
||||||
|
if(status=='ok')
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-success');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-ok text-success'></span> "+text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-danger');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-exclamation-sign text-danger'></span> "+text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
125
sna/application/views/admin/edit_transcription_popup_view.php
Normal file
125
sna/application/views/admin/edit_transcription_popup_view.php
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>transcriptions">Transkripcije</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_transcription/<?=$transcription['id']?>"><?=$transcription['title']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted"><?=$transcription['title']?></h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>location_delete/<?=$location['id']?>">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_location" method="POST" id="edit_subject">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?=$transcription['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name" class="col-sm-2 control-label">Kraj</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['name']?>" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Kratek naziv</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$location['short_name']?>" id="short_name" name="short_name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">X koordinata</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md input-short" value="<?=$location['x']?>" id="x" name="x">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Y koordinata</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" width="100px" class="form-control input-md input-short" value="<?=$location['y']?>" id="y" name="y" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši lokacijo?");
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
325
sna/application/views/admin/edit_transcription_view.php
Normal file
325
sna/application/views/admin/edit_transcription_view.php
Normal file
|
@ -0,0 +1,325 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>transcriptions">Fonetični zapisi</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_transcription/<?=$transcription['id']?>"><span class="ZRCola"><?=$transcription['phonetic_writing']?></span></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted ZRCola"><?=$transcription['phonetic_writing']?></h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>transcription_delete/<?=$transcription['id']?>" title="Odstrani transkripcijo">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_transcription" method="POST" enctype="multipart/form-data" id="edit_subject">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?=$transcription['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="phonetic_writing" class="col-sm-2 control-label">Fonetični zapis<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md ZRCola" style="width:300px;" value="<?=$transcription['phonetic_writing']?>" id="phonetic_writing" name="phonetic_writing">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="col-sm-2 control-label">Tema<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subjects" name="subjects" onchange="ajax_update_words();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_subject']?'selected="selected"':''?> ><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="col-sm-2 control-label">Beseda<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="words" id="words" onchange="ajax_update_lexems();">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_word']?'selected="selected"':''?>><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lexems_select" class="col-sm-2 control-label">Leksem<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" id="lexems_select" name="lexems_select" style="width:300px;" >
|
||||||
|
<?
|
||||||
|
foreach($lexems as $id=>$title)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_lexem']?'selected="selected"':''?>><?=$title?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name" class="col-sm-2 control-label">Kraj<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="locations" id="locations_select">
|
||||||
|
<?
|
||||||
|
foreach($locations as $id=>$location)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$transcription['id_location']?'selected="selected"':''?>><?=$location?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Zvočni posnetek</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<?
|
||||||
|
if($transcription['audio'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div style="padding-top:2px;">
|
||||||
|
<audio controls>
|
||||||
|
<source src="<?php echo base_url().$transcription['audio']?>" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
<div>
|
||||||
|
<a href="javascript:;" onclick="if(confirm('Izbriši zvočni posnetek?')){ajax_audio_delete(<?=$transcription['id']?>,'<?=$transcription['audio']?>');}" class="text-danger"><span>Odstrani zvočni posnetek</span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<input type="file" class="upload-btn" id="audio_file" name="audio_file">
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="trans_text" class="col-sm-2 control-label">Beseda - besedilo</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea type="text" class="form-control ZRCola textarea-size" style="width:300px;" id="trans_text" name="trans_text"><?=$transcription['trans_text']?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši transkripcijo?");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function ajax_update_words()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_words",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
var locations;
|
||||||
|
$('#locations_select').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var location in data.locations) {
|
||||||
|
sortable.push([location, data.locations[location]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
locations += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#locations_select').append(locations);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ajax_update_lexems()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_lexems",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word: id_word,
|
||||||
|
id_subject:id_subject,
|
||||||
|
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#lexems_select').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var lexem in data.lexems) {
|
||||||
|
sortable.push([lexem, data.lexems[lexem]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
options += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#lexems_select').append(options);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_audio_delete(id_transcription,audio)
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_audio_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_transcription:id_transcription,
|
||||||
|
audio,audio
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
alert(errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
143
sna/application/views/admin/edit_user_view.php
Normal file
143
sna/application/views/admin/edit_user_view.php
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>">Profil in uporabniki</a></li>
|
||||||
|
<li><a href="<?=$this->url?>users">Uporabniki</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_user/<?=$user['id']?>"><?=$user['username']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted"><?=$user['username']?></h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<?
|
||||||
|
if($user['id']!=1)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>user_delete/<?=$user['id']?>" title="Odstrani uporabnika">Odstrani</a>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_user" method="POST" id="edit_user">
|
||||||
|
<input type="hidden" id="id_user" name="id_user" value="<?=$user['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username" class="col-sm-3 control-label">Uporabniško ime<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$user['username']?>" id="username" name="username">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name" class="col-sm-3 control-label">Ime</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$user['name']?>" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lastname" class="col-sm-3 control-label">Priimek</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$user['lastname']?>" id="lastname" name="lastname">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ime" class="col-sm-3 control-label">Geslo<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" class="form-control input-md" value="" id="pass1" name="pass1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lastname" class="col-sm-3 control-label">Ponovi geslo<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="password" class="form-control input-md" value="" id="pass2" name="pass2" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-3 col-sm-9">
|
||||||
|
<button type="submit" class="btn btn-success">Shrani</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši uporabnika?");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
316
sna/application/views/admin/edit_word_view.php
Normal file
316
sna/application/views/admin/edit_word_view.php
Normal file
|
@ -0,0 +1,316 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>edit_content">Teme</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_subject/<?=$subject['id']?>"><?=$subject['title']?></a></li>
|
||||||
|
<li><a href="#"><?=$word['title']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted"><?=$word['title']?></h4></div>
|
||||||
|
<div class="col-sm-2 text-right">
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>word_delete/<?=$word['id']?>" title="Odstrani besedo">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-danger glyphicon glyphicon-exclamation-sign"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="alert fade in hidden" id="alert" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span id="alert_text"></span>
|
||||||
|
</div>
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_word" method="POST" enctype="multipart/form-data" id="edit_word">
|
||||||
|
<input type="hidden" id="id_word" name="id_word" value="<?=$word['id']?>">
|
||||||
|
<input type="hidden" id="id_subject" name="id_subject" value="<?=$subject['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Naziv besede<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$word['title']?>" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Slika besede</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<?
|
||||||
|
if($word['image'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="img-wrap" onclick="open_modal('#modal_image');">
|
||||||
|
<span class="close glyphicon glyphicon-remove text-danger" onclick="if(confirm('Izbriši sliko?')){ajax_image_delete(<?=$word['id']?>,'<?=$word['image']?>')};event.stopPropagation();"></span>
|
||||||
|
<img src="<?=base_url().$word['image']?>?<?php echo filemtime($word['image']) ?>" class="thumbnail" />
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<input type="file" class="upload-btn" accept="image/x-png,image/gif,image/jpeg" id="image_file" name="image_file">
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Komentar besede</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<?
|
||||||
|
if($word['comment'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div style="padding-top:10px">
|
||||||
|
<a href="javascript:;" onclick="open_modal('#modal_comment');" class="btn btn-default"><span class="glyphicon glyphicon-book"></span> Odpri komentar </a> <a href="javascript:;" onclick="if(confirm('Izbriši komentar?')){ajax_comment_delete(<?=$word['id']?>,'<?=$word['comment']?>');}" class="text-danger">Odstrani komentar</a>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<input type="file" class="upload-btn" id="comment_file" name="comment_file">
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name="save_close">Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- modals -->
|
||||||
|
<div class="modal fade" id="modal_image" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel">Slika</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body text-center" id="modal_image_content">
|
||||||
|
<img src="<?=base_url().$word['image']?>?<?php echo filemtime($word['image']) ?>" style="height:500px;">
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="modal_comment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel">Komentar</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body text-center" id="modal_image_content">
|
||||||
|
<iframe id="modal_iframe" frameBorder="0" src="<?=base_url().$word['comment']?>#zoom=100"></iframe>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
$('#alert').fadeOut(500);
|
||||||
|
$('alert').addClass('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši besedo?");
|
||||||
|
});
|
||||||
|
|
||||||
|
function open_modal(modal_id)
|
||||||
|
{
|
||||||
|
$(modal_id).modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_edit_subject_save()
|
||||||
|
{
|
||||||
|
var form=$('#edit_subject');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_edit_subject_save",
|
||||||
|
cache: false,
|
||||||
|
data:form.serialize(),
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
status('ok','Spremembe uspešno shranjene!');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_image_delete(id_word,image)
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_image_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_word:id_word,
|
||||||
|
image,image
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
alert(errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_comment_delete(id_word,comment)
|
||||||
|
{
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_comment_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_word:id_word,
|
||||||
|
comment,comment
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
alert(errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function status(status,text)
|
||||||
|
{
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
//change div color
|
||||||
|
if(status=='ok')
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-success');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-ok text-success'></span> "+text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-danger');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-exclamation-sign text-danger'></span> "+text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
47
sna/application/views/admin/image_popup_view.php
Normal file
47
sna/application/views/admin/image_popup_view.php
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(isset($words) and $words)
|
||||||
|
{
|
||||||
|
foreach($words as $word)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="modal fade" id="modal_image-<?=$word['id']?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel"><?=$word['title']?> slika</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body text-center" id="modal_image_content">
|
||||||
|
<img src="<?=base_url().$word['image']?>" style="height:500px;">
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
46
sna/application/views/admin/index_view.php
Normal file
46
sna/application/views/admin/index_view.php
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<h3>Nadzorna plošča</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<div class="btn-group" style="margin-top:20px;">
|
||||||
|
<a href="<?=base_url()?>" target="_blank" class="btn btn-default" title="Na prvo stran">Nazaj na karto</a>
|
||||||
|
<a href="<?=$this->url?>logout" class="btn btn-default confirm-logout" title="Odjava">Odjava <span class="glyphicon glyphicon-off"></span></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.confirm-logout').click(function() {
|
||||||
|
return window.confirm("Odjava?");
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
158
sna/application/views/admin/lexem_add_view.php
Normal file
158
sna/application/views/admin/lexem_add_view.php
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>lexems">Leksemi</a></li>
|
||||||
|
<li><a href="#">Nov leksem</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted">Nov leksem</h4></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_add_lexem" method="POST" id="add_lexem">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="col-sm-2 control-label">Tema</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subjects" name="subjects" onchange="ajax_update_words();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$lexem['id_subject']?'selected="selected"':''?>><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="col-sm-2 control-label">Beseda<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="words" id="words">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$lexem['id_word']?'selected="selected"':''?>><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Leksem<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$lexem['title']?>" id="title" name="title" style="width:300px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="icon" class="col-sm-2 control-label">Simbol leksema<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md SIMBola" value="<?=$lexem['icon']?>" id="icon" name="icon" style="width:100px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Barva simbola leksema</label>
|
||||||
|
<div class="col-sm-10" style="padding-top:5px;">
|
||||||
|
<input name="icon_color" id="icon_color" value="<?=$lexem['icon_color']?>" type="color"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br> <div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_update_words()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_words",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
179
sna/application/views/admin/lexem_edit_view.php
Normal file
179
sna/application/views/admin/lexem_edit_view.php
Normal file
|
@ -0,0 +1,179 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>lexems">Leksemi</a></li>
|
||||||
|
<li><a href="<?=$this->url?>edit_lexem/<?=$lexem['id']?>"><?=$lexem['title']?></a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9"><h4 class="text-muted"><?=$lexem['title']?></h4></div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<a class="btn btn-danger confirm" href="<?=$this->url?>lexem_delete/<?=$lexem['id']?>" title="Odstrani leksem">Odstrani</a></div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
$alert_text='<ul>';
|
||||||
|
foreach($errfields as $errfield)
|
||||||
|
{
|
||||||
|
$alert_text.='<li>'.$errfield.'</li>';
|
||||||
|
}
|
||||||
|
$alert_text.='</ul>'
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$alert_text?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
elseif(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form class="form-horizontal form-border" action="<?=$this->url?>post_edit_lexem" method="POST" id="edit_lexem">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?=$lexem['id']?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="col-sm-2 control-label">Tema</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" id="subjects" name="subjects" onchange="ajax_update_words();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$lexem['id_subject']?'selected="selected"':''?> ><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="col-sm-2 control-label">Beseda<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select class="form-control" style="width:300px;" name="words" id="words">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$lexem['id_word']?'selected="selected"':''?>><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Leksem<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md" value="<?=$lexem['title']?>" id="title" name="title" style="width:300px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="icon" class="col-sm-2 control-label">Simbol leksema<span class="text-danger">*</span></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control input-md SIMBola" value="<?=$lexem['icon']?>" id="icon" name="icon" style="width:100px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title" class="col-sm-2 control-label">Barva simbola leksema</label>
|
||||||
|
<div class="col-sm-10" style="padding-top:5px;">
|
||||||
|
<input name="icon_color" id="icon_color" value="<?=$lexem['icon_color']?>" type="color"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-success button-medium">Shrani</button>
|
||||||
|
<button type="submit" class="btn btn-default button-medium" name=save_close>Shrani in zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.confirm').click(function() {
|
||||||
|
return window.confirm("Izbriši leksem?");
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_update_words()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_words",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
50
sna/application/views/admin/lexems_list_view.php
Normal file
50
sna/application/views/admin/lexems_list_view.php
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class="table table-hover table-striped" id="search_locations-table">
|
||||||
|
<thead>
|
||||||
|
<tr id="locations_header">
|
||||||
|
<th width="10%">Št.</th>
|
||||||
|
<th width="20%">Leksem</th>
|
||||||
|
<th width="40%">Beseda (tema)</th>
|
||||||
|
<th width="15%" class="text-center">Simbol leksema</th>
|
||||||
|
<th width="10%" class="text-center">Odstrani</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
foreach($lexems as $i=>$lexem)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr id="row-<?=$lexem['id']?>" onclick="window.document.location='<?=$this->url?>edit_lexem/<?=$lexem['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$lexem['title']?></td>
|
||||||
|
<td><?=$lexem['word_title']?> (<?=$lexem['subject_title']?>)</td>
|
||||||
|
<td class="SIMBola text-center"><?=$lexem['icon']?></td>
|
||||||
|
<td class="text-center"><span class="glyphicon glyphicon-remove text-danger" onclick="if(confirm('Izbriši leksem?')){ajax_lexem_delete(<?=$lexem['id']?>)};event.stopPropagation();"></span></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
242
sna/application/views/admin/lexems_view.php
Normal file
242
sna/application/views/admin/lexems_view.php
Normal file
|
@ -0,0 +1,242 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>lexems">Leksemi</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Leksemi</h4></div>
|
||||||
|
<div class="col-sm-2 text-right"><a class="btn btn-success" href="<?=$this->url?>add_lexem" title="Dodaj leksem">Dodaj</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="alert fade in hidden" id="alert" role="alert">
|
||||||
|
<button type="button" class="close" onclick="hide_alert()">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span id="alert_text"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-inline">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="control-label">Tema</label>
|
||||||
|
|
||||||
|
<select class="form-control input-sm" id="subjects" style="width:200px;" onchange="ajax_change_subject_lexems();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$id_subject?'selected="selected"':''?>><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="control-label">Beseda</label>
|
||||||
|
|
||||||
|
<select class="form-control input-sm" id="words" style="width:200px;" onchange="ajax_change_word_lexems();">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>"><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="lexems_table" class="list">
|
||||||
|
<?
|
||||||
|
if(isset($view))
|
||||||
|
{
|
||||||
|
echo $view;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_lexem_delete(id_lexem)
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_lexem_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_lexem:id_lexem
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//remove row
|
||||||
|
$('#row-'+id_lexem).remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function status(status,text)
|
||||||
|
{
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
//change div color
|
||||||
|
if(status=='ok')
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-success');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-ok text-success'></span> "+text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-danger');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-exclamation-sign text-danger'></span> "+text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_alert()
|
||||||
|
{
|
||||||
|
$('#alert').fadeOut(500);
|
||||||
|
$('alert').addClass('hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ajax_change_subject_lexems()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_change_subject_lexems",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
//update table
|
||||||
|
$('#lexems_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_change_word_lexems()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_change_word_lexems",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word: id_word,
|
||||||
|
id_subject: id_subject,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#titles').empty();
|
||||||
|
|
||||||
|
$.each(data.titles, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
//update table
|
||||||
|
$('#lexems_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
221
sna/application/views/admin/locations_view.php
Normal file
221
sna/application/views/admin/locations_view.php
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>locations">Lokacije</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Lokacije</h4></div>
|
||||||
|
<div class="col-sm-2 text-right"><a class="btn btn-success" href="<?=$this->url?>add_location" title="Dodaj lokacijo">Dodaj</a></div>
|
||||||
|
</div>
|
||||||
|
<!-- alerts -->
|
||||||
|
<?
|
||||||
|
if(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="text-success glyphicon glyphicon-ok"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="alert fade in hidden" id="alert" role="alert">
|
||||||
|
<button type="button" class="close" onclick="hide_alert()">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span id="alert_text"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div class="form-inline">
|
||||||
|
<input type="text" id="search_locations" class="form-control" onkeyup="search_locations()" value="" placeholder="Iskanje lokacij..." style="width:300px;"/> <span id="search-loader" class="hidden"><span class="glyphicon glyphicon-cog spin"></span></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="locations" class="list">
|
||||||
|
<table class="table table-hover table-striped" id="search_locations-table">
|
||||||
|
<thead>
|
||||||
|
<tr id="locations_header">
|
||||||
|
<th width="10%">Št.</th>
|
||||||
|
<th width="24%">Kraj</th>
|
||||||
|
<th width="10%">Kratica</th>
|
||||||
|
<th width="23%" class="text-center">Zemljepisna širina (lat)</th>
|
||||||
|
<th width="23%" class="text-center">Zemljepisna dolžina (long)</th>
|
||||||
|
<th class="text-center">Odstrani</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
foreach($locations as $i=>$location)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr id="row-<?=$location['id']?>" onclick="window.document.location='<?=$this->url?>edit_location/<?=$location['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$location['name']?></td>
|
||||||
|
<td><?=$location['short_name']?></td>
|
||||||
|
<td class="text-center"><?=number_format($location['lat'],2)?></td>
|
||||||
|
<td class="text-center"><?=number_format($location['long'],2)?></td>
|
||||||
|
<td class="text-center"><span class="glyphicon glyphicon-remove text-danger" onclick="if(confirm('Izbriši lokacijo?')){ajax_location_delete(<?=$location['id']?>)};event.stopPropagation();"></span></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.extend($.expr[":"], {
|
||||||
|
"containsIN": function(elem, i, match, array) {
|
||||||
|
return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function ajax_location_delete(id_location)
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_location_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_location:id_location
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//remove row
|
||||||
|
$('#row-'+id_location).remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function status(status,text)
|
||||||
|
{
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
//change div color
|
||||||
|
if(status=='ok')
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-success');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-ok text-success'></span> "+text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-danger');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-exclamation-sign text-danger'></span> "+text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hide_alert()
|
||||||
|
{
|
||||||
|
$('#alert').fadeOut(500);
|
||||||
|
$('alert').addClass('hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function search_locations()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#search-loader').show();
|
||||||
|
var src=$('#search_locations').val();
|
||||||
|
|
||||||
|
if(src)
|
||||||
|
{
|
||||||
|
$('#search_locations-table tr').hide();
|
||||||
|
$('#locations_header').show();
|
||||||
|
var src_words=src.split(" ");
|
||||||
|
|
||||||
|
var items = [];
|
||||||
|
var search='';
|
||||||
|
|
||||||
|
$.each(src_words, function (index, word) {
|
||||||
|
|
||||||
|
word=word.toLowerCase();
|
||||||
|
search+="containsIN('"+word+"'):";
|
||||||
|
});
|
||||||
|
|
||||||
|
search = search.slice(0, -1);
|
||||||
|
|
||||||
|
console.log(search);
|
||||||
|
|
||||||
|
var items=$('#search_locations-table tr:'+search);
|
||||||
|
|
||||||
|
items.show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#search_locations-table tr').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#search-loader').hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
86
sna/application/views/admin/login_view.php
Normal file
86
sna/application/views/admin/login_view.php
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- errors -->
|
||||||
|
<div class="container container-panel">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<h3>Nadzorna plošča</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<div class="btn-group" style="margin-top:20px;">
|
||||||
|
<a href="<?=base_url()?>" target="_blank" class="btn btn-default" title="Na prvo stran">Nazaj na karto</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
if(isset($errfields) and $errfields)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger fade in center-half" id="alert_err" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign text-danger"></span> <?=$errfields?>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="panel panel-border center-half">
|
||||||
|
<div class="panel-heading panel-border-heading">Prijava v nadzorno ploščo</div>
|
||||||
|
<div class="panel-body" >
|
||||||
|
<form method="post" action="<?=$uri?>">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username">Uporabinško ime</label>
|
||||||
|
<input type="text" class="form-control" id="username" name="username" autocomplete="off" placeholder="Uporabniško ime">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Geslo</label>
|
||||||
|
<input type="password" class="form-control" id="password" name="password" autocomplete="off" placeholder="Geslo">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-default">Prijava</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$('.panel-border').hover(function() {
|
||||||
|
$('.panel-border-heading').css('border-bottom', '2px solid #66afe9');
|
||||||
|
}, function() {
|
||||||
|
$('.panel-border-heading').css('border-bottom', '2px solid #bdbdbd');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
92
sna/application/views/admin/subjects_view.php
Normal file
92
sna/application/views/admin/subjects_view.php
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>edit_content">Teme</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Teme</h4></div>
|
||||||
|
<div class="col-sm-2 text-right"><a class="btn btn-success" href="<?=$this->url?>add_subject" title="Dodaj temo">Dodaj</a></div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-ok text-success"></span> Tema uspešno izbrisana!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div class="list">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="10%">Št.</th>
|
||||||
|
<th>Tema</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
|
||||||
|
foreach($subjects as $i=>$subject)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr onclick="window.document.location='<?=$this->url?>edit_subject/<?=$subject['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$subject['title']?></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
95
sna/application/views/admin/transcriptions_list_view.php
Normal file
95
sna/application/views/admin/transcriptions_list_view.php
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="5%">Št.</th>
|
||||||
|
<th width="12%">Leksem</th>
|
||||||
|
<th width="12%">Fonetični zapis</th>
|
||||||
|
<th width="16%" class="text-center">Zvočni posnetek</th>
|
||||||
|
<th width="32%">Beseda (tema)</th>
|
||||||
|
<th width="20%">Kraj</th>
|
||||||
|
<th width="5%" class="text-center">Odstrani</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
foreach($transcriptions as $i=>$transcription)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr id="row-<?=$transcription['id']?>"onclick="window.document.location='<?=$this->url?>edit_transcription/<?=$transcription['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$transcription['lexem_title']?></td>
|
||||||
|
<td class="ZRCola"><?=$transcription['phonetic_writing']?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<?
|
||||||
|
if($transcription['audio'])
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<audio id="player-<?=$transcription['id']?>" src="<?php echo base_url().$transcription['audio']?>"></audio>
|
||||||
|
<div>
|
||||||
|
<button class="glyphicon glyphicon-play-circle btn btn-default btn-xs" onclick="event.stopPropagation();document.getElementById('player-<?=$transcription['id']?>').play();"></button>
|
||||||
|
<button class="glyphicon glyphicon-pause btn btn-default btn-xs" onclick="event.stopPropagation();document.getElementById('player-<?=$transcription['id']?>').pause()"></button>
|
||||||
|
<button class="glyphicon glyphicon-stop btn btn-default btn-xs" onclick="event.stopPropagation();document.getElementById('player-<?=$transcription['id']?>').pause();document.getElementById('player-<?=$transcription['id']?>').currentTime=0.0;"></button>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "-";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<?
|
||||||
|
if($transcription['word_title'])
|
||||||
|
{
|
||||||
|
echo $transcription['word_title']?> (<?=$transcription['subject_title']?>)<?
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>-<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td><?
|
||||||
|
if($transcription['name'])
|
||||||
|
{
|
||||||
|
echo $transcription['name'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
?>-<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td class="text-center"><span class="glyphicon glyphicon-remove text-danger" onclick="if(confirm('Izbriši transkripcijo?')){ajax_transcription_delete(<?=$transcription['id']?>)};event.stopPropagation();"></span></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
366
sna/application/views/admin/transcriptions_view.php
Normal file
366
sna/application/views/admin/transcriptions_view.php
Normal file
|
@ -0,0 +1,366 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>transcriptions">Fonetični zapisi</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Fonetični zapisi</h4></div>
|
||||||
|
<div class="col-sm-2 text-right"><a class="btn btn-success" id="add_transcription" href="<?=$this->url?>add_transcription/" title="Dodaj transkripcijo">Dodaj</a></div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
|
||||||
|
if(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-ok text-success"></span> Spremembe uspešno shranjene!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="alert fade in hidden" id="alert" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span id="alert_text"></span>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-inline">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="control-label">Tema</label>
|
||||||
|
|
||||||
|
<select class="form-control input-sm" id="subjects" style="width:200px;" onchange="ajax_change_subject();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$id_subject?'selected="selected"':''?>><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="ccontrol-label">Beseda</label>
|
||||||
|
|
||||||
|
<select class="form-control input-sm" id="words" style="width:200px;" onchange="ajax_load_transcriptions();">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$id_word?'selected="selected"':''?>><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="titles" class="control-label">Leksem</label>
|
||||||
|
<select class="form-control input-sm" id="titles" style="width:200px;" onchange="ajax_update_transcriptions_titles();">
|
||||||
|
<?
|
||||||
|
foreach($lexems as $id=>$title)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$id_lexem?'selected="selected"':''?>><?=$title?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="locations" class="control-label">Kraj</label>
|
||||||
|
<select class="form-control input-sm" id="locations-select" style="width:200px;" onchange="ajax_change_location();">
|
||||||
|
<?
|
||||||
|
foreach($locations as $id=>$location)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>" <?=$id==$id_location?'selected="selected"':''?>><?=$location?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div id="transcriptions_table" class="list">
|
||||||
|
<?
|
||||||
|
if(isset($view))
|
||||||
|
{
|
||||||
|
echo $view;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_err').fadeOut(500);
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ajax_change_subject()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
var id_location=$("#locations-select option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_change_subject",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject,
|
||||||
|
id_location: id_location,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
//update locations
|
||||||
|
var locations;
|
||||||
|
$('#locations-select').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var location in data.locations) {
|
||||||
|
sortable.push([location, data.locations[location]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
locations += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#locations-select').append(locations);
|
||||||
|
|
||||||
|
|
||||||
|
//update table
|
||||||
|
$('#transcriptions_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_load_transcriptions()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
var id_location=$("#locations-select option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_load_transcriptions",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word: id_word,
|
||||||
|
id_subject: id_subject,
|
||||||
|
id_location:id_location,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#titles').empty();
|
||||||
|
|
||||||
|
//sort by name
|
||||||
|
var sortable = [];
|
||||||
|
for (var title in data.titles) {
|
||||||
|
sortable.push([title, data.titles[title]]);
|
||||||
|
}
|
||||||
|
var first=sortable.shift();
|
||||||
|
sortable.sort(function(a, b) {
|
||||||
|
return a[1].localeCompare(b[1]);
|
||||||
|
});
|
||||||
|
sortable.unshift(first);
|
||||||
|
|
||||||
|
$.each(sortable, function(id, title){
|
||||||
|
options += '<option value=' + title[0] + '>' + title[1] + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#titles').append(options);
|
||||||
|
|
||||||
|
//update table
|
||||||
|
$('#transcriptions_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_update_transcriptions_titles()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
var id_lexem=$("#titles option:selected").val();
|
||||||
|
var id_location=$("#locations-select option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_update_transcriptions_titles",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word:id_word,
|
||||||
|
id_subject:id_subject,
|
||||||
|
id_lexem:id_lexem,
|
||||||
|
id_location:id_location,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//update table
|
||||||
|
$('#transcriptions_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_change_location()
|
||||||
|
{
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
var id_lexem=$("#titles option:selected").val();
|
||||||
|
var id_location=$("#locations-select option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_change_location",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word:id_word,
|
||||||
|
id_subject:id_subject,
|
||||||
|
id_lexem:id_lexem,
|
||||||
|
id_location:id_location,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//update table
|
||||||
|
$('#transcriptions_table').html(data.view);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_transcription_delete(id_transcription)
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_transcription_delete",
|
||||||
|
cache: false,
|
||||||
|
data:{
|
||||||
|
id_transcription:id_transcription
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//remove row
|
||||||
|
$('#row-'+id_transcription).remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var errors='';
|
||||||
|
$.each(data.errfields, function(i, error){
|
||||||
|
errors+=error+'\n';
|
||||||
|
});
|
||||||
|
status('error',errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function status(status,text)
|
||||||
|
{
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
//change div color
|
||||||
|
if(status=='ok')
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-success');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-ok text-success'></span> "+text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#alert').removeClass();
|
||||||
|
$('#alert').addClass('alert alert-danger');
|
||||||
|
$('#alert_text').html("<span class='glyphicon glyphicon-exclamation-sign text-danger'></span> "+text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
97
sna/application/views/admin/users_view.php
Normal file
97
sna/application/views/admin/users_view.php
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- tukaj se naloži poljuben pogled -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li><a href="<?=$this->url?>">Profil in uporabniki</a></li>
|
||||||
|
<li><a href="<?=$this->url?>users">Uporabniki</a></li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-10"><h4 class="text-muted">Uporabniki</h4></div>
|
||||||
|
<div class="col-sm-2 text-right"><a class="btn btn-success" href="<?=$this->url?>add_user" title="Dodaj uporabnika">Dodaj</a></div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($status) and $status=='ok')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success fade in" id="alert_ok" role="alert">
|
||||||
|
<button type="button" class="close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<span class="glyphicon glyphicon-ok text-success"></span> Uporabnik uspešno izbrisan!
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div class="list">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="10%">Št.</th>
|
||||||
|
<th>Uporabniško ime</th>
|
||||||
|
<th>Ime</th>
|
||||||
|
<th>Priimek</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?
|
||||||
|
|
||||||
|
foreach($users as $i=>$user)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr onclick="window.document.location='<?=$this->url?>edit_user/<?=$user['id']?>'">
|
||||||
|
<td><?=$i+1?>.</td>
|
||||||
|
<td><?=$user['username']?></td>
|
||||||
|
<td><?=$user['name']?$user['name']:'-'?></td>
|
||||||
|
<td><?=$user['lastname']?$user['lastname']:'-'?></td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.close').click(function() {
|
||||||
|
$('#alert_ok').fadeOut(500);
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
8
sna/application/views/errors/cli/error_404.php
Normal file
8
sna/application/views/errors/cli/error_404.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
echo "\nERROR: ",
|
||||||
|
$heading,
|
||||||
|
"\n\n",
|
||||||
|
$message,
|
||||||
|
"\n\n";
|
8
sna/application/views/errors/cli/error_db.php
Normal file
8
sna/application/views/errors/cli/error_db.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
echo "\nDatabase error: ",
|
||||||
|
$heading,
|
||||||
|
"\n\n",
|
||||||
|
$message,
|
||||||
|
"\n\n";
|
21
sna/application/views/errors/cli/error_exception.php
Normal file
21
sna/application/views/errors/cli/error_exception.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||||
|
|
||||||
|
An uncaught Exception was encountered
|
||||||
|
|
||||||
|
Type: <?php echo get_class($exception), "\n"; ?>
|
||||||
|
Message: <?php echo $message, "\n"; ?>
|
||||||
|
Filename: <?php echo $exception->getFile(), "\n"; ?>
|
||||||
|
Line Number: <?php echo $exception->getLine(); ?>
|
||||||
|
|
||||||
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
|
Backtrace:
|
||||||
|
<?php foreach ($exception->getTrace() as $error): ?>
|
||||||
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
File: <?php echo $error['file'], "\n"; ?>
|
||||||
|
Line: <?php echo $error['line'], "\n"; ?>
|
||||||
|
Function: <?php echo $error['function'], "\n\n"; ?>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
<?php endif ?>
|
8
sna/application/views/errors/cli/error_general.php
Normal file
8
sna/application/views/errors/cli/error_general.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
echo "\nERROR: ",
|
||||||
|
$heading,
|
||||||
|
"\n\n",
|
||||||
|
$message,
|
||||||
|
"\n\n";
|
21
sna/application/views/errors/cli/error_php.php
Normal file
21
sna/application/views/errors/cli/error_php.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||||
|
|
||||||
|
A PHP Error was encountered
|
||||||
|
|
||||||
|
Severity: <?php echo $severity, "\n"; ?>
|
||||||
|
Message: <?php echo $message, "\n"; ?>
|
||||||
|
Filename: <?php echo $filepath, "\n"; ?>
|
||||||
|
Line Number: <?php echo $line; ?>
|
||||||
|
|
||||||
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
|
Backtrace:
|
||||||
|
<?php foreach (debug_backtrace() as $error): ?>
|
||||||
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
File: <?php echo $error['file'], "\n"; ?>
|
||||||
|
Line: <?php echo $error['line'], "\n"; ?>
|
||||||
|
Function: <?php echo $error['function'], "\n\n"; ?>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
<?php endif ?>
|
11
sna/application/views/errors/cli/index.html
Normal file
11
sna/application/views/errors/cli/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
64
sna/application/views/errors/html/error_404.php
Normal file
64
sna/application/views/errors/html/error_404.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>404 Page Not Found</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection { background-color: #E13300; color: white; }
|
||||||
|
::-moz-selection { background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
64
sna/application/views/errors/html/error_db.php
Normal file
64
sna/application/views/errors/html/error_db.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Database Error</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection { background-color: #E13300; color: white; }
|
||||||
|
::-moz-selection { background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
32
sna/application/views/errors/html/error_exception.php
Normal file
32
sna/application/views/errors/html/error_exception.php
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||||
|
|
||||||
|
<h4>An uncaught Exception was encountered</h4>
|
||||||
|
|
||||||
|
<p>Type: <?php echo get_class($exception); ?></p>
|
||||||
|
<p>Message: <?php echo $message; ?></p>
|
||||||
|
<p>Filename: <?php echo $exception->getFile(); ?></p>
|
||||||
|
<p>Line Number: <?php echo $exception->getLine(); ?></p>
|
||||||
|
|
||||||
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
|
<p>Backtrace:</p>
|
||||||
|
<?php foreach ($exception->getTrace() as $error): ?>
|
||||||
|
|
||||||
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
|
||||||
|
<p style="margin-left:10px">
|
||||||
|
File: <?php echo $error['file']; ?><br />
|
||||||
|
Line: <?php echo $error['line']; ?><br />
|
||||||
|
Function: <?php echo $error['function']; ?>
|
||||||
|
</p>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
</div>
|
64
sna/application/views/errors/html/error_general.php
Normal file
64
sna/application/views/errors/html/error_general.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Error</title>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection { background-color: #E13300; color: white; }
|
||||||
|
::-moz-selection { background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 12px 15px 12px 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<h1><?php echo $heading; ?></h1>
|
||||||
|
<?php echo $message; ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
33
sna/application/views/errors/html/error_php.php
Normal file
33
sna/application/views/errors/html/error_php.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||||
|
|
||||||
|
<h4>A PHP Error was encountered</h4>
|
||||||
|
|
||||||
|
<p>Severity: <?php echo $severity; ?></p>
|
||||||
|
<p>Message: <?php echo $message; ?></p>
|
||||||
|
<p>Filename: <?php echo $filepath; ?></p>
|
||||||
|
<p>Line Number: <?php echo $line; ?></p>
|
||||||
|
|
||||||
|
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||||
|
|
||||||
|
<p>Backtrace:</p>
|
||||||
|
<?php foreach (debug_backtrace() as $error): ?>
|
||||||
|
|
||||||
|
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||||
|
|
||||||
|
<p style="margin-left:10px">
|
||||||
|
File: <?php echo $error['file'] ?><br />
|
||||||
|
Line: <?php echo $error['line'] ?><br />
|
||||||
|
Function: <?php echo $error['function'] ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php endforeach ?>
|
||||||
|
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
</div>
|
11
sna/application/views/errors/html/index.html
Normal file
11
sna/application/views/errors/html/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
sna/application/views/errors/index.html
Normal file
11
sna/application/views/errors/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
42
sna/application/views/footer.php
Normal file
42
sna/application/views/footer.php
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<br><br><br>
|
||||||
|
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
|
<script src="https://d3js.org/d3.v4.min.js"></script>
|
||||||
|
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||||
|
<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js"></script>
|
||||||
|
</body>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<?
|
||||||
|
if($title=='Slovenski narečni atlas')
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="footer"><p class="text-muted text-center"><a class="about" href="<?=$this->url?>about">O spletni aplikaciji</a></p></div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</html>
|
48
sna/application/views/header.php
Normal file
48
sna/application/views/header.php
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||||
|
<title><?=$title?></title>
|
||||||
|
|
||||||
|
<!-- Bootstrap -->
|
||||||
|
<link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link href="<?php echo base_url(); ?>assets/style.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="header"></div>
|
||||||
|
|
||||||
|
|
77
sna/application/views/home/about.php
Normal file
77
sna/application/views/home/about.php
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="container container-panel">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<h3>O spletni aplikaciji</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3 text-right">
|
||||||
|
<div class="btn-group" style="margin-top:20px;">
|
||||||
|
<a href="<?=base_url()?>" class="btn btn-default" title="Na prvo stran">Nazaj na karto</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<h4 class="text-muted">Avtor</h4>
|
||||||
|
<p>Avtor spletne aplikacije je Gregor Šajn, študent Fakultete za računalništvo in informatiko Univerze v Ljubljani. Aplikacijo je izdelal v okviru diplomske naloge v letu 2017.</p>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<h4 class="text-muted">Aplikacija</h4>
|
||||||
|
|
||||||
|
<p>Slovenski narečni atlas / Slovenian dialectal atlas<br>
|
||||||
|
Copyright © 2017 Gregor Šajn (greg.sajn@gmail.com)<br><br>
|
||||||
|
|
||||||
|
Ta program spada med prosto programje; lahko ga razširjate in/ali spreminjate pod pogoji Splošnega dovoljenja GNU (GNU General Public License), različice 3, kot ga je objavila ustanova Free Software Foundation.<br>
|
||||||
|
|
||||||
|
Ta program se razširja v upanju, da bo uporaben, vendar BREZ VSAKRŠNEGA JAMSTVA; tudi brez posredne zagotovitve CENOVNE VREDNOSTI ali PRIMERNOSTI ZA DOLOČEN NAMEN. Za podrobnosti glejte besedilo GNU General Public License.<br>
|
||||||
|
|
||||||
|
Skupaj s tem programom bi morali prejeti izvod Splošnega dovoljenja GNU (GNU General Public License). Podrobnosti licence so dostopne tudi na spletni strani <a href="http://www.gnu.org/licenses" target="_blank">http://www.gnu.org/licenses</a>.
|
||||||
|
<br><br>
|
||||||
|
Izvorna koda aplikacije je dosegljiva v repozitoriju Bitbucket: <a href="https://bitbucket.org/ul-fri-lgm/sna" target="_blank">https://bitbucket.org/ul-fri-lgm/sna</a>.
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<h4 class="text-muted">Pisavi ZRCola in SIMBola</h4>
|
||||||
|
<p>
|
||||||
|
Besedilo je bilo pripravljeno z vnašalnim sistemom ZRCola (<a href="http://zrcola.zrc-sazu.si" target="_blank">http://zrcola.zrc-sazu.si</a>), ki ga je na Znanstvenoraziskovalnem centru SAZU v Ljubljani (<a href="http://www.zrc-sazu.si" target="_blank">http://www.zrc-sazu.si</a>) razvil Peter Weiss. Peter Weiss je za potrebe SLA pripravil tudi nabor simbolov za kartiranje, in sicer je leta 2005 zasnoval pisavo 05 SIMBola na podlagi simbolov, ki so v rabi pri OLA, ALE in v drugih (predvsem slovanskih) jezikovnih atlasih. ZRC SAZU se za posredovano pisavo 05 SIMBola zahvaljujemo.
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<h4 class="text-muted">Karta slovenskih narečij</h4>
|
||||||
|
<p>
|
||||||
|
Slovenski narečni atlas (SNA) temelji na <i>Karti slovenskih narečij</i>. Karto sta priredila Tine Logar in Jakob Rigler (1983) na osnovi <i>Dialektološke karte slovenskega jezika</i> Frana Ramovša (1931), novejših raziskav in gradiva Inštituta za slovenski jezik ZRC SAZU, jo dopolnili Vera Smole in Jožica Škofic (2011) in nato še sodelavci Dialektološke sekcije ISJFR ZRC SAZU (2016).<br><br>
|
||||||
|
© Inštitut za slovenski jezik Frana Ramovša ZRC SAZU, Geografski inštitut Antona Melika ZRC SAZU ter Inštitut za antropološke in prostorske študije ZRC SAZU, 2016
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<h4 class="text-muted">Vsebina (narečne besede)</h4>
|
||||||
|
<p>
|
||||||
|
Vsebino Slovenskega narečnega atlasa (narečne besede, zvočni posnetki, analize) za temo Stare kmečke hiše so zbrali in pripravili študenti Filozofske fakultete Univerze v Ljubljani pod vodstvom prof. dr. Vere Smole in asist. dr. Mojce Kumin Horvat.
|
||||||
|
<br>Vsem študentom, preteklim in bodočim, in njihovim informatorjem se zahvaljujemo za sodelovanje in njihov prispevek.
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<span class="text-muted small"><strong>Zadnja sprememba:</strong> avgust 2017, Gregor Šajn</span>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
</div>
|
306
sna/application/views/home/index_view.php
Normal file
306
sna/application/views/home/index_view.php
Normal file
|
@ -0,0 +1,306 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-first-page"> <!--class="container"-->
|
||||||
|
<div class="row row-borders">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="map-view-margin">
|
||||||
|
<h3 >Slovenski narečni atlas</h3>
|
||||||
|
</div>
|
||||||
|
<div class="form">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="subjects" class="control-label col-sm-1">Tema</label>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<select class="form-control map-view-margin input-sm selects" id="subjects" onchange="ajax_change_subject();">
|
||||||
|
<?
|
||||||
|
foreach($subjects as $id=>$subject)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>"><?=$subject?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="words" class="ccontrol-label col-sm-1">Beseda</label>
|
||||||
|
<div class="col-sm-11">
|
||||||
|
<select class="form-control map-view-margin input-sm selects" id="words" onchange="ajax_add_locations();">
|
||||||
|
<?
|
||||||
|
foreach($words as $id=>$word)
|
||||||
|
{
|
||||||
|
?><option value="<?=$id?>"><?=$word?></option><?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<!-- info panel -->
|
||||||
|
<div class="col-sm-3 info-panel">
|
||||||
|
<!-- title -->
|
||||||
|
<div id="map_title_div" class="hidden info-panel-title">
|
||||||
|
<strong>Izbrana beseda: </strong>
|
||||||
|
<br/>
|
||||||
|
<span id="map_title" class="map-title"></span> <span id="trans_count" class=""></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- image -->
|
||||||
|
<div id="image" class="hidden info-panel-image">
|
||||||
|
<strong><span class="">Slika: </span></strong><br>
|
||||||
|
<img id="word_image" class="info-panel-image-borders" src="" style="width:250px;height:250px;"/>
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<!-- comment button -->
|
||||||
|
<div id="button_comment" class="hidden info-panel-comment">
|
||||||
|
<strong><span>Komentar: </span></strong><br>
|
||||||
|
<button type="button" class="btn btn-md info-panel-btn" data-toggle="modal" data-target="#modal_comment">
|
||||||
|
Odpri komentar h karti <span class="glyphicon glyphicon-book"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- actual map -->
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<div class="text-right">
|
||||||
|
<?
|
||||||
|
//load svg map
|
||||||
|
$this->load->view('home/map_view.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="comment">
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="modal_comment" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content" style="height: 80%;">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel">Komentar h karti za besedo Shramba</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" id="modal_comment_content">
|
||||||
|
<iframe id="modal_iframe" frameBorder="0" src=""></iframe>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn info-panel-btn" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modals">
|
||||||
|
<?
|
||||||
|
$this->load->view('home/transcription_popup_view.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function ajax_add_locations()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
var svgNS = "http://www.w3.org/2000/svg";
|
||||||
|
var xlinkNS = "http://www.w3.org/1999/xlink";
|
||||||
|
|
||||||
|
var id_word=$("#words option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_add_locations",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_word: id_word,
|
||||||
|
id_subject:id_subject,
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
//update modals
|
||||||
|
$('#modals').html(data.view_modals);
|
||||||
|
|
||||||
|
//update legend
|
||||||
|
$('#legend').html(data.view_legend);
|
||||||
|
|
||||||
|
//update image and commet
|
||||||
|
//map comment
|
||||||
|
if(data.word.comment)
|
||||||
|
{
|
||||||
|
$('#button_comment').removeClass('hidden');
|
||||||
|
$('#modal_iframe').attr('src',data.word.comment);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#button_comment').addClass('hidden');
|
||||||
|
$('#modal_iframe').attr('src','');
|
||||||
|
}
|
||||||
|
|
||||||
|
//map image
|
||||||
|
if(data.word.image)
|
||||||
|
{
|
||||||
|
$('#image').removeClass('hidden');
|
||||||
|
$('#word_image').attr('src',data.word.image);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(id_word!=0)
|
||||||
|
{
|
||||||
|
$('#image').addClass('hidden');
|
||||||
|
$('#word_image').attr('src','');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#image').addClass('hidden');
|
||||||
|
$('#word_image').attr('src','');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//map title
|
||||||
|
if(data.word.title)
|
||||||
|
{
|
||||||
|
$('#map_title_div').removeClass('hidden');
|
||||||
|
$('#map_title').text(data.word.title);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#map_title_div').addClass('hidden');
|
||||||
|
$('#map_title').text('');
|
||||||
|
}
|
||||||
|
|
||||||
|
//trans count
|
||||||
|
if(data.transcriptions_count)
|
||||||
|
{
|
||||||
|
$('#trans_count').removeClass();
|
||||||
|
$('#trans_count').addClass("text-success");
|
||||||
|
$('#trans_count').text("(Fonetični zapisi: "+data.transcriptions_count+")");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#trans_count').removeClass();
|
||||||
|
$('#trans_count').addClass('text-danger');
|
||||||
|
$('#trans_count').text("(Ni fonetičnih zapisov)");
|
||||||
|
}
|
||||||
|
|
||||||
|
//empty current markers
|
||||||
|
$("#markers").empty();
|
||||||
|
|
||||||
|
var svg = d3.select("body").select("#Layer_1");
|
||||||
|
svg.select('#pins').remove();
|
||||||
|
var defs = svg.append('defs').attr('id','pins');
|
||||||
|
|
||||||
|
//foreach and get pins for each transcription
|
||||||
|
$.each(data.words_transcriptions, function(i, transcription){
|
||||||
|
/* delujoča
|
||||||
|
var svg = d3.select("body").select("#Layer_1");
|
||||||
|
svg.append('defs').append("g").attr("id","pin"+i).append("image").attr("xlink:href",transcription.pin).attr("height","25px").attr("width","25px")
|
||||||
|
*/
|
||||||
|
|
||||||
|
var g = defs.append("g").attr("id","pin"+i);
|
||||||
|
|
||||||
|
if(transcription.id)
|
||||||
|
{
|
||||||
|
g.append("text").attr('id','text-'+transcription.pin).attr("x","0px").attr("y","2px").attr("font-size","18pt").attr('class','SIMBola').style("fill", transcription.icon_color).text(transcription.pin);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g.append("text").attr('id','text-'+transcription.pin).attr("x","0px").attr("y","2px").attr("font-size","18pt").text("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var element = d3.select('#text-'+transcription.pin).node();
|
||||||
|
var width = element.getBoundingClientRect().width;
|
||||||
|
|
||||||
|
g.append("text").attr("x",width+8+"px").attr("y","0px").attr("font-size","12pt").text(transcription.short_name);
|
||||||
|
|
||||||
|
// Create an SVG <use> element
|
||||||
|
var use = document.createElementNS(svgNS, "use");
|
||||||
|
|
||||||
|
use.setAttributeNS(xlinkNS, "href", "#pin"+i);
|
||||||
|
use.setAttribute("x", transcription.x);
|
||||||
|
use.setAttribute("y", transcription.y);
|
||||||
|
use.setAttribute("class", "icons_all icons-"+transcription.code_title);
|
||||||
|
|
||||||
|
if(transcription.id)
|
||||||
|
{
|
||||||
|
use.setAttribute("data-toggle","modal");
|
||||||
|
use.setAttribute("data-target","#my_modal-"+i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
use.style.cursor="default";
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("markers").appendChild(use);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax_change_subject()
|
||||||
|
{
|
||||||
|
var id_subject=$("#subjects option:selected").val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "<?=$this->url?>ajax_change_subject",
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
id_subject: id_subject
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data){
|
||||||
|
if(data.status=='ok')
|
||||||
|
{
|
||||||
|
var options;
|
||||||
|
$('#words').empty();
|
||||||
|
|
||||||
|
$.each(data.words, function(id, title){
|
||||||
|
options += '<option value=' + id + '>' + title + '</option>';
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#words').append(options);
|
||||||
|
|
||||||
|
//update map - za praznjenje ko ni izbrana nobena tema
|
||||||
|
ajax_add_locations();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Prišlo je do napake pri nalaganju podatkov. Prosimo poskusite ponovno!');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
92
sna/application/views/home/legend_view.php
Normal file
92
sna/application/views/home/legend_view.php
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($legend) and $legend)
|
||||||
|
{
|
||||||
|
$last = array_pop($legend);
|
||||||
|
ksort($legend);
|
||||||
|
array_push($legend,$last);
|
||||||
|
?>
|
||||||
|
<div class="info-panel-image-borders legend">
|
||||||
|
<div class="legend_title text-left" style="font-size:14pt">
|
||||||
|
<strong><span>Legenda</span></strong>
|
||||||
|
</div>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="text-center"><input type="checkbox" class="toggle_all" checked="1"/></th>
|
||||||
|
<th class="text-center">Znak</th>
|
||||||
|
<th class="text-center">Leksem</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<?
|
||||||
|
foreach($legend as $title=>$row)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center"><input type="checkbox" checked="1" id="icons-<?=$row['code_title']?>" class="toggle_icons"/></td>
|
||||||
|
<td class="text-center SIMBola" style="color:<?=$row['icon_color']?>;"><?=$row['icon']?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<?
|
||||||
|
if($title=='no_title')
|
||||||
|
{
|
||||||
|
echo "ni odgovora";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo $title;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.toggle_icons').click(function() {
|
||||||
|
var icons = $(this).attr('id');
|
||||||
|
|
||||||
|
$('.'+icons).toggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(".toggle_all").click(function () {
|
||||||
|
if($(this).is(":checked"))
|
||||||
|
$(".icons_all").show();
|
||||||
|
else
|
||||||
|
$(".icons_all").hide();
|
||||||
|
|
||||||
|
$('input:checkbox').not(this).prop('checked', this.checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
11338
sna/application/views/home/map_view.php
Normal file
11338
sna/application/views/home/map_view.php
Normal file
File diff suppressed because one or more lines are too long
76
sna/application/views/home/transcription_popup_view.php
Normal file
76
sna/application/views/home/transcription_popup_view.php
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($words_transcriptions) and $words_transcriptions)
|
||||||
|
{
|
||||||
|
foreach($words_transcriptions as $id=>$transcription)
|
||||||
|
{
|
||||||
|
if(isset($transcription['phonetic_writing']))
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<div class="modal fade" id="my_modal-<?=$id?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||||
|
<div class="modal-div-vertical-center">
|
||||||
|
<div class="modal-dialog modal-md modal-vertical-center " role="document">
|
||||||
|
<div class="modal-content" id="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<span class="modal-title text14 bold" id="title"><strong><?=$transcription['name']?></strong>:</span><span class="text12"> <?=$transcription['dialect']?>, <?=$transcription['subdialect']?><?=(isset($transcription['subsubdialect']) and $transcription['subdialect'])?', '.$transcription['subsubdialect']:''?></span>
|
||||||
|
</div>
|
||||||
|
<!--<span class="ZRCola"><?=$transcription['phonetic_writing']?></span>-->
|
||||||
|
<div class="modal-body" id="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 bold modal-div-content"><span class="text14 bold"><?=$transcription['title']?></span></div>
|
||||||
|
<div class="col-md-8 ZRCola modal-div-content text12">
|
||||||
|
<span class="ZRCola text14"><?=$transcription['phonetic_writing']?></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 bold modal-div-content"><span class="text12 bold">Beseda - besedilo</span></div>
|
||||||
|
<div class="col-md-8 ZRCola modal-div-content text12">
|
||||||
|
<span class="text12"><?=$transcription['trans_text']?></span>
|
||||||
|
</div>
|
||||||
|
</div><br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 bold modal-div-content"><span class="text12 bold">Zvočni posnetek</span></div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<audio controls>
|
||||||
|
<source src="<?php echo base_url().$transcription['audio']?>" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn info-panel-btn" data-dismiss="modal">Zapri</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
11
sna/application/views/index.html
Normal file
11
sna/application/views/index.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>403 Forbidden</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<p>Directory access is forbidden.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
48
sna/application/views/no_content_error.php
Normal file
48
sna/application/views/no_content_error.php
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
Copyright (C) 2017 Gregor Šajn
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container container-panel">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/index_view.php');
|
||||||
|
?>
|
||||||
|
<div class="row" style="overflow: none">
|
||||||
|
<?
|
||||||
|
$this->load->view('admin/admin_nav.php');
|
||||||
|
?>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<div class="alert alert-danger fade in hidden" id="alert" role="alert">
|
||||||
|
<span id="alert_text"><span class="glyphicon glyphicon-exclamation-sign"></span> <?=$text?> <a href="<?=$link_back?>">Nazaj</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#alert').fadeIn(400);
|
||||||
|
$('#alert').removeClass('hidden');
|
||||||
|
//$('alert').addClass('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
89
sna/application/views/welcome_message.php
Normal file
89
sna/application/views/welcome_message.php
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
?><!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Welcome to CodeIgniter</title>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
::selection { background-color: #E13300; color: white; }
|
||||||
|
::-moz-selection { background-color: #E13300; color: white; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 40px;
|
||||||
|
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||||
|
color: #4F5155;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #003399;
|
||||||
|
background-color: transparent;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #444;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 1px solid #D0D0D0;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 0 14px 0;
|
||||||
|
padding: 14px 15px 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
color: #002166;
|
||||||
|
display: block;
|
||||||
|
margin: 14px 0 14px 0;
|
||||||
|
padding: 12px 10px 12px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#body {
|
||||||
|
margin: 0 15px 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.footer {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 11px;
|
||||||
|
border-top: 1px solid #D0D0D0;
|
||||||
|
line-height: 32px;
|
||||||
|
padding: 0 10px 0 10px;
|
||||||
|
margin: 20px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid #D0D0D0;
|
||||||
|
box-shadow: 0 0 8px #D0D0D0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
<h1>Welcome to CodeIgniter!</h1>
|
||||||
|
|
||||||
|
<div id="body">
|
||||||
|
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
|
||||||
|
|
||||||
|
<p>If you would like to edit this page you'll find it located at:</p>
|
||||||
|
<code>application/views/welcome_message.php</code>
|
||||||
|
|
||||||
|
<p>The corresponding controller for this page is found at:</p>
|
||||||
|
<code>application/controllers/Welcome.php</code>
|
||||||
|
|
||||||
|
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
587
sna/assets/css/bootstrap-theme.css
vendored
Normal file
587
sna/assets/css/bootstrap-theme.css
vendored
Normal file
|
@ -0,0 +1,587 @@
|
||||||
|
/*!
|
||||||
|
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||||
|
* Copyright 2011-2016 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
*/
|
||||||
|
.btn-default,
|
||||||
|
.btn-primary,
|
||||||
|
.btn-success,
|
||||||
|
.btn-info,
|
||||||
|
.btn-warning,
|
||||||
|
.btn-danger {
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.btn-default:active,
|
||||||
|
.btn-primary:active,
|
||||||
|
.btn-success:active,
|
||||||
|
.btn-info:active,
|
||||||
|
.btn-warning:active,
|
||||||
|
.btn-danger:active,
|
||||||
|
.btn-default.active,
|
||||||
|
.btn-primary.active,
|
||||||
|
.btn-success.active,
|
||||||
|
.btn-info.active,
|
||||||
|
.btn-warning.active,
|
||||||
|
.btn-danger.active {
|
||||||
|
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||||
|
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||||
|
}
|
||||||
|
.btn-default.disabled,
|
||||||
|
.btn-primary.disabled,
|
||||||
|
.btn-success.disabled,
|
||||||
|
.btn-info.disabled,
|
||||||
|
.btn-warning.disabled,
|
||||||
|
.btn-danger.disabled,
|
||||||
|
.btn-default[disabled],
|
||||||
|
.btn-primary[disabled],
|
||||||
|
.btn-success[disabled],
|
||||||
|
.btn-info[disabled],
|
||||||
|
.btn-warning[disabled],
|
||||||
|
.btn-danger[disabled],
|
||||||
|
fieldset[disabled] .btn-default,
|
||||||
|
fieldset[disabled] .btn-primary,
|
||||||
|
fieldset[disabled] .btn-success,
|
||||||
|
fieldset[disabled] .btn-info,
|
||||||
|
fieldset[disabled] .btn-warning,
|
||||||
|
fieldset[disabled] .btn-danger {
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.btn-default .badge,
|
||||||
|
.btn-primary .badge,
|
||||||
|
.btn-success .badge,
|
||||||
|
.btn-info .badge,
|
||||||
|
.btn-warning .badge,
|
||||||
|
.btn-danger .badge {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.btn:active,
|
||||||
|
.btn.active {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-default {
|
||||||
|
text-shadow: 0 1px 0 #fff;
|
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
border-color: #ccc;
|
||||||
|
}
|
||||||
|
.btn-default:hover,
|
||||||
|
.btn-default:focus {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-default:active,
|
||||||
|
.btn-default.active {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
}
|
||||||
|
.btn-default.disabled,
|
||||||
|
.btn-default[disabled],
|
||||||
|
fieldset[disabled] .btn-default,
|
||||||
|
.btn-default.disabled:hover,
|
||||||
|
.btn-default[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-default:hover,
|
||||||
|
.btn-default.disabled:focus,
|
||||||
|
.btn-default[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-default:focus,
|
||||||
|
.btn-default.disabled.focus,
|
||||||
|
.btn-default[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-default.focus,
|
||||||
|
.btn-default.disabled:active,
|
||||||
|
.btn-default[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-default:active,
|
||||||
|
.btn-default.disabled.active,
|
||||||
|
.btn-default[disabled].active,
|
||||||
|
fieldset[disabled] .btn-default.active {
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-primary {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #245580;
|
||||||
|
}
|
||||||
|
.btn-primary:hover,
|
||||||
|
.btn-primary:focus {
|
||||||
|
background-color: #265a88;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-primary:active,
|
||||||
|
.btn-primary.active {
|
||||||
|
background-color: #265a88;
|
||||||
|
border-color: #245580;
|
||||||
|
}
|
||||||
|
.btn-primary.disabled,
|
||||||
|
.btn-primary[disabled],
|
||||||
|
fieldset[disabled] .btn-primary,
|
||||||
|
.btn-primary.disabled:hover,
|
||||||
|
.btn-primary[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-primary:hover,
|
||||||
|
.btn-primary.disabled:focus,
|
||||||
|
.btn-primary[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-primary:focus,
|
||||||
|
.btn-primary.disabled.focus,
|
||||||
|
.btn-primary[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-primary.focus,
|
||||||
|
.btn-primary.disabled:active,
|
||||||
|
.btn-primary[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-primary:active,
|
||||||
|
.btn-primary.disabled.active,
|
||||||
|
.btn-primary[disabled].active,
|
||||||
|
fieldset[disabled] .btn-primary.active {
|
||||||
|
background-color: #265a88;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #3e8f3e;
|
||||||
|
}
|
||||||
|
.btn-success:hover,
|
||||||
|
.btn-success:focus {
|
||||||
|
background-color: #419641;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-success:active,
|
||||||
|
.btn-success.active {
|
||||||
|
background-color: #419641;
|
||||||
|
border-color: #3e8f3e;
|
||||||
|
}
|
||||||
|
.btn-success.disabled,
|
||||||
|
.btn-success[disabled],
|
||||||
|
fieldset[disabled] .btn-success,
|
||||||
|
.btn-success.disabled:hover,
|
||||||
|
.btn-success[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-success:hover,
|
||||||
|
.btn-success.disabled:focus,
|
||||||
|
.btn-success[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-success:focus,
|
||||||
|
.btn-success.disabled.focus,
|
||||||
|
.btn-success[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-success.focus,
|
||||||
|
.btn-success.disabled:active,
|
||||||
|
.btn-success[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-success:active,
|
||||||
|
.btn-success.disabled.active,
|
||||||
|
.btn-success[disabled].active,
|
||||||
|
fieldset[disabled] .btn-success.active {
|
||||||
|
background-color: #419641;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #28a4c9;
|
||||||
|
}
|
||||||
|
.btn-info:hover,
|
||||||
|
.btn-info:focus {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-info:active,
|
||||||
|
.btn-info.active {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
border-color: #28a4c9;
|
||||||
|
}
|
||||||
|
.btn-info.disabled,
|
||||||
|
.btn-info[disabled],
|
||||||
|
fieldset[disabled] .btn-info,
|
||||||
|
.btn-info.disabled:hover,
|
||||||
|
.btn-info[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-info:hover,
|
||||||
|
.btn-info.disabled:focus,
|
||||||
|
.btn-info[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-info:focus,
|
||||||
|
.btn-info.disabled.focus,
|
||||||
|
.btn-info[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-info.focus,
|
||||||
|
.btn-info.disabled:active,
|
||||||
|
.btn-info[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-info:active,
|
||||||
|
.btn-info.disabled.active,
|
||||||
|
.btn-info[disabled].active,
|
||||||
|
fieldset[disabled] .btn-info.active {
|
||||||
|
background-color: #2aabd2;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #e38d13;
|
||||||
|
}
|
||||||
|
.btn-warning:hover,
|
||||||
|
.btn-warning:focus {
|
||||||
|
background-color: #eb9316;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-warning:active,
|
||||||
|
.btn-warning.active {
|
||||||
|
background-color: #eb9316;
|
||||||
|
border-color: #e38d13;
|
||||||
|
}
|
||||||
|
.btn-warning.disabled,
|
||||||
|
.btn-warning[disabled],
|
||||||
|
fieldset[disabled] .btn-warning,
|
||||||
|
.btn-warning.disabled:hover,
|
||||||
|
.btn-warning[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-warning:hover,
|
||||||
|
.btn-warning.disabled:focus,
|
||||||
|
.btn-warning[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-warning:focus,
|
||||||
|
.btn-warning.disabled.focus,
|
||||||
|
.btn-warning[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-warning.focus,
|
||||||
|
.btn-warning.disabled:active,
|
||||||
|
.btn-warning[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-warning:active,
|
||||||
|
.btn-warning.disabled.active,
|
||||||
|
.btn-warning[disabled].active,
|
||||||
|
fieldset[disabled] .btn-warning.active {
|
||||||
|
background-color: #eb9316;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.btn-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #b92c28;
|
||||||
|
}
|
||||||
|
.btn-danger:hover,
|
||||||
|
.btn-danger:focus {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
background-position: 0 -15px;
|
||||||
|
}
|
||||||
|
.btn-danger:active,
|
||||||
|
.btn-danger.active {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
border-color: #b92c28;
|
||||||
|
}
|
||||||
|
.btn-danger.disabled,
|
||||||
|
.btn-danger[disabled],
|
||||||
|
fieldset[disabled] .btn-danger,
|
||||||
|
.btn-danger.disabled:hover,
|
||||||
|
.btn-danger[disabled]:hover,
|
||||||
|
fieldset[disabled] .btn-danger:hover,
|
||||||
|
.btn-danger.disabled:focus,
|
||||||
|
.btn-danger[disabled]:focus,
|
||||||
|
fieldset[disabled] .btn-danger:focus,
|
||||||
|
.btn-danger.disabled.focus,
|
||||||
|
.btn-danger[disabled].focus,
|
||||||
|
fieldset[disabled] .btn-danger.focus,
|
||||||
|
.btn-danger.disabled:active,
|
||||||
|
.btn-danger[disabled]:active,
|
||||||
|
fieldset[disabled] .btn-danger:active,
|
||||||
|
.btn-danger.disabled.active,
|
||||||
|
.btn-danger[disabled].active,
|
||||||
|
fieldset[disabled] .btn-danger.active {
|
||||||
|
background-color: #c12e2a;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.thumbnail,
|
||||||
|
.img-thumbnail {
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.dropdown-menu > li > a:hover,
|
||||||
|
.dropdown-menu > li > a:focus {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.dropdown-menu > .active > a,
|
||||||
|
.dropdown-menu > .active > a:hover,
|
||||||
|
.dropdown-menu > .active > a:focus {
|
||||||
|
background-color: #2e6da4;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.navbar-default {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||||
|
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-nav > .open > a,
|
||||||
|
.navbar-default .navbar-nav > .active > a {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||||
|
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.navbar-brand,
|
||||||
|
.navbar-nav > li > a {
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
|
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||||
|
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.navbar-inverse .navbar-nav > .open > a,
|
||||||
|
.navbar-inverse .navbar-nav > .active > a {
|
||||||
|
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||||
|
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||||
|
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
.navbar-inverse .navbar-brand,
|
||||||
|
.navbar-inverse .navbar-nav > li > a {
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
.navbar-static-top,
|
||||||
|
.navbar-fixed-top,
|
||||||
|
.navbar-fixed-bottom {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||||
|
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||||
|
color: #fff;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.alert {
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
}
|
||||||
|
.alert-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #b2dba1;
|
||||||
|
}
|
||||||
|
.alert-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #9acfea;
|
||||||
|
}
|
||||||
|
.alert-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #f5e79e;
|
||||||
|
}
|
||||||
|
.alert-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dca7a7;
|
||||||
|
}
|
||||||
|
.progress {
|
||||||
|
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||||
|
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-success {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||||
|
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-info {
|
||||||
|
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||||
|
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-warning {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||||
|
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-danger {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||||
|
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.progress-bar-striped {
|
||||||
|
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||||
|
}
|
||||||
|
.list-group {
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||||
|
}
|
||||||
|
.list-group-item.active,
|
||||||
|
.list-group-item.active:hover,
|
||||||
|
.list-group-item.active:focus {
|
||||||
|
text-shadow: 0 -1px 0 #286090;
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #2b669a;
|
||||||
|
}
|
||||||
|
.list-group-item.active .badge,
|
||||||
|
.list-group-item.active:hover .badge,
|
||||||
|
.list-group-item.active:focus .badge {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
.panel {
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||||
|
}
|
||||||
|
.panel-default > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||||
|
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-primary > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||||
|
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-success > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||||
|
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-info > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||||
|
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-warning > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||||
|
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.panel-danger > .panel-heading {
|
||||||
|
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||||
|
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
.well {
|
||||||
|
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||||
|
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
border-color: #dcdcdc;
|
||||||
|
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||||
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||||
|
}
|
||||||
|
/*# sourceMappingURL=bootstrap-theme.css.map */
|
1
sna/assets/css/bootstrap-theme.css.map
Normal file
1
sna/assets/css/bootstrap-theme.css.map
Normal file
File diff suppressed because one or more lines are too long
6
sna/assets/css/bootstrap-theme.min.css
vendored
Normal file
6
sna/assets/css/bootstrap-theme.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
sna/assets/css/bootstrap-theme.min.css.map
Normal file
1
sna/assets/css/bootstrap-theme.min.css.map
Normal file
File diff suppressed because one or more lines are too long
6757
sna/assets/css/bootstrap.css
vendored
Normal file
6757
sna/assets/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
sna/assets/css/bootstrap.css.map
Normal file
1
sna/assets/css/bootstrap.css.map
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user