]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
profile move to yii
authorAlexander Smirnov <fredeom@mail.ru>
Mon, 16 Sep 2024 13:24:48 +0000 (16:24 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Mon, 16 Sep 2024 13:24:48 +0000 (16:24 +0300)
erp24/controllers/ProfileController.php [new file with mode: 0644]
erp24/inc/uni.php
erp24/inc/uni2.php
erp24/modul/profile/index.php
erp24/views/profile/index.php [new file with mode: 0644]

diff --git a/erp24/controllers/ProfileController.php b/erp24/controllers/ProfileController.php
new file mode 100644 (file)
index 0000000..40ab455
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+namespace app\controllers;
+
+use yii\web\Controller;
+
+class ProfileController extends Controller
+{
+    public function actionIndex() { return $this->render('index'); }
+}
\ No newline at end of file
index 936e14118cfc8fcef0720fc245959585936979b6..3f08206441776232cdb0e0962327878d1e9bf9bc 100644 (file)
@@ -114,7 +114,7 @@ $arrs2[$pid]["arr"]=[$value=>$k[$name_txt]];
 
 $return_array=[];      
 $return_array=outSelect($val,$name_id,$name_txt,$category_arr,0, 0,"",$mass_start);            
-foreach($arrs2 as $ide => $vale) {
+foreach($arrs2 ?? [] as $ide => $vale) {
 //echo"<br> ++  $ide => $vale ";       
 $return_array[$ide]=$vale;     
 }              
index 26817c97206b44be39ab668d49dea27d237dfd06..5b6640a23f885282fe4dd8f8c17dfefafd42cf03 100644 (file)
@@ -335,7 +335,7 @@ foreach ($data as $row) {
 if(empty($row["val"]) and !empty($row["select_val"])) $row["val"]=$row["select_val"];  
 
 
-$image_config=json_decode($row["image_config"], true,JSON_UNESCAPED_UNICODE);     
+$image_config=json_decode($row["image_config"] ?? '{"ext" : ""}', true,JSON_UNESCAPED_UNICODE);
 $ext_1=explode(",",$image_config["ext"]);
 
        
@@ -1498,7 +1498,7 @@ elseif(isset($forma[$name]["value"])) echo $forma[$name]["value"];
        
 /*file*/               
 if($pole_arr["type"]=="image") { 
-$image_config=json_decode($forma[$name]["image_config"], true,JSON_UNESCAPED_UNICODE);     
+$image_config=json_decode($forma[$name]["image_config"] ?? '{"ext" : "", "param" : []}', true,JSON_UNESCAPED_UNICODE);
 $ext_1=$image_config["ext"];
 
 $sel="";
@@ -1598,7 +1598,7 @@ echo "<b>".$movie->getFrameWidth()." x ".$movie->getFrameHeight()."</b>";
        
 }
                                                                
-echo"><i>".$item[$name]."</i><br> $img </span>";       }
+echo"><i>".$item[$name]."</i><br> " . ($img ?? "") . " </span>";       }
 /*file*/               
        
        
@@ -2206,7 +2206,7 @@ echo'</div>';
 
 /*button*/             
 if($pole_arr["type"]=="button")  echo"<div class=\"col-12 col-12 text-center \">
-<button class=\"btn btn-lg btn-success ".$forma[$name]["class"]."\" type=\"submit\" name=$name value=\"".$forma[$name]["value"]."\" ".$forma[$name]["attr"].">
+<button class=\"btn btn-lg btn-success ".($forma[$name]["class"] ?? "")."\" type=\"submit\" name=$name value=\"".$forma[$name]["value"]."\" ".($forma[$name]["attr"] ?? "").">
 ".$forma[$name]["value"]."</button>
 </div>";
        
index 41f3ec557e186addce79ee52064e46a110d3d58b..a68b2a1a7f8effed538cd247258e34698c7e62ce 100644 (file)
@@ -1,15 +1,14 @@
-<?
-include_once ("startup.php");
-include_once("inc/db.php");
-include_once("inc/base_new.php");
-include_once("inc/design_new.php");
-include_once("inc/uni.php");
-include_once("inc/uni2.php");
-//include_once("inc/db_bz24.php");
+<?php
 
+include_once(dirname(__DIR__, 2) . "/startup.php");
+include_once(dirname(__DIR__, 2) . "/inc/db.php");
+include_once(dirname(__DIR__, 2) . "/inc/base_new.php");
+include_once(dirname(__DIR__, 2) . "/inc/design_new.php");
+include_once(dirname(__DIR__, 2) . "/inc/uni.php");
+include_once(dirname(__DIR__, 2) . "/inc/uni2.php");
 
 
-$store_arr=outSelectsql("0","city_store","id","","name","WHERE 1","",[0=>"-не выбрано-"]);
+$store_arr=outSelectsql("0","city_store","id","","name","WHERE 1 = 1","",[0=>"-не выбрано-"]);
 $astore_arr=outSelectsql("0","admin","id","","name","WHERE group_id='50'","",[0=>"-не выбрано-"]);
 $group_arr=outSelectsql("0","admin_group","id","","name","WHERE id='35' or id='30' or id='40' or id='21'  ","",[0=>"-не выбрано-"]);
 
@@ -64,4 +63,4 @@ construct_form_azea($forma,"admin","Профиль","3","","",$arrconf=array("WH
 
 
 
-include_once"templates/bottom.php";
+//include_once"templates/bottom.php";
diff --git a/erp24/views/profile/index.php b/erp24/views/profile/index.php
new file mode 100644 (file)
index 0000000..320cf29
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+
+chdir(__DIR__ . '/../../');
+
+include 'modul/profile/index.php';
\ No newline at end of file