| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223 |
- <?php
- Lib::loadClass('RouteBase');
- Lib::loadClass('ProcesHelper');
- Lib::loadClass('Config');
- Lib::loadClass('UI');
- Lib::loadClass('User');
- Lib::loadClass('Request');
- Lib::loadClass('Response');
- Lib::loadClass('Api_WfsNs');
- class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @see Route_UrlAction
- public function getProcesListAjaxAction(){
- try {
- $rows = DB::getPDO()->fetchAll("
- SELECT * FROM `CRM_PROCES` WHERE FIND_IN_SET(`ID`, ( SELECT GROUP_CONCAT(Level SEPARATOR ',')
- FROM ( SELECT @Ids := ( SELECT GROUP_CONCAT(`ID` SEPARATOR ',') FROM `CRM_PROCES` WHERE FIND_IN_SET(`PARENT_ID`, @Ids)
- AND `TYPE` <> 'PROCES_INIT' ) Level FROM `CRM_PROCES` JOIN
- (SELECT @Ids := 0) temp1
- WHERE FIND_IN_SET(`PARENT_ID`, @Ids) ) temp2 ))
- AND `PARENT_ID` >= 0 AND `A_STATUS` <> 'DELETED'
- ");
- $state = array();
- foreach ($rows as $key => $value) {
- $id = intval($value["ID"]);
- $parent_id = intval($value["PARENT_ID"]);
- $state[$id]["ID"] = $value["ID"];
- $state[$id]["DESC"] = $value["DESC"];
- $state[$id]["OPIS"] = $value["OPIS"];
- $state[$id]["TYPE"] = $value["TYPE"];
- $state[$id]["IF_TRUE_GOTO"] = intval($value["IF_TRUE_GOTO"]);
- $state[$id]["IF_TRUE_GOTO_FLAG"] = $value["IF_TRUE_GOTO_FLAG"];
- $state[$id]["PARENT_ID"] = (intval($value["PARENT_ID"]) != 0) ? intval($value["PARENT_ID"]) : "#";
- $state[$id]["SORT_PRIO"] = $value["SORT_PRIO"];
- if (!isset($state[$id]["childs"])) $state[$id]["childs"] = array();
- if (!isset($state[$parent_id]["childs"])) $state[$parent_id]["childs"] = array();
- $temp = array();
- $temp["ID"] = $id;
- array_push($state[$parent_id]["childs"], $temp);
- }
- Response::sendJsonExit($state);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getPathAjaxAction(){
- try {
- $video_id = V::get('id', 0, $_GET, 'int');
- $rows = DB::getPDO()->fetchAll("
- SELECT f.ID, f.DESC
- FROM (
- SELECT @id AS _id, (SELECT @id := PARENT_ID FROM CRM_PROCES WHERE ID = _id)
- FROM (SELECT @id := {$video_id}) tmp1
- JOIN CRM_PROCES ON @id <> 0
- ) tmp2
- JOIN CRM_PROCES f ON tmp2._id = f.ID
- ");
- $rows = array_reverse($rows);
- Response::sendJsonExit($rows);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- private function addWatermark($url){
- $watermark_file = "/Library/Server/Web/Data/Sites/Default/SE/stuff/images/play.png"; //to change
- $image = new Imagick();
- $image->readImage($url);
- $watermark = new Imagick();
- $watermark->readImage($watermark_file);
- $image->resizeImage(500,500,Imagick::FILTER_LANCZOS,1);
- $image->compositeImage($watermark, imagick::COMPOSITE_OVER, 0, 0);
- $image->writeImage($url);
- $image->clear();
- $image->destroy();
- $watermark->clear();
- $watermark->destroy();
- }
- public function uploadVideoAction() {
- if (!User::logged()) return;
- $CRM_VIDEO = "/Library/Server/Web/Data/Sites/Default/PLIKI/bartosz_procesy5_pl/CRM_VIDEO/";
- $url = $_FILES["files"]["tmp_name"][0];
- $size = $_FILES["files"]["size"][0];
- $name = $_FILES["files"]["name"][0];
- $finfo = new finfo(FILEINFO_MIME_TYPE);
- $type = $finfo->file($url);
- $ext = pathinfo($name, PATHINFO_EXTENSION);
- $imgExtList = array("image/png", "image/jpeg");
- $vidExtList = array("video/mp4");
- $info = new stdClass();
- $statement = DB::getPDO()->prepare("INSERT INTO CRM_IMAGE(NAME, TYPE, REMOTE_TABLE, REMOTE_ID, IMAGE, SIZE)
- VALUES(:NAME, :TYPE, :REMOTE_TABLE, :REMOTE_ID, :IMAGE, :SIZE)");
- if(in_array($type, $imgExtList)){
- // $content = 'data:'.$type.';base64,'.base64_encode(file_get_contents($url));//
- $content = file_get_contents($url);
- $statement->bindParam(':NAME', $name, PDO::PARAM_STR);
- $statement->bindParam(':TYPE', $type, PDO::PARAM_STR);
- $imageType = "ADMIN_USERS";
- $statement->bindParam(':REMOTE_TABLE', $imageType, PDO::PARAM_STR);
- $idUser = User::getID();
- $statement->bindParam(':REMOTE_ID', $idUser, PDO::PARAM_INT);
- $statement->bindParam(':IMAGE', $content, PDO::PARAM_LOB);
- $statement->bindParam(':SIZE', $size, PDO::PARAM_INT);
- $statement->execute();
- $info->statusCode = 0;
- $info->statusText = "Plik załadowany pomyślnie";
- }else if(false && in_array($type, $vidExtList)){ //Only image files
- $statement_video = DB::getPDO()->prepare("INSERT INTO CRM_VIDEO(NAME, TYPE, REMOTE_TABLE, REMOTE_ID, PARENT_ID, HAS_FILE, EXT, VIDEO_START, VIDEO_END)
- VALUES(:NAME, :TYPE, :REMOTE_TABLE, :REMOTE_ID, :PARENT_ID, :HAS_FILE, :EXT, :VIDEO_START, :VIDEO_END)");
- $cmd_duration = "/usr/local/bin/ffmpeg -i ".$url." 2>&1 | grep \"Duration\" | cut -d, -f1 | sed 's#Duration\:##' | sed 's# ##' | cut -d. -f1";
- $str_time = exec($cmd_duration);
- $str_time = preg_replace("/^([\d]{1,2})\:([\d]{2})$/", "00:$1:$2", $str_time);
- sscanf($str_time, "%d:%d:%d", $hours, $minutes, $seconds);
- $time_seconds = $hours * 3600 + $minutes * 60 + $seconds;
- $statement_video->execute(array(
- ":NAME" => $name,
- ":TYPE" => $type,
- ":REMOTE_TABLE" => "ADMIN_USERS",
- ":PARENT_ID" => 0,
- ":REMOTE_ID" => User::getID(),
- ":EXT" => $ext,
- ":HAS_FILE" => 1,
- ":VIDEO_START" => 0,
- ":VIDEO_END" => $time_seconds,
- ));
- $id = DB::getPDO()->lastInsertId();
- $temp_file = tempnam(sys_get_temp_dir(), 'thumbnail_');
- rename($temp_file, $temp_file .= '.png');
- $cmd = '/usr/local/bin/ffmpeg -y -i '.$url.' -ss 00:00:1 -vframes 1 '.$temp_file.' 2>&1';
- shell_exec($cmd);
- $this->addWatermark($temp_file);
- $img_content = 'data:'."image/png".';base64,'.base64_encode(file_get_contents($temp_file));
- $img_size = filesize($temp_file);
- $statement->execute(array(
- ":NAME" => "Miniaturka dla ".$name,
- ":TYPE" => "image/png",
- ":REMOTE_TABLE" => "CRM_VIDEO",
- ":REMOTE_ID" => $id,
- ":IMAGE" => $img_content,
- ":SIZE" => $img_size
- ));
- move_uploaded_file ( $url, $CRM_VIDEO.$id.".".$ext );
- $info->statusCode = 0;
- $info->statusText = "Plik załadowany pomyślnie" ;
- }else{
- $info->statusCode = 1;
- $info->statusText = "Nieobsługiwany format pliku ".$type ;
- }
- Response::sendJsonExit($info);
- }
- public function getVideoFileAjaxAction(){
- try {
- $video_id = V::get('id', 0, $_GET, 'int');
- if ($video_id <= 0) throw new Exception("ID is not set.");
- $sqlVideoId = DB::getPDO()->quote($video_id, PDO::PARAM_INT);
- $rows = DB::getPDO()->fetchAll("
- SELECT f.VIDEO_ID
- FROM (
- SELECT @id AS _id, (SELECT @id := PARENT_ID FROM CRM_VIDEO WHERE VIDEO_ID = _id)
- FROM (SELECT @id := {$sqlVideoId}) tmp1
- JOIN CRM_VIDEO ON @id <> 0
- ) tmp2
- JOIN CRM_VIDEO f ON tmp2._id = f.VIDEO_ID
- WHERE f.HAS_FILE = 1 and f.TYPE = 'video/mp4'
- ");
- $rows_time = DB::getPDO()->fetchAll("
- SELECT `VIDEO_START`, `VIDEO_END` FROM `CRM_VIDEO` WHERE `VIDEO_ID` = {$sqlVideoId}
- ");
- $id = $rows[0]["VIDEO_ID"];
- $CRM_VIDEO = "/PLIKI/bartosz_procesy5_pl/CRM_VIDEO/";
- $result["src"] = $CRM_VIDEO.$id.".mp4";
- $result["VIDEO_START"] = $rows_time[0]["VIDEO_START"];
- $result["VIDEO_END"] = $rows_time[0]["VIDEO_END"];
- Response::sendJsonExit($result);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getThumbnailAjaxAction($video_id = -1){
- try {
- $doReturn = false;
- if($video_id <= 0)
- $video_id = V::get('id', 0, $_GET, 'int');
- else
- $doReturn = true;
- if ($video_id <= 0) throw new Exception("ID is not set.");
- $sqlVideoId = DB::getPDO()->quote($video_id, PDO::PARAM_INT);
- $rows = DB::getPDO()->fetchAll("
- SELECT f.VIDEO_ID
- FROM (
- SELECT @id AS _id, (SELECT @id := PARENT_ID FROM CRM_VIDEO WHERE VIDEO_ID = _id)
- FROM (SELECT @id := {$sqlVideoId}) tmp1
- JOIN CRM_VIDEO ON @id <> 0
- ) tmp2
- JOIN CRM_VIDEO f ON tmp2._id = f.VIDEO_ID
- WHERE f.PARENT_ID = 0
- ");
- if(isset($rows[0]["VIDEO_ID"])){
- $video_parent_id = $rows[0]["VIDEO_ID"];
- $sqlVideoParentId = DB::getPDO()->quote($video_parent_id , PDO::PARAM_INT);
- $rows = DB::getPDO()->fetchAll("
- SELECT * FROM CRM_IMAGE WHERE REMOTE_TABLE = 'CRM_VIDEO' AND REMOTE_ID = {$sqlVideoParentId}
- ");
- if($doReturn)
- return $rows;
- else
- Response::sendJsonExit($rows);
- }
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getVideosClipboardAjaxAction(){
- try {
- $id = User::getID();
- if ($id <= 0) throw new Exception("ID is not set.");
- $sqlId = DB::getPDO()->quote($id, PDO::PARAM_INT);
- $rows = DB::getPDO()->fetchAll("
- SELECT *
- FROM CRM_VIDEO
- WHERE REMOTE_TABLE = 'ADMIN_USERS' and REMOTE_ID = {$sqlId}
- ");
- foreach($rows as $key=>$value){
- $rows[$key]["THUMBNAIL"] = $this->getThumbnailAjaxAction($value["VIDEO_ID"])[0];
- }
- Response::sendJsonExit($rows);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getResByParentAjaxAction() {
- try {
- $idParent = V::get('parent_id', 0, $_GET, 'int');
- if ($idParent <= 0) throw new Exception("ID is not set.");
- $sqlIdParent = DB::getPDO()->quote($idParent, PDO::PARAM_INT);
- $rows = DB::getPDO()->fetchAll("
- select g.*, p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
- from CRM_LISTA_ZASOBOW g
- left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
- where g.`PARENT_ID` = {$sqlIdParent}
- ORDER BY g.SORT_PRIO ASC, g.ID DESC
- ");
- Response::sendJsonExit($rows);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getResTreeAjaxAction() {
- try {
- $id = V::get('id', '', $_GET);
- $sql = "
- select p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
- from CRM_LISTA_ZASOBOW g
- left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
- where g.`A_STATUS` not in ('DELETED')
- and (p1.ID is null or p1.`A_STATUS` not in ('DELETED'))
- and (p2.ID is null or p2.`A_STATUS` not in ('DELETED'))
- and (p3.ID is null or p3.`A_STATUS` not in ('DELETED'))
- and g.ID = {$id}
- limit 1
- ";
- DBG::_('DBG_SQL', '>1', 'sql', $sql, __CLASS__, __FUNCTION__, __LINE__);
- $rows = DB::getPDO()->fetchAll($sql);
- Response::sendJsonExit($rows);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getResAjaxAction() {
- try {
- $word = V::get('word', '', $_GET);
- $filter = isset($_GET['filter']) ? (int)$_GET['filter'] : 0;
- $sqlFilter = "";
- if (!empty($word)) {
- $sqlWord = DB::getPDO()->quote("%{$word}%", PDO::PARAM_STR);
- if (is_numeric($word)) {
- $sqlFilter .= "AND (g.`DESC` LIKE {$sqlWord} OR g.`ID` LIKE {$sqlWord})" . "\n";
- } else {
- $sqlFilter .= "AND g.`DESC` LIKE {$sqlWord}" . "\n";
- }
- }
- switch ($filter) {
- case 2: $sqlFilter .= "AND (g.`TYPE` = 'TABELA' OR g.`TYPE` = 'KOMORKA')" . "\n"; break;
- case 1: $sqlFilter .= "AND (g.`TYPE` = 'STANOWISKO' OR g.`TYPE` = 'DZIAL' OR g.`TYPE` = 'PODMIOT')" . "\n"; break;
- }
- $sql = "
- select g.*, p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
- from CRM_LISTA_ZASOBOW g
- left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
- where g.`A_STATUS` not in ('DELETED')
- and (p1.ID is null or p1.`A_STATUS` not in ('DELETED'))
- and (p2.ID is null or p2.`A_STATUS` not in ('DELETED'))
- and (p3.ID is null or p3.`A_STATUS` not in ('DELETED'))
- {$sqlFilter}
- limit 100
- ";
- DBG::_('DBG_SQL', '>1', 'sql', $sql, __CLASS__, __FUNCTION__, __LINE__);
- $rows = DB::getPDO()->fetchAll($sql);
- Response::sendJsonExit($rows);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- }
- public function getSingleResAjaxReponseCallback() {
- if (!isset($_POST['data'])) throw new Exception("data is not set.");
- $ids = V::get('data', null, $_POST, 'uint_array');
- if (empty($ids)) throw new Exception("data is not correct.");
- $sqlWhereIdIn = array();
- foreach ($ids as $value) {
- $sqlWhereIdIn[] = DB::getPDO()->quote($value, PDO::PARAM_INT);
- }
- $sqlWhereIdIn = "g.ID in(" . implode(", ", $sqlWhereIdIn) . ")";
- $rows = DB::getPDO()->fetchAll("
- select g.*, p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
- from CRM_LISTA_ZASOBOW g
- left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
- left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
- where {$sqlWhereIdIn}
- ");
- return $rows;
- }
- public function getSingleResAjaxAction() {
- Response::sendTryCatchJson(array($this, 'getSingleResAjaxReponseCallback'));
- }
- public function handleAuth() {
- if (!User::logged()) {
- //throw new HttpException('Unauthorized', 401);
- User::authByRequest();
- }
- // zapisać jsona w sesji
- }
- public function reinstallAction(){
- DB::getPDO()->execSql("
- CREATE TABLE IF NOT EXISTS `CRM_IMAGE` (
- `ID` int(11) NOT NULL,
- `NAME` varchar(50) NOT NULL,
- `SIZE` int(11) NOT NULL,
- `TYPE` varchar(25) NOT NULL,
- `IMAGE` mediumblob NOT NULL,
- `ICON` tinyblob,
- `WIDTH` int(11) NOT NULL,
- `HEIGHT` int(11) NOT NULL,
- `REMOTE_TABLE` enum('CRM_LISTA_ZASOBOW','CRM_PROCES','CRM_WSKAZNIK','ADMIN_USERS','CRM_VIDEO') NOT NULL,
- `REMOTE_ID` int(11) NOT NULL,
- `DEST` varchar(16) NOT NULL,
- `A_CREATE_DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `A_RECORD_CREATE_AUTHOR` varchar(100) NOT NULL,
- `SYNC_SQIX_STATUS` varchar(255) NOT NULL,
- `A_RECORD_CREATE_DATE` varchar(20) NOT NULL DEFAULT '0000-00-00 00:00:00',
- `A_RECORD_UPDATE_DATE` varchar(255) NOT NULL,
- `A_RECORD_UPDATE_AUTHOR` varchar(50) NOT NULL
- ) ENGINE=MyISAM DEFAULT CHARSET=latin2
- ");
- try {
- DB::getPDO()->execSql("
- ALTER table `CRM_IMAGE` CHANGE `REMOTE_TABLE` `REMOTE_TABLE` enum('CRM_LISTA_ZASOBOW','CRM_PROCES','CRM_WSKAZNIK','ADMIN_USERS','CRM_VIDEO') NOT NULL
- ");
- } catch (Exception $e) {
- DBG::log($e);
- }
- }
- public function defaultAction() {
- UI::gora();
- UI::menu();
- try {
- $id = V::get('id', 0, $_REQUEST, 'int');
- if ($id <= 0) $id = -1;
- if($id >= 0)
- UI::setTitleJsTag("Edytor Procesu {{$id}}");
- else
- UI::setTitleJsTag("Tworzenie nowego procesu}");
- $this->showEditor($id);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- UI::dol();
- }
- public function showEditor($id) {
- echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.8.1/css/bootstrap-slider.min.css" crossorigin="anonymous">';
- echo '<link rel="stylesheet" type="text/css" href="static/sweetalert2.min.css">';
- echo '<link rel="stylesheet" href="static/jstree-theme/style.min.css" />';
- echo '<script src="static/jstree.min.js"></script>';
- $this->showEditorCss();
- ?>
- <div id="wrapper" class="toggled" style="overflow:hidden">
- <div id='sidebar-wrapper'><div id="side"></div></div>
- <div id='page-content-wrapper'>
- <div id="left">
- <button class='lButton btn btn-default' id="btnZasoby" style="top:150px"><p>Zasoby</p></button>
- <button class='lButton btn btn-default' style="top:315px" id="btnProcesy"><p>Procesy</p></button>
- <button class='lButton btn btn-default' id="btnPhotos" style="top:480px"><p>Media</p></button>
- </div>
- <div class=col-md-12 >
- <div class=col-md-12 ><a id=toggleMenu style=cursor:pointer;>Przełącz menu</a>
- </div>
- <hr>
- <div class="col-md-12 path" style=border-width:1px;text-align:center;>
- </div>
- </div>
- <div id="main" style="margin-left:40px">
- <center>Uruchamianie aplikacji.</center>
- </div>
- </div>
- </div>
- <script>var USER_ID = '<?= User::getID(); ?>';var BASE_URL = '<?= Request::getPathUri(); ?>';var BASE_WFS_URL = '<?= Api_WfsNs::getBaseWfsUri(); ?>';var mainProces_id = <?= $id; ?>;</script>
- <script src="static/sweetalert2.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.8.1/bootstrap-slider.min.js" crossorigin="anonymous"></script>
- <script src="static/videoPlayer.js?v=?<?php echo time(); if (V::get('DBG', '', $_GET)) echo "&_time=" . time(); ?>"></script>
- <script src="static/jquery.fileupload.js"></script>
- <script src="static/procesEditor.js?<?php echo time(); if (V::get('DBG', '', $_GET)) echo "&_time=" . time(); ?>"></script>
- <?php
- }
- public function showEditorCss() {
- ?>
- <style type="text/css">
- #p5BModalBack{
- width:100%;
- position:fixed;
- height:100%;
- background-color:rgba(0,0,0,0.9);
- z-index:2000;
- text-align:center;
- }
- .p5BModalModal{
- display: inline-block;
- width:800px;
- opacity:1;
- box-shadow:0 5px 15px rgba(0,0,0,.5);
- background-color:white;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #999;
- border: 1px solid rgba(0,0,0,.2);
- border-radius: 6px;
- outline: 0;
- }
- .p5BModalContent{
- text-align:left;
- padding:5px;
- }
- #pathList{
- min-height:400px;
- max-height:650px;
- overflow-y:scroll;
- overflow-x:hidden;
- }
- .p5BModalHeader{
- text-align:left;
- font-size: 18px;
- margin-bottom: 10px;
- font-family: inherit;
- font-weight: 500;
- cursor:move;
- height:30px;
- border-bottom:1px solid silver;
- font-size:1.5em;
- padding-left:10px;
- }
- .p5BModalHeader span{
- display:inline-block;
- padding-top:5px;
- }
- .p5BModalHeader div{
- font-family:verdana;
- float:right;
- padding-top:5px;
- cursor:pointer;
- border-color:black;
- font-weight:bold;
- padding-right:10px;
- padding-top:6px;
- color:gray;
- height:100%;
- padding-left:7px;
- border-top-left-radius:3px;
- border-bottom-left-radius:3px;
- font-size:0.9em;
- }
- .p5BModalHeader div:hover{
- color:#e74c3c;
- }
- .hide{
- display:none;
- }
- .p5BModalButton{
- float:right;
- margin:3px;
- }
- .pathList{
- max-height:700px;
- min-height:300px;
- overflow-y:scroll;
- }
- .activeDrop{
- background-color:#f1f1f1;
- }
- .treeInfo{
- overflow: hidden;
- text-align: right;
- display:inline-block;
- color:grey;
- font-size:0.9em;
- white-space: nowrap;
- max-width: 90%;
- }
- .treeInfo div{
- float:right;
- }
- #left{
- padding:0px;
- }
- .sDescAdd, .hDescAdd, .step{
- padding-left:10px;
- }
- #clipboard{
- color:black;
- }
- .no-draggable .dragIcon{
- display:none;
- }
- .no-draggable .imgTitle{
- cursor:auto !important;
- }
- .attImg, .attVid{
- position:relative;
- display:inline-block;
- margin-top:5px;
- margin-left:10px;
- }
- .attImg .img, .attVid .img{
- height:100%;
- display: flex;
- position:relative;
- background-color:black;
- vertical-align: middle;
- }
- .attImg img, .attVid img{
- align-items: stretch;
- max-width:100%;
- width: auto;
- height: auto;
- }
- .attImg .imgTitle, .attVid .imgTitle{
- background-color:white;
- cursor: move;
- text-align:left;
- }
- .remImg{
- cursor:pointer;
- padding-left:2px;
- padding-right:3px;
- }
- .noRemove .remImg{
- display:none;
- }
- .remImg:hover{
- color:red;
- }
- .attImg div, .attVid div{
- font-family:tahoma;
- text-align:center;
- }
- .lButton{
- -webkit-transform: translate3d(0,0,0);
- position:fixed;
- padding:0px;
- outline:none;
- margin:0px;
- width: 40px;
- height:160px;
- z-index:30;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- }
- .lButton p
- {
- margin-bottom:-50px;
- -moz-transform:rotate(-90deg);
- -ms-transform:rotate(-90deg);
- -o-transform:rotate(-90deg);
- -webkit-transform:rotate(-90deg);
- }
- .ico {
- margin-top: 3px;
- margin-left: 5px;
- cursor: pointer;
- }
- #wrapper {
- padding-left: 0;
- -webkit-transition: all 0.5s ease;
- -moz-transition: all 0.5s ease;
- -o-transition: all 0.5s ease;
- transition: all 0.5s ease;
- }
- #wrapper.toggled {
- padding-left: 600px;
- }
- #wrapper #left { width:40px }
- #wrapper #left .lButton {
- width:40px;
- -webkit-transition: all 0.5s ease;
- -moz-transition: all 0.5s ease;
- -o-transition: all 0.5s ease;
- transition: all 0.5s ease;
- }
- #wrapper.toggled #left .lButton { width:39px }
- #side {
- padding: 15px;
- height: 100%;
- border-top-style:solid;
- border-top-width:1px;
- border-right-style: solid;
- border-color: #A61C2E;
- border-width: 2px;
- }
- ul {
- list-style: none;
- }
- #advCon{
- width:870px;
- min-width:100%;
- }
- .detailsTable{
- color:grey;
- float:left;
- display:inline;
- text-align:center;
- margin-left:5px;
- height:23px;
- }
- .tree{
- color:grey;
- text-overflow:ellipsis;
- white-space:nowrap;
- overflow:hidden;
- display:block;
- cursor:pointer;
- }
- .detailsTable2{
- color:grey;
- display:block;
- font-size:0.8em;
- text-align:left;
- margin-left:5px;
- height:23px;
- }
- .textTable{
- float:left;
- width:200px;
- text-overflow:ellipsis;
- white-space:nowrap;
- overflow:hidden;
- cursor:pointer;
- display:inline-block;
- }
- #dropPic{
- height:250px;
- border-radius:5px;
- border-style:solid;
- border-color:#ededed;
- background-color: #fbfbfb;
- border-width:1px;
- }
- .incorrect{
- border-style:solid !important;
- border-color:#e74c3c !important;
- }
- .focused{
- border-style:solid !important;
- border-color:#3498db !important;
- }
- /* skin.css Style*/
- #inp {
- height: 100px;
- border-width: 2px;
- margin-bottom: 0px;
- color: #ccc;
- border-style: dashed;
- border-color: #ccc;
- line-height: 100px;
- text-align: center;
- display:block;
- width:100%;
- }
- .upload-drop-zone.drop {
- color: #222;
- border-color: #222;
- }
- .anim-refresh {
- -animation: spin .7s infinite linear;
- -webkit-animation: spin2 .7s infinite linear;
- }
- @-webkit-keyframes spin2 {
- from { -webkit-transform: rotate(0deg);}
- to { -webkit-transform: rotate(360deg);}
- }
- @keyframes spin {
- from { transform: scale(1) rotate(0deg);}
- to { transform: scale(1) rotate(360deg);}
- }
- .list-group-item{
- cursor:pointer;
- }
- .list-group-item:hover{
- background-color:#eeeeee;
- }
- .list-group-item:hover .glyphicon{
- opacity:1 !important;
- }
- .textTable2{
- float:left;
- width:230px;
- text-overflow:ellipsis;
- white-space:nowrap;
- overflow:hidden;
- cursor:pointer;
- display:inline-block;
- }
- .pbody{
- padding-left:20px;
- padding-right:20px;
- text-align:justify;
- }
- .singleAdv{
- float:left;
- height:100%;
- width:290px;
- }
- #side #adv{
- }
- #side #ulcon, #side #ulproc, #side #adv {
- background-color: white;
- overflow-y: scroll;
- height: 70% !important;
- border-style:solid;
- border-width:1px;
- border-color:grey;
- margin-top: 10px;
- border-radius: 5px;
- padding-bottom: 10px;
- border-style: solid;
- border-width: 1px;
- border-color: #e5e5e5;
- color: black;
- padding-left: 0px;
- font-family: tahoma;
- font-size: 13px;
- }
- .selectedAdv{
- background-color:#e4e4e4;
- }
- .selectedAdv:hover{
- background-color:#e4e4e4;
- }
- #side .dragStyle {
- padding-left: 8px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-bottom-style: dotted;
- border-width: 1px;
- cursor: pointer;
- border-color: #e5e5e5;
- background-color: white;
- display: block;
- }
- #side .showMore {
- padding-left: 2px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-width: 1px;
- border-color: #e5e5e5;
- }
- #side .gIco {
- padding-left: 2px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-width: 1px;
- border-color: #e5e5e5;
- cursor: pointer;
- }
- #side .hov,
- #side .grad {
- cursor: pointer;
- }
- .vakata-context {
- z-index:3000 !important;
- }
- #side .click {
- float: left;
- color: grey;
- font-size: 10px;
- cursor: pointer;
- }
- .delRes,
- .btnEdit,
- .hdesc,
- .sdesc {
- cursor: pointer;
- }
- .goto{
- padding-left:10px;
- }
- .imagesDrop{
- border-style:dashed;
- border-width:1px;
- border-color:#bdc3c7;
- }
- .sdesc{
- min-height:20px;
- }
- #side .tabelaName {
- white-space: nowrap;
- margin-right: 10px;
- overflow: hidden;
- width: 350px;
- float: left;
- text-overflow: ellipsis;
- display: block;
- cursor: pointer;
- }
- #side .hov:hover {
- background-color: #e5e5e5;
- }
- #sidebar-wrapper {
- position: fixed;
- left: 600px;
- width: 0;
- height: 100%;
- color: white;
- margin-left: -600px;
- overflow-y: auto;
- background: #222;
- -webkit-transition: all 0.5s ease;
- -moz-transition: all 0.5s ease;
- -o-transition: all 0.5s ease;
- transition: all 0.5s ease;
- }
- #wrapper.toggled #sidebar-wrapper {
- width: 600px;
- }
- #page-content-wrapper {
- width: 100%;
- position: absolute;
- z-index:0 !important;
- padding-top: 15px;
- padding-left:0px !important;
- }
- #wrapper.toggled #page-content-wrapper {
- position: absolute;
- margin-right: -600px;
- }
- #wrapper {
- padding-left: 600px;
- }
- #wrapper.toggled {
- padding-left: 0 !important;
- }
- #sidebar-wrapper {
- width: 600px;
- }
- #wrapper.toggled #sidebar-wrapper {
- width: 0 !important;
- }
- #page-content-wrapper {
- padding: 20px;
- position: relative;
- }
- #wrapper.toggled #page-content-wrapper {
- position: relative;
- margin-right: 0;
- }
- .drop {
- margin-top: 10px;
- }
- .sdesc{
- margin-bottom:10px;
- }
- .hdesc textarea,
- .sdesc textarea {
- min-width: 100%;
- padding: 10px;
- }
- .step,
- .sDescAdd {
- margin-top:5px;
- color: grey;
- cursor: pointer;
- display:block;
- font-size:10px;
- }
- .sDescAdd:hover{
- color:black;
- }
- .goto{
- }
- .editGoto{
- cursor:pointer;
- }
- .sdesc {
- display: block;
- }
- .hDescAdd {
- cursor: pointer;
- }
- #saveBtn {} .changable {
- padding-left: 10px;
- }
- .export{
- min-height:200px;
- }
- .changed {
- border-left-style: solid;
- border-width: 3px;
- border-color: #ffc107;
- padding-left: 7px;
- }
- .del {
- }
- .liRes:hover{
- background-color:#fafafa;
- }
- span.glyphicon{
- opacity:0.6;
- cursor:pointer;
- margin-left:3px;
- }
- span.glyphicon:hover{
- opacity:1;
- }
- .delRes:hover{
- color:red;
- }
- .delGoto:hover{
- color:red;
- cursor:pointer;
- }
- .del:hover{
- color:red;
- }
- .ids {
- color: grey;
- font-size: 12px;
- }
- .more {
- margin-left: 15px;
- }
- .resSelected {
- background-color: #d3d3d3;
- }
- .slider .slider-handle {
- background-color: red;
- width: 8px;
- margin-left: -4px !important;
- }
- .slider .slider-handle {} .p5VideoPlayer_vid {
- background-color: black;
- height: 100%;
- width: 100%;
- }
- .p5VideoPlayer {
- width:100%;
- height:calc(100% - 18px);
- }
- .p5VideoPlayer .ico {
- font-size: 12px;
- margin-left: 4px;
- margin-right: 4px;
- cursor: pointer;
- opacity: 0.8;
- }
- .ico:hover {
- opacity: 1;
- }
- .p5VideoPlayer_video-controls {
- background-color: powderblue;
- position:relative;
- }
- .p5VideoPlayer_video-controls:not(.p5VideoPlayer_video-controls-fs) {
- top:-25px;
- }
- .p5VideoPlayer_video-controls .only_fullscreen{
- display:none;
- }
- .p5VideoPlayer_video-controls-fs .only_fullscreen{
- display:table-cell;
- }
- .p5VideoPlayer_video-controls-fs {
- opacity: 0;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- color: white;
- font-size: .8em;
- color:black;
- width: 100%;
- height: 20px;
- z-index: 2147483647;
- }
- .p5VideoPlayer:hover .p5VideoPlayer_video-controls-fs {
- opacity: 1;
- }
- .p5VideoPlayer_video-controls td {
- padding: 0px;
- padding-left:5px;
- padding-right:5px;
- }
- .p5VideoPlayer_video-controls .slider {
- width: 100%;
- }
- .przycinanie .slider {
- width: 100%;
- }
- .slider .slider-selection {
- background: #01b7ce;
- }
- video::-webkit-media-controls {
- display: none !important;
- }
- video::-webkit-media-controls-enclosure {
- display: none !important;
- }
- </style>
- <?php
- }
- }
|