Initial commit

This commit is contained in:
2026-02-18 23:21:06 +05:00
parent 3fae4a863e
commit b210b43540
579 changed files with 3401 additions and 2 deletions

View File

@@ -1,3 +1,25 @@
# gmap
### gmap
Модуль Google-map Только для AVE.CMS ALT
## Модуль Google-map
### Модуль позволяет отображать Google карту по заданному адресу и создавать информационные маркеры на заданных точках.
##### Changelog:
##### 05.09.2019 - обновление модуля до версии 1.26.1.4b - адаптация для версии ave.cms 3.26
##### 16.12.2018 - обновление модуля до версии 1.1.4b - Исправлен баг с файловым менеджером elFinder
##### 08.10.2017 - обновление модуля до версии 1.1.3b - Удалена JS функция document.write(), все js-скрипты выненсены в файлы т подключаются в сеции head
##### 01.07.2017 - обновление модуля до версии 1.1.2b - Фикс подключения файлового менеджера elfinder - изменение путей lib/redactor/elfinder/inc/ на lib/redactor/elfinder/php/
##### 12.06.2017 - обновление модуля до версии 1.1.1b - Фикс подключения файлового менеджера elfinder - изменение путей lib/redactor/elfinder/php/ на lib/redactor/elfinder/inc/
##### 26.05.2017 - обновление модуля до версии 1.1.0b - Адаптация модуля для AVE.cms v3.2 - фикс подключения файлового менеджера elfinder.
##### 05.03.2017 - обновление модуля до версии 1.0.9b - AJAX загрузка пинов с фильтром вывода по цвету пина + возможность добавления собственных пинов в категорию USER.
##### 18.02.2017 - обновление модуля до версии 1.0.8b - рекомендуется для тестирования. Установка только чистая, обновление не прокатит.
##### 28.11.2016 - инициализация модуля - версия 1.0.6 - только для тестирования

660
class/gmap.php Normal file
View File

