diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index 651f462..969c46b 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -929,7 +929,7 @@ $res = $db->query("select 1 from '.$Schema.'_Users where del=false and email = '$login';"); if($res->rowCount()>0) { - mail($login,'rigor.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: rigor Site "); + mail($login,'pal.kz','Not implement',"Content-type: text/html; charset=utf-8\r\nFrom: smartpal Site "); } }elseif($cmd==1) //Logout { diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index 70428e9..00ab6cf 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -1470,6 +1470,8 @@ class SRec this.insertRows(node,false); //If not then insert }else { + tr.style.textDecoration="underline"; + let cdataNode = nodeRecord.firstChild; while (cdataNode!=null) { diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index 5b022c0..98313f0 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -21,22 +21,22 @@ function trt(key) } //Расширить плитку чтобы она занимала всю штртну области +//margin - С права и слева по одному пикселю (умножается на 2) function resizeDivTile(parent,minWidth) { if(typeof parent == 'string') parent=document.getElementById(parent); if(parent==null) return; - let margin=2; //С права и слева по одному пикселю то получается два - let dx=Math.floor(parent.offsetWidth/(minWidth+margin)); + let dx=Math.floor(parent.offsetWidth/(minWidth)); //console.log("parent.offsetWidth="+parent.offsetWidth+" minWidth="+minWidth+" margin="+margin+" dx="+dx); let addW=0; - for(let i=0;i=parent.offsetWidth/(minWidth+margin+i)) + if(dx>=parent.offsetWidth/(minWidth+i)) { addW=i-1; - console.log("addW="+addW+" parent.offsetWidth/(minWidth+margin+i)="+(parent.offsetWidth/(minWidth+margin+i))); + //console.log("addW="+addW+" parent.offsetWidth/(minWidth+margin+i)="+(parent.offsetWidth/(minWidth+margin+i))); break; } } @@ -50,10 +50,10 @@ function resizeDivTile(parent,minWidth) } //console.log("minWidth+addW="+(minWidth+addW)); - //Центрирую, путем добавления пространства с права - parent.style.paddingLeft = Math.floor((parent.offsetWidth-(dx*(minWidth+margin+addW)))/2) + "px"; + //Центрирую, путем добавления пространства с лева + parent.style.paddingLeft = Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2) + "px"; - //console.log("parent.style.paddingLeft="+parent.style.paddingLeft+" calc="+(Math.floor((parent.offsetWidth-(dx*(minWidth+margin+addW)))/2))); + //console.log("parent.style.paddingLeft="+parent.style.paddingLeft+" calc="+(Math.floor((parent.offsetWidth-(dx*(minWidth+addW)))/2))); } //Получить уникальный идентификатор в рамках текущего NAMESPACE из глобальной переменной diff --git a/metadata/include/kcfinder/conf/config.php b/metadata/include/kcfinder/conf/config.php index 1975fb0..fc287c6 100644 --- a/metadata/include/kcfinder/conf/config.php +++ b/metadata/include/kcfinder/conf/config.php @@ -23,7 +23,7 @@ $_CONFIG = array( 'disabled' => false, 'uploadURL' => "upload", - 'uploadDir' => "O:/www/www.rigor.kz_old/shop/", + 'uploadDir' => "O:/www/www.pal.kz_old/shop/", 'theme' => "default", 'types' => array( diff --git a/metadata/include/tools.php b/metadata/include/tools.php index 8a6fba2..a4d901d 100644 --- a/metadata/include/tools.php +++ b/metadata/include/tools.php @@ -184,6 +184,42 @@ function imageResize ($src, $dest, $width, $height) imagedestroy($idest); return array($new_width, $new_height); } +//Залить недостающие края заданным цветом (использую для фото без прозрачности для удобства в HTML верстке) +function imageFillBorder($src, $dest, $width, $height){ + if (!file_exists($src)) return false; + if (($size=getimagesize($src))===false) return false; + $format=strtolower(substr($size['mime'],strpos($size['mime'],'/')+1)); + + // создание jpg изображения + if ($format=='jpeg') + { + if(!$oldImg = imagecreatefromjpeg($src)) + { + error_log('Error imagecreatefromjpeg '.$_SERVER['REQUEST_URI']); + } + }else if ($format=='gif') $oldImg = imagecreatefromgif($src); + else $oldImg = imagecreatefrompng($src); + + //Создаю новое изображение + $newImg=imagecreatetruecolor($width, $height); + $background_color = imagecolorallocate($newImg, 255, 255, 255); + imagefill($newImg, 0, 0, $background_color); + + //Ищем центр + $x = ($width - imagesx($oldImg)) / 2; + $y = ($height - imagesy($oldImg)) / 2; + + imagecopy($newImg, $oldImg, $x, $y, 0, 0, imagesx($oldImg), imagesy($oldImg)); + + //Пишем в файл + if ($format=='jpeg') imagejpeg($newImg,$dest); + else if ($format=='gif') imagegif($newImg,$dest); + else imagepng($newImg,$dest); + + // освобождаем память + imagedestroy($oldImg); + imagedestroy($newImg); +} //Водяной знак (размножит по поверхности одного изображения другое) function watermark($src,$stm) @@ -231,6 +267,8 @@ function watermark($src,$stm) imagedestroy($watermark); } + + //вернёт только цифры function getInt($str) {