@@ -0,0 +1,660 @@
<?php
/**
* Класс работы с картами
*
* @package AVE.cms
* @subpackage module_gmap
* @filesource
*/
class Gmap
{
/**
* ФУНКЦИИ ПУБЛИЧНОЙ ЧАСТИ
*/
/**
* Вывод карты
*
* @param int $gmap_id - идентификатор карты
*/
function gmapShow($tpl_dir, $gmap_id)
{
global $AVE_DB, $AVE_Template;
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap
WHERE id = '" . $gmap_id . "'
");
$row_gs = $sql->FetchAssocArray();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_markers
WHERE gmap_id = '" . $gmap_id . "'
");
$markers = array();
while ($row = $sql->FetchAssocArray())
{
array_push($markers, $row);
}
$AVE_Template->assign('gmap', $row_gs);
$AVE_Template->assign('markers', json_encode($markers));
$output = $AVE_Template->fetch($tpl_dir . 'map.tpl');
$GLOBALS['user_header']['module_unicalendar_'] = '<script src=" https://maps.googleapis.com/maps/api/js?key='.GOOGLE_MAP_API_KEY.'&amp;=initMap" type="text/javascript"></script>';
// Создаем js файл для календаря с названием dataXXX.js - где XXX = Id карты
$fdir = "/modules/gmap/js/data-files/";
mkdir(BASE_DIR . $fdir, 0777, true);
chmod(BASE_DIR . $fdir, 0777);
$df = fopen(BASE_DIR . "/modules/gmap/js/data-files/data".$gmap_id.".js", "w")
or die('You do not have write permission!');// ругаемся если нет прав на запись в директорию data-files !
flock($df,2);
fwrite($df, $output);
flock($df,3);
fclose($df);
$GLOBALS['user_header']['module_unicalendar_' . $gmap_id] = '<script src="'.ABS_PATH.'modules/gmap/js/data-files/data'.$gmap_id.'.js" type="text/javascript"></script>';
echo '<div id="myMap'.$gmap_id.'" style="height:'.$row_gs['gmap_height'].'; width:'.$row_gs['gmap_width'].';"></div>';
}
/**
* ФУНКЦИИ АДМИНИСТРАТИВНОЙ ЧАСТИ
*/
/**
* КАТЕГОРИИ - СОЗДАНИЕ - ДОБАВЛЕНИЕ - РЕДАКТИРОВАНИЕ
*/
// Просмотр существующих категорий в админ панели
function gmapCategoryShow($tpl_dir)
{
global $AVE_DB, $AVE_Template;
$gcats = array();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_category
");
//$row_gcat = $sql->FetchRow();
while($row = $sql->FetchAssocArray())
{
array_push($gcats, $row);
}
$AVE_Template->assign('gcats', $gcats);
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'admin_gmap_category.tpl'));
}
// Редактирование маркеров
function gmapMarkerEdit($tpl_dir, $id)
{
global $AVE_DB, $AVE_Template;
$gmarkers = array();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_markers
WHERE id = '" . (int)$id. "'
");
while($row = $sql->FetchAssocArray())
{
array_push($gmarkers, $row);
}
$gcats = array();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_category
");
//$row_gcat = $sql->FetchRow();
while($row = $sql->FetchAssocArray())
{
array_push($gcats, $row);
}
$AVE_Template->assign('gcats', $gcats);
$AVE_Template->assign('gmarkers', $gmarkers);
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'admin_gmap_edit_marker.tpl'));
}
// Сохранение отредактированного маркера
function gmapMarkerEditSave($id){
if (isset($_POST['e_marker']))
{
global $AVE_DB;
$markerDataE = $_POST['e_marker'];
$sql = "UPDATE " . PREFIX . "_module_gmap_markers
SET
id = '" . $markerDataE['id'] . "',
gmap_id = '" . $markerDataE['gmap_id'] . "',
latitude = '" . $markerDataE['latitude'] . "',
longitude = '" . $markerDataE['longitude'] . "',
title = '" . $markerDataE['title'] . "',
title_link = '" . $markerDataE['title_link'] . "',
marker_cat_id = '" . $markerDataE['marker_cat_id'] . "',
marker_cat_title = '" . $markerDataE['marker_cat_title'] . "',
marker_cat_link = '" . $markerDataE['marker_cat_link'] . "',
img_title = '" . $markerDataE['img_title'] . "',
marker_city = '" . $markerDataE['marker_city'] . "',
marker_street = '" . $markerDataE['marker_street'] . "',
marker_building = '" . $markerDataE['marker_building'] . "',
marker_dopfield = '" . $markerDataE['marker_dopfield'] . "',
marker_phone = '" . $markerDataE['marker_phone'] . "',
marker_www = '" . $markerDataE['marker_www'] . "',
image = '" . $markerDataE['image']. "'
WHERE id = '" . (int)$id. "'
";
$AVE_DB->Query($sql);
//$markerDataE['id'] = $AVE_DB->InsertId();
echo json_encode($markerDataE);
exit;
}
}
// Добавление и сохранение новых категорий в админ панели модуля и вывод категории при создании
function gmapCategoryNewAdd(){
if (isset($_POST['category']))
{
global $AVE_DB;
$categoryData = $_POST['category'];
$sql = "
INSERT
INTO " . PREFIX . "_module_gmap_category
SET
id = '',
gcat_title = '" . $categoryData['gcatnewadd'] . "',
gcat_link = '" . $categoryData['gct_link'] . "'
";
$AVE_DB->Query($sql);
$categoryData['id'] = $AVE_DB->InsertId();
$sql = $AVE_DB->Query("
SELECT gcat_title
FROM " . PREFIX . "_module_gmap_category
ORDER BY id DESC
LIMIT 1
");
$row_gcat = $sql->FetchRow();
$categoryData['gcat_title'] = $row_gcat->gcat_title;
echo json_encode($categoryData);
exit;
}
}
/**
* Удаление категории
*
* @param int $id - идентификатор категории
*/
function gmapCategoryDel($id){
global $AVE_DB;
$sql = "DELETE FROM " . PREFIX . "_module_gmap_category WHERE id = '" . (int)$id. "'";
$AVE_DB->Query("DELETE FROM " . PREFIX . "_module_gmap_markers WHERE marker_cat_id = '" . (int)$id . "'");
$AVE_DB->Query($sql);
echo $id;
exit;
}
/**
* Просмотр маркеров карты и добавление новых в админке
*
* @param string $tpl_dir - путь к папке с шаблонами модуля
* @param int $gmap_id - идентификатор карты
*/
function gmapMarkersShow($tpl_dir, $gmap_id)
{
global $AVE_DB, $AVE_Template;
/*
$pin_dir = BASE_DIR.'/modules/gmap/images';
$pin_base_dir = ABS_PATH.'modules/gmap/images';
$pins = array();
if ($handle = opendir($pin_dir . '/')) {
while (false !== ($file = readdir($handle)))
{
if ($file != '.' && $file != '..')
{
$image_title = substr($file, 0, -4);
$upload_file_ext = strtolower(substr($file, -4));
$upload_filename = prepare_fname($image_title) . $upload_file_ext;
if (!empty($upload_filename) && $upload_file_ext == '.png')
{
$pins[] = array('name' => $image_title, 'path' => $pin_base_dir . '/' . $upload_filename);
}
}
}
closedir($handle);
}
*/
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap
WHERE id = '" . $gmap_id . "'
");
$row_gs = $sql->FetchAssocArray();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_markers
WHERE gmap_id = '" . $gmap_id . "'
");
$load_markers = array();
while ($row = $sql->FetchAssocArray())
{
array_push($load_markers, $row);
}
$limit = 5;
$start = get_current_page() * $limit - $limit;
$sql = $AVE_DB->Query("
SELECT SQL_CALC_FOUND_ROWS *
FROM " . PREFIX . "_module_gmap_markers
WHERE gmap_id = '" . $gmap_id . "'
ORDER BY id ASC
LIMIT " . $start . "," . $limit . "
");
$sql_num = $AVE_DB->Query("SELECT FOUND_ROWS()");
$num = $sql_num->GetCell();
$markers = array();
while ($row = $sql->FetchAssocArray())
{
array_push($markers, $row);
}
if ($num > $limit)
{
$page_nav = ' <a class="pnav" href="index.php?do=modules&action=modedit&mod=gmap&moduleaction=show&id=' . $gmap_id . '&page={s}&amp;cp=' . SESSION . '">{t}</a> ';
$page_nav = get_pagination(ceil($num / $limit), 'page', $page_nav);
}
else
{
$page_nav = '';
}
$gcats = array();
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_category
");
//$row_gcat = $sql->FetchRow();
while($row = $sql->FetchAssocArray())
{
array_push($gcats, $row);
}
$AVE_Template->assign('gcats', $gcats);
$AVE_Template->assign('gcats_id', $row['id']);
$AVE_Template->assign('api_key', GOOGLE_MAP_API_KEY);
$AVE_Template->assign('page_nav', $page_nav);
$AVE_Template->assign('gmap', $row_gs);
$AVE_Template->assign('gmap_id', $row_gs['id']);
$AVE_Template->assign('gmap_title', $row_gs['gmap_title']);
$AVE_Template->assign('markers', $markers);
$AVE_Template->assign('load_markers', json_encode($load_markers));
//$AVE_Template->assign('pins', $pins);
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'admin_gmap_markers.tpl'));
}
/**
* Вывод списка карт
*
* @param string $tpl_dir - путь к папке с шаблонами модуля
*/
function gmapListShow($tpl_dir)
{
global $AVE_DB, $AVE_Template;
$gmaps = array();
$limit = 20;
$start = get_current_page() * $limit - $limit;
$sql = $AVE_DB->Query("
SELECT SQL_CALC_FOUND_ROWS
g.*,
COUNT(m.id) AS marker_count
FROM
" . PREFIX . "_module_gmap AS g
LEFT JOIN
" . PREFIX . "_module_gmap_markers AS m
ON m.gmap_id = g.id
GROUP BY g.id
ORDER BY g.id ASC
LIMIT " . $start . "," . $limit . "
");
$sql_num = $AVE_DB->Query("SELECT FOUND_ROWS()");
$num = $sql_num->GetCell();
while($row = $sql->FetchAssocArray())
{
array_push($gmaps, $row);
}
if ($num > $limit)
{
$page_nav = "<li><a href=\"index.php?do=modules&action=modedit&mod=gmap&moduleaction=1&page={s}&amp;cp=" . SESSION . "\">{t}</a></li>";
$page_nav = get_pagination(ceil($num / $limit), 'page', $page_nav);
}
else
{
$page_nav = '';
}
$AVE_Template->assign('page_nav', $page_nav);
if (!empty($_REQUEST['alert']))
{
$AVE_Template->assign('alert', htmlspecialchars(stripslashes($_REQUEST['alert'])));
}
$AVE_Template->assign('api_key', GOOGLE_MAP_API_KEY);
$AVE_Template->assign('gmaps', $gmaps);
$AVE_Template->assign('formaction', 'index.php?do=modules&action=modedit&mod=gmap&moduleaction=new&sub=save&amp;cp=' . SESSION);
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'admin_gmap_list.tpl'));
}
/**
* Сохранение маркеров
*
* @param int $gmap_id - идентификатор карты
*/
function gmapMarkersAdd($gmap_id){
if (isset($_POST['marker']))
{
global $AVE_DB;
$markerData = $_POST['marker'];
$sql = "
INSERT
INTO " . PREFIX . "_module_gmap_markers
SET
id = '',
gmap_id = '".(int)$gmap_id."',
latitude = '" . $markerData['latitude'] . "',
longitude = '" . $markerData['longitude'] . "',
title = '" . $markerData['title'] . "',
title_link = '" . $markerData['title_link'] . "',
marker_cat_id = '" . $markerData['marker_cat_id'] . "',
marker_cat_title = '" . $markerData['marker_cat_title'] . "',
marker_cat_link = '" . $markerData['marker_cat_link'] . "',
img_title = '" . $markerData['img_title'] . "',
marker_city = '" . $markerData['marker_city'] . "',
marker_street = '" . $markerData['marker_street'] . "',
marker_building = '" . $markerData['marker_building'] . "',
marker_dopfield = '" . $markerData['marker_dopfield'] . "',
marker_phone = '" . $markerData['marker_phone'] . "',
marker_www = '" . $markerData['marker_www'] . "',
image = '" . $markerData['image']. "'
";
$AVE_DB->Query($sql);
$markerData['id'] = $AVE_DB->InsertId();
echo json_encode($markerData);
exit;
}
}
/**
* Сохранение редактирования описания маркера
*
* @param int $id - идентификатор маркера
*/
function gmapMarkerSave($id){
if (isset($_POST['marker_title']))
{
global $AVE_DB;
$markerData = $_POST['marker_title'];
$sql = "UPDATE " . PREFIX . "_module_gmap_markers
SET
title = '" . $markerData . "' WHERE id = '" . (int)$id. "'
";
$AVE_DB->Query($sql);
}
exit;
}
/**
* Удаление маркера
*
* @param int $id - идентификатор маркера
*/
function gmapMarkersDel($id){
global $AVE_DB;
$sql = "DELETE FROM " . PREFIX . "_module_gmap_markers WHERE id = '" . (int)$id. "'";
$AVE_DB->Query($sql);
exit;
}
/**
* Получение описания маркера
*
* @param int $id - идентификатор маркера
*/
function gmapMarkersGet($id){
global $AVE_DB;
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap_markers
WHERE id = '" . $id . "'
");
$row_gs = $sql->FetchRow();
echo "<div style='white-space: nowrap; overflow:hidden; min-height: 64px;'>";
if ($row_gs->img_title != '/modules/gmap/img/no_image.png'){
echo "<img style='margin: 0px 10px 0px 0px;' src='/index.php?thumb=".$row_gs->img_title."&height=64&width=64&mode=f'>";
} else {
echo "<img style='margin: 0px 10px 0px 0px;' src='/modules/gmap/img/no_image.png'>";
}
echo "<ul style='list-style:none; margin-top:-68px; margin-left: 72px;'>";
if ($row_gs->marker_cat_title != ''){
if ($row_gs->marker_cat_link == '/' || $row_gs->marker_cat_link == 'javascript:void(0);'){
echo "<li><a style='font-size:11px; color:#828282; text-decoration:none;' onmouseover=\"this.style.color='#181818';\" onmouseout=\"this.style.color='#828282';\" href='".$row_gs->marker_cat_link."'>".$row_gs->marker_cat_title."</a></li>";
} else {
echo "<li><a style='font-size:11px; color:#828282; text-decoration:none;' onmouseover=\"this.style.color='#181818';\" onmouseout=\"this.style.color='#828282';\" href='/".$row_gs->marker_cat_link."'>".$row_gs->marker_cat_title."</a></li>";
}
}
if ($row_gs->title != ''){
if ($row_gs->title_link == '/' || $row_gs->title_link == 'javascript:void(0);'){
echo "<li><a style='font-size:18px; color:#181818; text-decoration:none; border-bottom:2px solid;' onmouseover=\"this.style.color='#FF6600';\" onmouseout=\"this.style.color='#181818';\" href='".$row_gs->title_link."'><strong>".$row_gs->title."</strong></a></li>";
} else {
echo "<li><a style='font-size:18px; color:#181818; text-decoration:none; border-bottom:2px solid;' onmouseover=\"this.style.color='#FF6600';\" onmouseout=\"this.style.color='#181818';\" href='/".$row_gs->title_link."'><strong>".$row_gs->title."</strong></a></li>";
}
}
if ($row_gs->marker_street != '')
echo "<li style='margin-top:5px;'><span style='font-size:12px; color:#68809B;'>".$row_gs->marker_city.', '.$row_gs->marker_street.', '.$row_gs->marker_building."</span></li>";
if ($row_gs->marker_dopfield != '')
echo "<li style='margin-top:5px;'><div style='max-width:280px; white-space: normal !important; color:#828282;'>".$row_gs->marker_dopfield."</div></li></ul>";
echo "<ul style='margin-top:-8px; list-style:none; text-align: center;'>";
if ($row_gs->marker_phone != '')
echo "<li style='margin-top:10px;'><img style='position: relative; top:4px;' src='/modules/gmap/img/phone.png'>".$row_gs->marker_phone."</li>";
if ($row_gs->marker_www != ''){
$placeholders = array('http://www.', 'https://www.', 'http://', 'https://');
echo "<li><a style='font-size:12px; color:#828282; text-decoration:none;' onmouseover=\"this.style.color='#181818';\" onmouseout=\"this.style.color='#828282';\" href='".$row_gs->marker_www."'><img style='position: relative; top:4px;' src='/modules/gmap/img/url.png'>".str_replace($placeholders, 'www.', $row_gs->marker_www)."</a></li></ul>";
}
echo "</div>";
exit;
}
/**
* Создание карты
*
*/
function gmapNew()
{
if (isset($_REQUEST['sub']) && $_REQUEST['sub'] == 'save')
{
global $AVE_DB;
$cont = true;
$alert = '';
if (empty($_POST['gmap_title']))
{
$alert = '&alert=empty_gmap_title';
$cont = false;
}
if ($cont)
{
$AVE_DB->Query("
INSERT
INTO " . PREFIX . "_module_gmap
SET
id = '',
gmap_title = '" . $_POST['gmap_title'] . "',
gmap_height = '" . $_POST['gmap_height'] . "',
gmap_width = '" . $_POST['gmap_width'] . "',
longitude = '" . $_POST['longitude'] . "',
latitude = '" . $_POST['latitude'] . "',
gmap_zoom = '" . (int)$_POST['gmap_zoom'] . "'
");
}
header('Location:index.php?do=modules&action=modedit&mod=gmap&moduleaction=1'. $alert);
exit;
}
}
/**
* Редактирование карты
*
* @param string $tpl_dir - путь к папке с шаблонами модуля
* @param int $gmap_id - идентификатор карты
*/
function gmapEdit($tpl_dir, $gmap_id)
{
global $AVE_DB, $AVE_Template;
if (isset($_REQUEST['sub']) && $_REQUEST['sub'] == 'save')
{
$AVE_DB->Query("
UPDATE " . PREFIX . "_module_gmap
SET
gmap_title = '" . $_POST['gmap_title'] . "',
gmap_height = '" . $_POST['gmap_height'] . "',
gmap_width = '" . $_POST['gmap_width'] . "',
longitude = '" . $_POST['longitude'] . "',
latitude = '" . $_POST['latitude'] . "',
gmap_zoom = '" . (int)$_POST['gmap_zoom'] . "'
WHERE
id = '" . (int)$gmap_id . "'
");
header('Location:index.php?do=modules&action=modedit&mod=gmap&moduleaction=1&amp;cp=' . SESSION);
exit;
}
$sql = $AVE_DB->Query("
SELECT *
FROM " . PREFIX . "_module_gmap
WHERE id = '" . (int)$gmap_id . "'
");
$row = $sql->FetchAssocArray();
$AVE_Template->assign('api_key', GOOGLE_MAP_API_KEY);
$AVE_Template->assign('gmap', $row);
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'admin_gmap_edit.tpl'));
}
/**
* Удаление карты
*
* @param int $gmap_id - идентификатор карты
*/
function gmapDelete($gmap_id)
{
global $AVE_DB;
$AVE_DB->Query("DELETE FROM " . PREFIX . "_module_gmap WHERE id = '" . $gmap_id . "'");
$AVE_DB->Query("DELETE FROM " . PREFIX . "_module_gmap_markers WHERE gmap_id = '" . $gmap_id . "'");
// Удаляем js файл с данными из директории /modules/gmap/js/data-files/
$data_dir = "/modules/gmap/js/data-files";
$filename = BASE_DIR .$data_dir."/data".$gmap_id.".js";
if (file_exists($filename))
{
unlink($filename);
}
header('Location:index.php?do=modules&action=modedit&mod=gmap&moduleaction=1&amp;cp=' . SESSION);
exit;
}
}
?>

246
fm.gmap.php Normal file
View File

@@ -0,0 +1,246 @@
<?php
ob_start();
ob_implicit_flush(0);
define('BASE_DIR', str_replace("\\", "/", dirname(dirname(dirname(__FILE__)))));
require_once(BASE_DIR . '/inc/init.php');
if (! check_permission('adminpanel'))
{
header('Location:/index.php');
exit;
}
$fmgmap = $_POST['fmgmap'];
if ($fmgmap == 'dir_upl')
{
$gmfmen = '<?php
error_reporting(0);
define ("START_MICROTIME", microtime());
define ("START_MEMORY", memory_get_usage());
define("ACP", 1);
define("BASE_DIR", str_replace("\\\", "/", dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
define("SESSION", session_id());
include_once BASE_DIR . "/inc/init.php";
if (! check_permission("mediapool_finder"))
{
die("No permission");
}
require "./autoload.php";
elFinder::$netDrivers["ftp"] = "FTP";
function access($attr, $path, $data, $volume, $isDir, $relpath) {
$basename = basename($path);
return $basename[0] === "."
&& strlen($relpath) !== 1
? !($attr == "read" || $attr == "write")
: null;
}
$opts = array(
"roots" => array(
array(
"driver" => "LocalFileSystem",
"path" => "../../../../" . UPLOAD_DIR,
"URL" => "/".UPLOAD_DIR."/",
"uploadOrder" => array("deny", "allow"),
"acceptedName" => "validName",
"uploadAllow" => array("all"),
"uploadDeny" => array("all"),
"uploadOverwrite" => false,
"uploadMaxSize" => "256m",
"accessControl" => "access",
"attributes" => array(
array(
"pattern" => "/^\/\./",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => true
),
array(
"pattern" => "/.tmb/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.php$/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/.quarantine/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.htaccess$/",
"write" => false,
"locked" => false,
"hidden" => true
)
)
)
)
);
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
?>';
$gfo = fopen(BASE_DIR . "/lib/redactor/elfinder/php/connector_module_gmap.php", "w");
flock($gfo,2);
fwrite($gfo, $gmfmen);
flock($gfo,3);
fclose($gfo);
chmod(BASE_DIR . "/lib/redactor/elfinder/php/connector_module_gmap.php", 0755);
}
if ($fmgmap == 'dir_uplgmi')
{
$gmfmen = '<?php
error_reporting(0);
define ("START_MICROTIME", microtime());
define ("START_MEMORY", memory_get_usage());
define("ACP", 1);
define("BASE_DIR", str_replace("\\\", "/", dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
define("SESSION", session_id());
include_once BASE_DIR . "/inc/init.php";
if (! check_permission("mediapool_finder"))
{
die("No permission");
}
require "./autoload.php";
elFinder::$netDrivers["ftp"] = "FTP";
function access($attr, $path, $data, $volume, $isDir, $relpath) {
$basename = basename($path);
return $basename[0] === "."
&& strlen($relpath) !== 1
? !($attr == "read" || $attr == "write")
: null;
}
$opts = array(
"roots" => array(
array(
"driver" => "LocalFileSystem",
"path" => "../../../../" . UPLOAD_DIR,
"URL" => "/".UPLOAD_DIR."/",
"uploadOrder" => array("deny", "allow"),
"acceptedName" => "validName",
"uploadAllow" => array("all"),
"uploadDeny" => array("all"),
"uploadOverwrite" => false,
"uploadMaxSize" => "256m",
"accessControl" => "access",
"attributes" => array(
array(
"pattern" => "/^\/\./",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => true
),
array(
"pattern" => "/.tmb/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.php$/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/.quarantine/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.htaccess$/",
"write" => false,
"locked" => false,
"hidden" => true
)
),
),
array(
"driver" => "LocalFileSystem",
"path" => "../../../../modules/gmap/images",
"URL" => "/modules/gmap/images/",
"uploadOrder" => array("deny", "allow"),
"acceptedName" => "validName",
"uploadAllow" => array("all"),
"uploadDeny" => array("all"),
"uploadOverwrite" => false,
"uploadMaxSize" => "256m",
"accessControl" => "access",
"attributes" => array(
array(
"pattern" => "/^\/\./",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => true
),
array(
"pattern" => "/.tmb/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.php$/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/.quarantine/",
"read" => false,
"write" => false,
"hidden" => true,
"locked" => false
),
array(
"pattern" => "/\.htaccess$/",
"write" => false,
"locked" => false,
"hidden" => true
)
),
),
)
);
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
?>';
$gfo = fopen(BASE_DIR . "/lib/redactor/elfinder/php/connector_module_gmap.php", "w");
flock($gfo,2);
fwrite($gfo, $gmfmen);
flock($gfo,3);
fclose($gfo);
chmod(BASE_DIR . "/lib/redactor/elfinder/php/connector_module_gmap.php", 0755);
}
if ($fmgmap != 'dir_upl' || $fmgmap != 'dir_uplgmi')
{
header('Location:/index.php');
exit;
}
?>

4
images/index.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
header('Location:/');
exit;
?>

BIN
images/pin-blue1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-blue15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-blue16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/pin-blue20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/pin-blue28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/pin-blue31.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue33.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/pin-blue34.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue35.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/pin-blue36.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue38.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue39.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue40.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue41.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue42.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue43.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue44.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue45.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue46.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue47.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue49.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue50.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-blue51.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue52.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue53.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-blue54.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-blue7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-blue8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-blue9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/pin-brown496.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown497.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown498.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown499.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown500.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown501.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown502.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown503.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown504.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown505.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown506.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown507.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown508.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown509.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown510.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown511.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown513.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown514.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/pin-brown515.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown516.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown517.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown518.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown519.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown520.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/pin-brown521.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown522.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown523.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown524.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown525.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown526.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown527.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown528.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown529.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown530.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown531.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown532.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown533.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/pin-brown534.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/pin-brown535.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
images/pin-brown536.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
images/pin-brown537.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Some files were not shown because too many files have changed in this diff Show More