メむンコンテンツぞスキップ
芋出し画像

LINEでも䜿えるランチ予玄集蚈(webixラむブラリを䜿っお、簡単に゚ントリず集玄機胜をNo.036


    本蚘事は、機胜玹介埌に、䞀郚、機胜远加をしたした。No.037の蚘事も同時に閲芧ください。
    ランチ予玄集蚈機胜を改善スマホ機胜No.037Yamasan (note.com)
    webixラむブラリずPHPで䜜るWebアプリの事䟋玹介です。耇数人でランチをする堎合、事前にメニュヌを集玄しおお店に予玄したい堎合、幹事の人は、参加者に連絡をしながら、メニュヌを聞く必芁がありたすよね。党員が同じメニュヌなら参加人数だけいいのですが、個別のメニュヌ、サむドメニュヌ遞択、ドリンク遞択、倧盛り指定など、実際には割ず耇雑で倧倉ですよね。
    たた、途䞭で倉曎ずなる堎合も倚く、幹事は、気を付けお確認しないず、圓日、内容が違っお、お互い気分が悪いこずもありたすよね。
    そこで、今回は、LINEでランチを決めるWebサヌビスのURLを配垃し、各自で゚ントリした情報を幹事の人は、䞀芧衚で確認するようなサヌビスを玹介したす。ランチの登録は、LINEのメッセヌゞをそのたたクリックしおスマホで操䜜するむメヌゞです。
    倉曎したい堎合は、再床、登録しおもらえれば、䞊曞き曎新で倉曎できたす。
    LINEで通知したURLにアクセスするず以䞋のようなサむトにアクセスできたす。


    画像

    この画面では、参加者ずしお田䞭さんを遞択した状態の画面です。
    参加する人が、自分で名前を遞択しお゚ントリする方法です
    ※事前に参加予定の人がわかっおいる前提のアプリにしおいたす。
    欠垭の人は、欠垭をクリックしたすが、参加の人は、パスタかランチセットかピザをたずは、遞択し、その次の画面で詳现メニュヌを遞択する操䜜ずしたした。
    倧きくカテゎリを決め、個別のメニュヌでサむドメニュヌを遞択し、最埌にドリンクを遞択する操䜜です。
    以䞋、パスタセットをクリックした䟋です。

    画像

    パスタは6皮類から遞択したすが、倧盛りにしたい堎合には、チェックを付けおもらいたす。
    ミヌト゜ヌスを遞択し、ドリンクメニュヌに移動したずきは以䞋のような画面になりたす。

    画像

    ミヌト゜ヌスを倧盛りで指定しおいるこずを1行目に衚瀺し、
    ドリンクは、7個の䞭から遞択したす。
    ドリンクずしおコヌヒヌを遞択するず最終確認画面ずなり、
    セットメニュヌずドリンク及び、合蚈金額を確認し、登録ボタンをクリックしたす。もし、倉曎がある堎合は、戻るボタンで、ドリンク、セットメニュヌず最初に戻るこずができたす。

    画像

    登録した堎合は、登録したした。ずメッセヌゞがでるので、最埌に閉じるをクリックしお操䜜は完了です。
    ハンバヌグなどのセットメニュヌの堎合は、
    サむドメニュヌずしおラむスかパンを遞択する項目が远加され
    ダブルハンバヌグを遞択し、ドリンク遞択に移動したら

    画像

    ドリンク遞択画面のずき、1行目にパンが遞択されおいるこずを確認できたす。

    画像

    幹事の人は、パ゜コンなどで、参加者が遞択したランチの内容を確認できたす。

    画像

    党員の内容を確認埌に、EXCEL出力しおお店に連絡するなどすれば、ミスも少なく、効率的に䜜業ができたす。
    今回のサヌビス事䟋は、䞻に぀の機胜で実珟しおいたす。
    参加者がメニュヌを遞択する画面ずDBぞ登録するPHPサヌバアプリ
    幹事の人が、登録した情報を䞀芧で確認すう画面ず怜玢甚のサヌバアプリです。
    尚、デヌタを保存するためのテヌブルは必芁です。
    以䞋のURL操䜜で、実際に動䜜確認できたす。
    登録したメンバヌが7名なので、他の方が操䜜するず、䞊曞きで情報が倉曎されたすので、ご認識しお確認願いたす。
    ゚ントリ甚のURLは以䞋の通りです。スマホから操䜜可胜です。

    䞀芧衚で確認するURLは、以䞋のずおりです。

    本機胜を実珟するための゜ヌスコヌドですが、䞀郚の環境蚭定情報は公開しおいたせんので、DBアクセス郚分は、実装しおください。
    テヌブル定矩meeting_lunchesは、以䞋のように定矩したした。

    CREATE TABLE `meeting_lunches` (
      `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id:自動連番',
      `subject` varchar(255) NOT NULL DEFAULT '' COMMENT '䌚合名',
      `dateinfo` date DEFAULT NULL COMMENT '開催日',
      `username` varchar(255) NOT NULL DEFAULT '' COMMENT '参加者',
      `main_type` varchar(255) NOT NULL DEFAULT '' COMMENT 'メニュヌ皮別',
      `lunch_menu` varchar(255) NOT NULL DEFAULT '' COMMENT 'メニュヌ',
      `drink_menu` varchar(255) NOT NULL DEFAULT '' COMMENT '飲み物',
      `main_plice` int(11) NOT NULL DEFAULT 0 COMMENT 'メむン金額',
      `option1_plice` int(11) NOT NULL DEFAULT 0 COMMENT '远加金額',
      `total_plice` int(11) NOT NULL DEFAULT 0 COMMENT '合蚈金額',
      `created_userid` varchar(16) NOT NULL DEFAULT 'admin' COMMENT '䜜成ナヌザ',
      `updated_userid` varchar(16) NOT NULL DEFAULT 'admin' COMMENT '曎新ナヌザ',
      `created_on` datetime DEFAULT NULL COMMENT '䜜成日時',
      `updated_on` datetime DEFAULT NULL COMMENT '曎新日時',
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='䌚合ランチ';


    ランチ遞択甚の画面゜ヌスです。Javascript
    LU0020_lunch_entry.php

    <?php
    //https://sunsun.sakura.ne.jp/webix01/view/LU0020/LU0020_lunch_entry.php?userid=admin
    //======================================================================
    //File Name       : LU0020_lunch_entry.php
    //Encoding        : UTF-8
    //Creation Date   : 2024-06-10
    // 
    //Copyright © 2024 sunsunfarm. All rights reserved.
    // 
    //This source code or any portion thereof must not be  
    //reproduced or used in any manner whatsoever.
    //====================================================================== 
    
    	$TITLE_INFO ="ランチ遞択";
    	$VER_INFO ="V01L01";
            define('ROOT_PATH','/home/sunsun/www/webix01'); //゜ヌスを保存しおいるパス動䜜環境に応じお蚘述する必芁あり
            define('SUB_FOLDER','/webix01');    //サブフォルダを指定したURL 
    	$myfilename = basename(__FILE__);	//自分自身のファむル名取埗
    	$userid = '';
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	
    	if($_SERVER["REQUEST_METHOD"] != "GET"){
    	  //GET以倖ははじく
    	  error_log($logheader.'  REQUEST_METHOD no GET');
    	  header("HTTP/1.0 404 Not Found");
    	  return;
    	}
    	$error_flag = -1;
    	if(isset($_GET['userid'])){
    		$userid = $_GET['userid'];
    		$error_flag = 1;
    	}
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    
    	include('../../commonlib/svr_common_lib_v3.php');	//
    ?>
    <!DOCTYPE html>
    <html lang="ja">
    	<head>
    	<meta charset="UTF-8">
        <script src="/webix_GPL_1020/webix.js"></script>
    	<link href="/webix_GPL_1020/skins/compact.css?<?php echo date('Ymd-H'); ?>" rel="stylesheet" type="text/css">    
    	<link href="<?php  echo SUB_FOLDER; ?>/commonlib/webix_custom_css.css?<?php echo date('Ymd-H'); ?>" rel="stylesheet" type="text/css">    
    	<link rel="icon" href="<?php  echo SUB_FOLDER; ?>/image/webix_64.ico">
    	<script src="<?php  echo SUB_FOLDER; ?>/commonlib/object-assign.js"></script>
    	<script src="<?php  echo SUB_FOLDER; ?>/commonlib/moment-with-locales.js"></script>
        <script src="<?php  echo SUB_FOLDER; ?>/commonlib/webix_common_lib.js"></script>
    	<link rel="stylesheet" href="/webix_GPL_1020/css/materialdesignicons.min.css" type="text/css" charset="utf-8">
    <style>
        .mainLabel>.webix_el_box {
        		font-size: 16px;
        		font-weight:bold;
      	}
      	.subLabel>.webix_el_box {
        		font-size: 13px;
        		font-weight:bold;
        		background: #ffc0cb;
      	}
    
    	.bt_1 button.webix_button{
    			background: #396D9E;
    			color:#FFFFFF;
    			font-size: 18px;
    	}
      .bt_2 button.webix_button{
    			background: #008080;
    			color:#FFFFFF;
      			border:1px solid #008080;;
    			font-size: 18px;
    	}
    	.bt_3 button.webix_button{
    			background: #ff7f50;
      			border:1px solid #ff7f50;
    			color:#FFFFFF;
    			font-size: 18px;
    	}
     	.bt_4 button.webix_button{
    			background:  #808080;
      			border:1px solid #808080;
    			color:#FFFFFF;
    			font-size: 18px;
    	}
     	.bt_5 button.webix_button{
    			background:  #c71585;
      			border:1px solid #c71585;
    			color:#FFFFFF;
    			font-size: 18px;
    	}
       .bt_pasuta button.webix_button{
    			background: #396D9E;
    			color:#FFFFFF;
    			font-size: 12px;
    	}
       .bt_drink button.webix_button{
    			background: #6495ed;
    			color:#FFFFFF;
    			font-size: 12px;
    	}
       .bt_drinkh button.webix_button{
    			background: #800000;
    			color:#FFFFFF;
    			font-size: 12px;
    	}
     	.red .webix_el_box{
      		color: #ff0000;
    	}
    	.red  .webix_control.webix_el_text{
      		color: #ff0000;
    	}
      
     </style>	
    	<title><?php echo $TITLE_INFO.' ('.$VER_INFO.')' ?></title>
    	</head>
    <body>
    <script type="text/javascript" charset="utf-8">
    	webix.i18n.setLocale("ja-JP");
    <?php
    	include('../../commonlib/CM0030_sendprm_set_request.php');	//送信パラメヌタ準備関数(in:session_info,access_key out:send_prm)
    ?>
    
    webix.ui.fullScreen();
    
    var LU0020_meeting_date = "2024/06/30";
    var LU0020_meeting_subject ="ランチ䌚";
    var LU0020_meeting_starttime = "12:00";
    
    var LU0020_meeting_place = "むタリアンナポリ";
    
    var LU0020_username_array =[
        "",
    	"田侭",
    	"遠藀",
    	"朚村",
    	"山本",
    	"䌊藀",
    	"河合",
    	"山田",
    ];
    
    var LU0020_username = "";	//参加者
    var LU0020_main_type = "";	//皮別メニュヌ
    var LU0020_lunch_menu = "";	//メむンのセットメニュヌ
    var LU0020_drink_menu = "";
    var LU0020_back_view_id = "";
    
    var LU0020_main_plice = 0;
    var LU0020_option1_plice = 0;
    var LU0020_total_plice = 0;
    
    //ランチメニュヌを閉じお、ドリンクメニュヌを開く
    function set_lauch_and_next_drink(hide_view_id,show_view_id,lunch_menu){
      	LU0020_lunch_menu = lunch_menu+check_option1_chk();
      	$$("PastaView_menu_text").setValue(LU0020_lunch_menu);
        $$("DrinkView_menu_text").setValue(LU0020_lunch_menu);
     	$$("tabbar").showOption(show_view_id);
     	$$("tabbar").hideOption(hide_view_id);
        LU0020_back_view_id = hide_view_id;
    }
    function set_lauch_for_setmenu_and_next_drink(hide_view_id,show_view_id,lunch_menu){
      	LU0020_lunch_menu = lunch_menu+check_option2_chk();
      	$$("SetView_menu_text").setValue(LU0020_lunch_menu);
        $$("DrinkView_menu_text").setValue(LU0020_lunch_menu);
     	$$("tabbar").showOption(show_view_id);
     	$$("tabbar").hideOption(hide_view_id);
        LU0020_back_view_id = hide_view_id;
    }
    function set_lauch_for_piza_and_next_drink(hide_view_id,show_view_id,lunch_menu){
      	LU0020_lunch_menu = lunch_menu+check_option2_chk();
      	$$("PizaView_menu_text").setValue(LU0020_lunch_menu);
        $$("DrinkView_menu_text").setValue(LU0020_lunch_menu);
     	$$("tabbar").showOption(show_view_id);
     	$$("tabbar").hideOption(hide_view_id);
        LU0020_back_view_id = hide_view_id;
    }
    
    
    
    //ドリンクメニュヌを閉じお、確認メニュヌを開く
    function set_drink_and_next_last_check(drink_menu){
      	LU0020_drink_menu = drink_menu;
      	$$("DrinkView_drink_text").setValue(LU0020_drink_menu);
        $$("check_username").setValue(LU0020_username);
        $$("check_main_text").setValue(LU0020_lunch_menu);
        $$("check_drink_text").setValue(LU0020_drink_menu);
        
        LU0020_total_plice=Number(LU0020_main_plice)+Number(LU0020_option1_plice);
        $$("check_plice").setValue(LU0020_total_plice);
        $$("tabbar").showOption("CheckView");
        $$("tabbar").hideOption("DrinkView");
        
    
    }
    function check_username(){
    	LU0020_username = $$("username").getValue();
    	if(LU0020_username == ""){
    		webix.alert("参加者をクリック<br>しお遞択しおください。");
    		return false;
    	}
    	else{
    		return true;
    	}
    }
    function check_option1_chk(){
    	if($$("option1").getValue()){
    		LU0020_option1_plice = 250;
        	return "+倧盛り";
        }
        else{
    	LU0020_option1_plice = 0;
            return "";
        }
    }
    
    function check_option2_chk(){
    	if($$("option2").getValue() == 0){
    		LU0020_option1_plice = 0;
        	return "+ラむス";
        }
        else{
    		LU0020_option1_plice = 0;
            return "+パン";
        }
    }
    
    
    var LunchView_element =[
    	{ margin:5, cols:[
        	{ view:"label", label:"開催日:"+LU0020_meeting_date+" "+LU0020_meeting_starttime+" ",width:300,css:"mainLabel"},
         ]},
    	{ margin:5, cols:[
        	{ view:"label", label:"堎所"+LU0020_meeting_place  ,width:300,css:"mainLabel"},
         ]},
    	{ margin:5, cols:[
        	{ view:"select", label:"参加者",options:LU0020_username_array,id:"username",name:"username",value:"",css:"mainLabel",width:200,labelWidth:80},
         ]},
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"LunchView_menu_text",name:"LunchView_menu_text"},
        ]},
    	{ margin:5, cols:[
        	{ view:"label", label:"以䞋の぀の䞭から遞択しおください"  ,width:300,css:"mainLabel"},
         ]},
        { margin:5, cols:[
            { view:"button", label:"パスタセット" , type:"form" ,width:150,css:"bt_1",height:50,
            	click:function(){
                	LU0020_main_type = "パスタセット";
                	$$("LunchView_menu_text").setValue(LU0020_main_type);
                	$$("SetView_menu_text").setValue("");
                	$$("PizaView_menu_text").setValue("");
                	if(!check_username()) return;
                	$$("tabbar").showOption("PastaView");
                	$$("tabbar").hideOption("LunchView");
            	}
            },
         ]},
         { margin:5, cols:[
         	{view:"button", label:"ランチセット" , type:"form"  ,width:150,css:"bt_2",height:50,
            	click:function(){
                	LU0020_main_type = "ランチセット";
                	$$("LunchView_menu_text").setValue(LU0020_main_type);
                	$$("PastaView_menu_text").setValue("");
                	$$("PizaView_menu_text").setValue("");
                	if(!check_username()) return;
                	$$("tabbar").showOption("SetView");
                	$$("tabbar").hideOption("LunchView");
             	}
           	},
         ]},
         { margin:5, cols:[
         	{ view:"button", label:"ピザセット" , type:"form"  ,width:150,css:"bt_3",height:50,
            	click:function(){
                	LU0020_main_type = "ピザセット";
                	$$("LunchView_menu_text").setValue(LU0020_main_type);
                	$$("PastaView_menu_text").setValue("");
                	$$("SetView_menu_text").setValue("");
                	if(!check_username()) return;
                	$$("tabbar").showOption("PizaView");
                	$$("tabbar").hideOption("LunchView");
            	}
            },
         ]},
         { margin:5, cols:[
         	{ view:"button", label:"欠垭" , type:"form"  ,width:150,css:"bt_5",height:50,
            	click:function(){
                	LU0020_main_type = "欠垭";
                	$$("LunchView_menu_text").setValue(LU0020_main_type);
                	$$("PastaView_menu_text").setValue("");
                	$$("SetView_menu_text").setValue("");
                	$$("PizaView_menu_text").setValue("");
                	$$("DrinkView_menu_text").setValue("");
                	$$("DrinkView_drink_text").setValue("");
    
      	            LU0020_drink_menu = "";
                    $$("check_main_text").setValue("欠垭");
        			$$("check_drink_text").setValue("");
                	LU0020_main_plice = 0;
                	LU0020_option1_plice = 0;
                	LU0020_total_plice = 0;
                    $$("check_plice").setValue(LU0020_total_plice);
                	if(!check_username()) return;
                    $$("check_username").setValue(LU0020_username);
    
                	$$("tabbar").showOption("CheckView");
                	$$("tabbar").hideOption("LunchView");
            	}
            },
         ]},
         { margin:5, cols:[
         	{ view:"button", label:"閉じる" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
    				location.href = 'https://www.google.com/?hl=ja';
    			}
           	},
         	{ view:"button", label:"次ぞ" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
    				if(LU0020_main_type != ""){
    					if(LU0020_main_type == "パスタセット"){
              				$$("tabbar").showOption("PastaView");
    					}
              			else if(LU0020_main_type == "ランチセット"){
              				$("tabbar").showOption("SetView");
    					}
              			else if(LU0020_main_type == "ピザセット"){
              				$$("tabbar").showOption("PizaView");
    					}
              			else if(LU0020_main_type == "欠垭"){
              				$$("tabbar").showOption("CheckView");
    					}
              			$$("tabbar").hideOption("LunchView"); 
    				}
    				else{
              			webix.alert("セットの指定を先にしおください。");
              			return;
    				}
    			}
           	}
         ]}
    ];
    
    var PastaView_element =[
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"PastaView_menu_text",name:"PastaView_menu_text"},
        ]},
        { margin:5, cols:[
        	{ view:"label", label:"以䞋の぀の䞭から遞択しおください"  ,width:300,css:"mainLabel" },
        ]},
        { margin:5, cols:[
        	{ view:"checkbox",  id:"option1",  labelRight:"倧盛り垌望+250円ならチェックしおください",  value:0,css:"subLabel",labelWidth:20 }
        ]},
        { margin:5, cols:[
            { view:"button", label:"ベヌコンずモッチャレラのトマト゜ヌス" ,width:300,css:"bt_pasuta",height:50,
             	click:function(){
             		LU0020_main_plice = 1500;
    				set_lauch_and_next_drink("PastaView","DrinkView","ベヌコンずモッチャレラのトマト゜ヌス");
             	}
           	},
        ]},
        { margin:5, cols:[
        	{ view:"button", label:"バゞル゜ヌス" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1500;
               		set_lauch_and_next_drink("PastaView","DrinkView","バゞル゜ヌス");
             	}
           	},
         ]},
         { margin:5, cols:[
          	{ view:"button", label:"ナポリタン枩玉添え" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1460;
               		set_lauch_and_next_drink("PastaView","DrinkView","ナポリタン枩玉添え");
             	}
            },
          ]},
         { margin:5, cols:[
            { view:"button", label:"ミヌト゜ヌス" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1560;
               		set_lauch_and_next_drink("PastaView","DrinkView","ミヌト゜ヌス");
            	}
            },
         ]},
         { margin:5, cols:[
         	{ view:"button", label:"明倪子のクリヌム゜ヌス" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1500;
               		set_lauch_and_next_drink("PastaView","DrinkView","明倪子のクリヌム゜ヌス");
             	}
            },
         ]},
          { margin:5, cols:[
          	{ view:"button", label:"カルボナヌラ" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1600;
               		set_lauch_and_next_drink("PastaView","DrinkView","カルボナヌラ");
             	}
            },
          ]},
          { margin:5, cols:[
          	{ view:"button", label:"戻る" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
              		$$("tabbar").showOption("LunchView");
              		$$("tabbar").hideOption("PastaView");
             	}
           	},
          	{ view:"button", label:"次ぞ" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
            		if(LU0020_lunch_menu != ""){
              			$$("tabbar").showOption("DrinkView");
              			$$("tabbar").hideOption("PastaView");
              		}
              		else{
              			webix.alert("パスタの指定を先にしおください。");
              			return;
              		}
             	}
           	},
          ]}
    ];
    
    var SetView_element =[
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"SetView_menu_text",name:"SetView_menu_text"},
        ]},
        { margin:5, cols:[
        	{ view:"label", label:"以䞋の぀の䞭から遞択しおください"  ,width:300,css:"mainLabel" },
        ]},
        { margin:5, cols:[
        	{ view:"label", label:"パンかラむスも遞択しおください"  ,width:300,css:"red" },
        ]},
        { margin:5, cols:[
        	 { view: "switch", onLabel: "パン", offLabel:"ラむス", value: 0  ,id:"option2" , label:"パン/ラむス",labelWidth:80},
        ]},
        { margin:5, cols:[
            { view:"button", label:"ハンバヌグおろし和颚゜ヌス" ,width:300,css:"bt_pasuta",height:50,
             	click:function(){
             		LU0020_main_plice = 1450;
    				set_lauch_for_setmenu_and_next_drink("SetView","DrinkView","ハンバヌグおろし和颚゜ヌス");
             	}
           	},       
        ]},
        { margin:5, cols:[
        	{ view:"button", label:"ダブルハンバヌグ" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1600;
               		set_lauch_for_setmenu_and_next_drink("SetView","DrinkView","ダブルハンバヌグ");
             	}
           	},
         ]},
         { margin:5, cols:[
         	{ view:"button", label:"網焌きサヌロむンステヌキ90g" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 2000;
               		set_lauch_for_setmenu_and_next_drink("SetView","DrinkView","サヌロむンステヌキ90g");
             	}
            },
         ]},
         { margin:5, cols:[
            { view:"button", label:"牛肉の赀ワむン煮蟌み" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1800;
               		set_lauch_for_setmenu_and_next_drink("SetView","DrinkView","牛肉の赀ワむン煮蟌み");
             	}
            },
          ]},
    
          { margin:5, cols:[
          	{ view:"button", label:"戻る" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
              		$$("tabbar").showOption("LunchView");
              		$$("tabbar").hideOption("SetView");
             	}
           	},
           	{ view:"button", label:"次ぞ" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
            		if(LU0020_lunch_menu != ""){
              			$$("tabbar").showOption("DrinkView");
              			$$("tabbar").hideOption("SetView");
              		}
              		else{
              			webix.alert("セットの指定を先にしおください。");
              			return;
              		}
             	}
           	},
         ]}
    ];
    
    
    var PizaView_element =[
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"PizaView_menu_text",name:"PizaView_menu_text"},
        ]},
        { margin:5, cols:[
        	{ view:"label", label:"以䞋の぀の䞭から遞択しおください"  ,width:300,css:"mainLabel" },
        ]},
        { margin:5, cols:[
            { view:"button", label:"マルゲリヌタ" ,width:300,css:"bt_pasuta",height:50,
             	click:function(){
             		LU0020_main_plice = 1300;
    				LU0020_option1_plice = 0;
    				set_lauch_for_piza_and_next_drink("PizaView","DrinkView","マルゲリヌタ");
             	}
           	},       
        ]},
        { margin:5, cols:[
        	{ view:"button", label:"3皮チヌズピザ" , type:"form"  ,width:300,css:"bt_pasuta",height:50,
            	click:function(){
             		LU0020_main_plice = 1300;
    				LU0020_option1_plice = 0;
    				set_lauch_for_piza_and_next_drink("PizaView","DrinkView","3皮チヌズピザ");
             	}
           	},
         ]},
          { margin:5, cols:[
          	{ view:"button", label:"戻る" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
              		$$("tabbar").showOption("LunchView");
              		$$("tabbar").hideOption("PizaView");
             	}
           	},
           	{ view:"button", label:"次ぞ" ,width:150,height:50,css:"bt_4",height:50,
            	click:function(){
            		if(LU0020_lunch_menu != ""){
              			$$("tabbar").showOption("DrinkView");
              			$$("tabbar").hideOption("PizaView");
              		}
              		else{
              			webix.alert("ピザの指定を先にしおください。");
              			return;
              		}
             	}
           	},
          ]}
    ];
    
    var DrinkView_element =[
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"DrinkView_menu_text",name:"DrinkView_menu_text"},
        ]},
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"DrinkView_drink_text",name:"DrinkView_drink_text"},
        ]},
        { margin:5, cols:[
        	{ view:"label", label:"以䞋の個の䞭から遞択しおください"  ,width:300,css:"mainLabel" },
        ]},
        { margin:5, cols:[
        	{ view:"button", label:"コヌヒ" , type:"form"  ,width:300,css:"bt_drinkh",height:30,
           		click:function(){
           			set_drink_and_next_last_check("コヌヒ");
           		}
         	},
        ]},
        { margin:5, cols:[
        	{ view:"button", label:"アむスコヌヒ" , type:"form"  ,width:300,css:"bt_drink",height:30,
           		click:function(){
           			set_drink_and_next_last_check("アむスコヌヒ");
           		}
         	},
        ]},
        { margin:5, cols:[
          	{ view:"button", label:"玅茶" , type:"form"  ,width:300,css:"bt_drinkh",height:30,
           		click:function(){
           			set_drink_and_next_last_check("玅茶");
          		}
          	},
        ]},
        { margin:5, cols:[
          	{ view:"button", label:"アむスティヌ" , type:"form"  ,width:300,css:"bt_drink",height:30,
           		click:function(){
           			set_drink_and_next_last_check("アむスティヌ");
           		}
          	},
        ]},
        { margin:5, cols:[
          	{ view:"button", label:"オレンゞゞュヌス" , type:"form"  ,width:300,css:"bt_drink",height:30,
           		click:function(){
           			set_drink_and_next_last_check("オレンゞゞュヌス");
           		}
          	},
        ]},
        { margin:5, cols:[
          	{ view:"button", label:"りヌロン茶" , type:"form"  ,width:300,css:"bt_drink",height:30,
           		click:function(){
           			set_drink_and_next_last_check("りヌロン茶");
           		}
          	},
        ]},
        { margin:5, cols:[
          	{ view:"button", label:"スヌプ" , type:"form"  ,width:300,css:"bt_drinkh",height:30,
           		click:function(){
           			set_drink_and_next_last_check("スヌプ");
           		}
          	},
        ]},
        { margin:5, cols:[
         	{ view:"button", label:"戻る" ,width:150,height:30,css:"bt_4",height:30,
           		click:function(){
              		$$("tabbar").showOption( LU0020_back_view_id);
              		$$("tabbar").hideOption("DrinkView");          
           		}
         	},
         	{ view:"button", label:"次ぞ" ,width:150,height:30,css:"bt_4",height:30,
           		click:function(){
           			if(LU0020_drink_menu != ""){
              			$$("tabbar").showOption("CheckView");
              			$$("tabbar").hideOption("DrinkView");
              		}
              		else{
              			webix.alert("ドリンクの指定を先にしおください。");
              			return;
              		}
           		}
         	},
        ]},
    ];
         
    var CheckView_element =[
    	{ margin:5, cols:[
        	{ view:"label", label:"開催日:"+LU0020_meeting_date+" "+LU0020_meeting_starttime+" 堎所"+LU0020_meeting_place  ,width:300,css:"mainLabel"},
         ]},
    	{ margin:5, cols:[
        	{ view:"select", label:"参加者",options:LU0020_username_array,id:"username",name:"username",value:"",css:"mainLabel",width:200,labelWidth:80,id:"check_username",readonly:true},
        ]},
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"check_main_text",name:"check_main_text"},
        ]},
    	{ cols:[
            { view:"label",value:"" ,width:350,id:"check_drink_text",name:"check_drink_text"},
        ]},
    	{ cols:[
            { view:"text",label:"金額皎蟌)",value:"" ,width:200,labelWidth:80,id:"check_plice",name:"check_plice",inputAlign:"right"},
        ]},
        { margin:5, cols:[
         	{ view:"button", label:"登録" ,width:100,height:30,css:"webix_danger",height:30,
           		click:function(){
     				var formData = new FormData();
    				var access_key = Get_AccessKey();
    				formData.append("userid","admin");
    				formData.append("job_info","LU0020");
    				formData.append("dateinfo",moment(LU0020_meeting_date).format("YYYY-MM-DD"));
    				formData.append("subject",LU0020_meeting_subject);
    				formData.append("username",LU0020_username);
    				formData.append("main_type",LU0020_main_type);
    				formData.append("lunch_menu",LU0020_lunch_menu);
    				formData.append("drink_menu",LU0020_drink_menu);
    				formData.append("main_plice",LU0020_main_plice);
    				formData.append("option1_plice",LU0020_option1_plice);
    				formData.append("total_plice",LU0020_total_plice);
      				var xhr =webix.ajax().sync().post("<?php  echo SUB_FOLDER; ?>/rest_api/LU0020/LU0021_meeting_entry_action.php",formData);
    				var resp =  JSON.parse(xhr.responseText);
    				if(resp.resp =="ok"){
    					webix.message({type:"success",text:"登録したした。"});
    				}
    				else{
    					webix.message({type:"error",text:"登録凊理で゚ラヌ発生 error code ="+resp.error_code});
    				}
           		}
         	},
         	{ view:"button", label:"戻る" ,width:100,height:30,css:"bt_4",height:30,
           		click:function(){
           			if($$("check_main_text").getValue() == "欠垭"){
           				//欠垭
              			$$("tabbar").showOption("LunchView");
              			$$("tabbar").hideOption("CheckView");
           			}
           			else{
              			$$("tabbar").showOption("DrinkView");
              			$$("tabbar").hideOption("CheckView");
              		}         
           		}
         	},
         	{ view:"button", label:"閉じる" ,width:100,height:30,css:"webix_primary",height:30,
           		click:function(){
    			    webix.confirm({
      			    	title:"確認",
      			    	ok:"はい", 
       			    	cancel:"いいえ",
     			    	text: "登録操䜜をしおいないず、<br>遞択した情報は、<br>保存されたせん。<br>操䜜を䞭断しお画面を<br>閉じたすか",
     			    })
    			    .then(function(result){
    			    	location.href = 'https://www.google.com/?hl=ja';
    			    })
    			    .fail(function(){
    			    	webix.message({type:"debug",text:"操䜜を継続できたす。"});
    			    });
           		}
         	},
    
        ]},
    
    
    
    ];
    
    
    webix.ui({
      type:"space", width:380,
      rows:[
        { type:"clean",
          rows:[
            {
              borderless:true, view:"tabbar", id:"tabbar", value:"LunchView", multiview:true, options:[
                { value:'ランチ', id:'LunchView'},
                { value:'パスタ', id:'PastaView'},
                { value:'セット', id:'SetView'},
                { value:'ピザ'  , id:'PizaView'},
                { value:'ドリンク', id:'DrinkView'},
                { value:'確認'  , id:'CheckView'},
              ]
            },
            {cells:[
                {id:"LunchView",
                 view:"form",
         		 width:380,
         		 height:600,
                 elements:LunchView_element
                },
    			{id:"PastaView",  
      	 		view:"form",
         		width:380,
         		height:700,
      	 		elements:PastaView_element
      	 		},
      	 		{id:"SetView",  
      	 		view:"form",
         		width:380,
         		height:600,
      	 		elements:SetView_element
      	 		},
      	 		{id:"PizaView",  
      	 		view:"form",
         		width:380,
         		height:600,
      	 		elements:PizaView_element
      	 		},
      	 		{id:"DrinkView",  
      	 		view:"form",
         		width:380,
         		height:700,
      	 		elements:DrinkView_element
      	 		},
      	 		{id:"CheckView",  
      	 		view:"form",
         		width:380,
         		height:600,
      	 		elements:CheckView_element
      	 		},
            ]
            }
         ]
        }
      ]
    });
    
    //$$("PastaView").bind($$("MainView"));
    
    
     $$("tabbar").hideOption("PastaView");
     $$("tabbar").hideOption("SetView");
     $$("tabbar").hideOption("PizaView");
     $$("tabbar").hideOption("DrinkView");
     $$("tabbar").hideOption("CheckView");
     
    </script>
    </body>
    </html>

    これを受信するサヌバ偎のPHP゜ヌスです。
    LU0021_meeting_entry_action.php

     <?php
    //======================================================================
    //File Name       : LU0021_meeting_entry_action.php
    //Encoding        : UTF-8
    //Creation Date   : 2024-06-10
    // 
    //Copyright © 2024 sunsunfarm. All rights reserved.
    // 
    //This source code or any portion thereof must not be  
    //reproduced or used in any manner whatsoever.
    //====================================================================== 
    	//header("Content-Type: text/javascript; charset=utf-8");
    	$myfilename = basename(__FILE__);	//自分自身のファむル名取埗
    	$userid = '';
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	if($_SERVER["REQUEST_METHOD"] != "POST"){
    	  //POST以倖ははじく
    	  error_log($logheader.' not POST method');
    	  header("HTTP/1.0 404 Not Found");
    	  return;
    	}
    	if(isset($_POST['userid'])){
    		$userid = $_POST['userid'];
    		$error_flag = 1;
    	}
    	else{
    		$error_flag = -1;
    	  	error_log($logheader.'  userid not found');
    	  	header("HTTP/1.0 404 Not Found");
    	  	exit;
    	}
    	$job_info = "LU0021";
    	if(isset($_POST['job_info'])){
    		$job_info = $_POST['job_info'];
    	}
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	include('../../commonlib/svr_common_lib_v3.php');	//
    	$config_obj = get_config_obj();
    
    
    	$dateinfo = "";
    	if(isset($_POST['dateinfo'])){
    		$dateinfo = $_POST['dateinfo'];
    	}
    	$subject = "";
    	if(isset($_POST['subject'])){
    		$subject = $_POST['subject'];
    	}
    	$username = "";
    	if(isset($_POST['username'])){
    		$username = $_POST['username'];
    	}
    	$main_type = "";
    	if(isset($_POST['main_type'])){
    		$main_type = $_POST['main_type'];
    	}
    	$lunch_menu = "";
    	if(isset($_POST['lunch_menu'])){
    		$lunch_menu = $_POST['lunch_menu'];
    	}
    	$drink_menu = "";
    	if(isset($_POST['drink_menu'])){
    		$drink_menu = $_POST['drink_menu'];
    	}
    	$main_plice = 0;
    	if(isset($_POST['main_plice'])){
    		$main_plice = intval($_POST['main_plice']);
    	}
    	$option1_plice = 0;
    	if(isset($_POST['option1_plice'])){
    		$option1_plice = intval($_POST['option1_plice']);
    	}
    	$total_plice = 0;
    	if(isset($_POST['total_plice'])){
    		$total_plice = intval($_POST['total_plice']);
    	}
    	error_log($logheader.'username='.$username.' date='.$dateinfo.' lunch_menu='.$lunch_menu.' total_plice='.$total_plice);
        //
        //メむンルヌチン
        //
       	$config_obj = get_config_obj();
        //デヌタベヌス接続するMariaDB)
        $dbh = mysql_connect($config_obj,'app01','webix_webix');
        if($dbh == false){
        	//゚ラヌ応答
        	$resp = "ng";
    		$error_code = -2;
     		$json_data = json_encode(compact("resp","error_code"),JSON_UNESCAPED_UNICODE);
    		echo $json_data;
    		exit;
        }
      	try{
      		$select_sql = "select id,dateinfo,subject,username,main_type,lunch_menu,drink_menu,total_plice from meeting_lunches where username = ? and dateinfo = ?";
      		$select_stmt =  $dbh->prepare($select_sql);
      		
      		
    		$insert_sql1 =  "INSERT INTO meeting_lunches(dateinfo,subject,username,main_type,lunch_menu,drink_menu,main_plice,option1_plice,";
    		$insert_sql1 =  $insert_sql1." total_plice,created_userid,updated_userid,created_on,updated_on)  VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)";
    		$insert_stmt =  $dbh->prepare($insert_sql1);
    		
    		$update_sql1 = "UPDATE meeting_lunches SET main_type= ?,lunch_menu= ?,drink_menu= ?,main_plice= ?,option1_plice= ?, ";
    		$update_sql1 = $update_sql1."total_plice= ?,updated_userid= ?,updated_on= ? where id =?";
    		$update_stmt =  $dbh->prepare($update_sql1);
    		
    		// 静的プレヌスホルダを指定
       		$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
       		// ゚ラヌ発生時に䟋倖を投げる
       		$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        	//トランザクション凊理を開始
        	$dbh->beginTransaction();
    		$resp = "ok";
    		$error_code = 0;
    		$updated_on = date("Y-m-d H:i:s");
    		
    		
    		$select_stmt->bindValue(1,$username);
    		$select_stmt->bindValue(2,$dateinfo);
    		$select_stmt->execute();
    		$select_var_lists =  $select_stmt->fetchAll(PDO::FETCH_ASSOC); //フィヌルド名だけで保存index情報なし
    		$select_count = count($select_var_lists);
    		error_log($logheader.' select_count ='.$select_count);
    		if($select_count == 0){
    			//insert
    		    $insert_stmt->bindValue(1,$dateinfo);
    		    $insert_stmt->bindValue(2,$subject);
    		    $insert_stmt->bindValue(3,$username);
    		    $insert_stmt->bindValue(4,$main_type);
    		    $insert_stmt->bindValue(5,$lunch_menu);
    		    $insert_stmt->bindValue(6,$drink_menu);
    		    $insert_stmt->bindValue(7,$main_plice,PDO::PARAM_INT);
    		    $insert_stmt->bindValue(8,$option1_plice,PDO::PARAM_INT);
    		    $insert_stmt->bindValue(9,$total_plice,PDO::PARAM_INT);
    		    $insert_stmt->bindValue(10,$userid);	//created_userid
    		    $insert_stmt->bindValue(11,$userid);	//updated_userid
    		    $insert_stmt->bindValue(12,$updated_on);
    		    $insert_stmt->bindValue(13,$updated_on);
    		    $insert_stmt->execute();
    			error_log($logheader.' insert  username='.$username);
    			error_log($logheader.' insert  date='.$dateinfo);
    			error_log($logheader.' insert  lunch_menu='.$lunch_menu);
    			error_log($logheader.' insert  total_plice='.$total_plice);
    						
    		}
    		else{
    			$id_info = intval($select_var_lists[0]["id"]);
    			error_log($logheader.' update id='.$id_info );
    			//update
    			$update_stmt->bindValue(1,$main_type);
    			$update_stmt->bindValue(2,$lunch_menu);
    			$update_stmt->bindValue(3,$drink_menu);
    			$update_stmt->bindValue(4,intval($main_plice),PDO::PARAM_INT);
    			$update_stmt->bindValue(5,intval($option1_plice),PDO::PARAM_INT);
    			$update_stmt->bindValue(6,intval($total_plice),PDO::PARAM_INT);
    			$update_stmt->bindValue(7,$userid);	//updated_userid
    			$update_stmt->bindValue(8,$updated_on);
    			$update_stmt->bindValue(9,$id_info,PDO::PARAM_INT);
    			$update_stmt->execute();
    			error_log($logheader.' update id='.$id_info.' username='.$username.' subject='.$subject.' dateinfo='.$dateinfo.' lunch_menu='.$lunch_menu.' main_plice='.$main_plice );
    		}
    		$dbh->commit();
    		error_log($logheader.' commit');
      	} catch(PDOException $e){
    		error_log($logheader.'  捕捉した䟋倖: '.$e->getMessage());	//䟋倖発生時の凊理゚ラヌ情報をログに栌玍しお゚ラヌ応答
    		$resp = "ng";
    		$error_code = -1;
      	}
    	$dbh = null;
    	$select_stmt = null;
    	$json_data = json_encode(compact("resp","error_code"),JSON_UNESCAPED_UNICODE);
    	error_log($logheader.' $json_data ='.$json_data);
    	echo $json_data;
    ?>

    続いお、登録したランチメニュヌ情報を䞀芧衚瀺するJavascript゜ヌスです。
    LU0010_meeting_lists.php

    <?php
    	//https://sunsun.sakura.ne.jp/webix01/view/LU0010/LU0010_meeting_lists.php?userid=admin
    //======================================================================
    //File Name       : LU0010_meeting_lists.php
    //Encoding        : UTF-8
    //Creation Date   : 2024-06-10
    // 
    //Copyright © 2024 sunsunfarm. All rights reserved.
    // 
    //This source code or any portion thereof must not be  
    //reproduced or used in any manner whatsoever.
    //====================================================================== 
    	$TITLE_INFO ="ランチ出垭䞀芧";
    	$VER_INFO ="V01L01";
        define('ROOT_PATH','/home/sunsun/www/webix01'); //゜ヌスを保存しおいるパス動䜜環境に応じお蚘述する必芁あり
        define('SUB_FOLDER','/webix01');    //サブフォルダを指定したURL 
    	$myfilename = basename(__FILE__);	//自分自身のファむル名取埗
    	$userid = '';
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	
    	if($_SERVER["REQUEST_METHOD"] != "GET"){
    	  //GET以倖ははじく
    	  error_log($logheader.'  REQUEST_METHOD no GET');
    	  header("HTTP/1.0 404 Not Found");
    	  return;
    	}
    	$userclient = 'pc';
    	if(isset($_GET['userid'])){
    		$userid = $_GET['userid'];
    		$error_flag = 1;
    	}
    	else{
    		$error_flag = -1;
    	  	error_log($logheader.'  userid not found');
    	  	header("HTTP/1.0 404 Not Found");
    	  	exit;
    	}
    	if(isset($_GET['userclient'])){
    		$userclient = $_GET['userclient'];
    	}
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    
    	include('../../commonlib/svr_common_lib_v3.php');	//
    	$config_obj = get_config_obj();
    	//アクセスキヌチェック
    
    ?>
    <!DOCTYPE html>
    <html lang="ja">
    	<head>
    	<meta charset="UTF-8">
    	
        <script src="/webix_GPL_1020/webix.js"></script>
    	<link href="/webix_GPL_1020/skins/compact.css?<?php echo date('Ymd-H'); ?>" rel="stylesheet" type="text/css">    
    	<link href="<?php  echo SUB_FOLDER; ?>/commonlib/webix_custom_css.css?<?php echo date('Ymd-H'); ?>" rel="stylesheet" type="text/css">    
    	<link rel="icon" href="<?php  echo SUB_FOLDER; ?>/image/webix_64.ico">
    	<script src="<?php  echo SUB_FOLDER; ?>/commonlib/object-assign.js"></script>
    	<script src="<?php  echo SUB_FOLDER; ?>/commonlib/moment-with-locales.js"></script>
        <script src="<?php  echo SUB_FOLDER; ?>/commonlib/webix_common_lib.js"></script>
    	<link rel="stylesheet" href="/webix_GPL_1020/css/materialdesignicons.min.css" type="text/css" charset="utf-8">
    	<style>
        .mainLabel>.webix_el_box {
        		font-size: 20px;
        		font-weight:bold;
      	}
    	.teal_bgcolor .webix_button {
     		background-color: #008080;
      		color: #FFFFFF;
    	}
    	.red .webix_label_right{
      		color: #FF0000;
    	}
    	</style>
    	
    	<title><?php echo $TITLE_INFO.' ('.$VER_INFO.')' ?></title>
    	</head>
    <body>
    	<script type="text/javascript" charset="utf-8">
    	webix.i18n.setLocale("ja-JP");
    	
    <?php
    	include_once('../../commonlib/CM0010_goto_menu_action.php');
    	include_once('../../commonlib/CM0030_sendprm_set_request.php');
    	include_once('../../commonlib/CM0050_open_menucmd.php');
    	include_once('../../commonlib/CM0060_common_validate_check.php');
    	include_once('../../commonlib/CM0080_screen_control.php');
    
    ?>
    
    var LU0010_meeting_date = "2024/06/30";
    var LU0010_meeting_subject ="ランチ䌚";
    var LU0010_meeting_starttime = "12:00";
    
    var LU0010_meeting_place = "むタリアンナポリ";
    
    
    	var my_local_session = {};
    	my_local_session.userid = "admin";
    	
    	
    	function LU0010_disp_meeting_lists(){
    		$$("LU0010_table").clearAll(); //䞀芧を䞀床クリア
            var access_key = Get_AccessKey();
            var send_prm = Prepare_send_prm(my_local_session,access_key);
    		send_prm.dateinfo = moment(LU0010_meeting_date).format("YYYY-MM-DD");
    		send_prm.subject = LU0010_meeting_subject;
    		var xhr =webix.ajax().sync().get("<?php  echo SUB_FOLDER; ?>/rest_api/LU0010/LU0012_meeting_db_selectlists.php",send_prm);
    		var resp =  JSON.parse(xhr.responseText);
    		if(resp.resp =="ok"){
    		   	$$("LU0010_table").parse(resp.var_lists); 
    		}
    		else{
    		   	webix.message({type:"error",text:"怜玢で゚ラヌが発生したした。code="+resp.error_code});
    		}
    	}
    
    
    	//怜玢条件フォヌム構成リスト
    	var form_collection = [
    		{ margin:5, cols:[
        		{ view:"label", label:"開催日:"+LU0010_meeting_date+" "+LU0010_meeting_starttime+" 堎所"+LU0010_meeting_place  ,width:550,css:"mainLabel"},
        		]
            },
    		{ margin:5, cols:[
                { view:"button",id:"search_btn", value: "怜玢", align:"center", width: 100,
    				click:function(){
    					LU0010_disp_meeting_lists();
          			}
        		},
                { view: "button",id:"excel_btn",name:"excel_btn", label: "EXCEL出力", width: 100, css:"teal_bgcolor",
                	click:function(){
                		webix.toExcel($$("LU0010_table"),{filename:"ランチ泚文䞀芧_"+moment().format("YYYYMMDD")});
                	}
                },
                { view:"button", value: "閉じる", align:"center", width: 100, css:"menu",
    				click:function(){
    					location.href = 'https://www.google.com/?hl=ja';
          			}
        		},
            	]
            }
    		];
    	//画面描画
    	webix.ui({
    		view:"form", 
       		resize:true,
        	elements:[
    			{rows:[
    				{ view:"form",	//䜜成される゚レメントの皮類
      					id: "form1",	//参照甚のID情報
      					elements:form_collection ,	//フォヌムの構成芁玠を指定
            		}
            		]
                },
                {
                	id: "LU0010_table",
                    type:"clean",
                    view:"datatable",
     			    columnWidth:400,
                    columns:[
    					{ id:"id"         ,header:"No",width:80 ,  sort:"int", css:{"text-align":"right"},hidden:true}, 
                    	{ id:"username"   ,header:["名前"       , { content:"textFilter"}  ] ,width:120, sort:"string"},
                    	{ id:"main_type"  ,header:["皮類"       , { content:"selectFilter"}] ,width:150, sort:"string"},
                    	{ id:"lunch_menu" ,header:["メニュヌ"   , { content:"selectFilter"}] ,width:400, sort:"string"},
                    	{ id:"drink_menu" ,header:["ドリンク"   , { content:"selectFilter"}] ,width:150, sort:"string"},
                    	{ id:"total_plice",header:["倀段"       , { content:"selectFilter"}] ,width:120, sort:"int", css:{"text-align":"right"}},
                    ],
                    select:"row",
           			datatype:"json",
     				data:[]
     			}
            	]
            }
        );
    	LU0010_disp_meeting_lists();
    	</script>
    </body>
    </html>
    

    䞀芧衚を衚瀺するためのサヌバ偎DB怜玢甚゜ヌスです。
    LU0012_meeting_db_selectlists.php

     <?php
    //======================================================================
    //File Name       : LU0012_meeting_db_selectlists.php
    //Encoding        : UTF-8
    //Creation Date   : 2024-06-10
    // 
    //Copyright © 2024 sunsunfarm. All rights reserved.
    // 
    //This source code or any portion thereof must not be  
    //reproduced or used in any manner whatsoever.
    //====================================================================== 
    	//header("Content-Type: text/javascript; charset=utf-8");
    	$myfilename = basename(__FILE__);	//自分自身のファむル名取埗
    	$userid = '';
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	if($_SERVER["REQUEST_METHOD"] != "GET"){
    	  //GET以倖ははじく
    	  error_log($logheader.' not GET method');
    	  header("HTTP/1.0 404 Not Found");
    	  return;
    	}
    	$userid = "admin";
    	if(isset($_GET['userid'])){
    		$userid = $_GET['userid'];
    		$error_flag = 1;
    	}
    	$job_info = "LU0012";
    	if(isset($_GET['job_info'])){
    		$job_info = $_GET['job_info'];
    	}
    	$logheader = 'userid='.$userid.', '.$myfilename.':';//ログ出力時のヘッダヌ情報自ファむル名,ログむンIDを付䞎
    	include('../../commonlib/svr_common_lib_v3.php');	//
    	$config_obj = get_config_obj();
    
    
    	$dateinfo = "";
    	if(isset($_GET['dateinfo'])){
    		$dateinfo = $_GET['dateinfo'];
    	}
    	$subject = "";
    	if(isset($_GET['subject'])){
    		$subject = $_GET['subject'];
    	}
    	error_log($logheader.'select date='.$dateinfo.' subject='.$subject);
        //
        //メむンルヌチン
        //
       	$config_obj = get_config_obj();
        //デヌタベヌス接続するMariaDB)
        $dbh = mysql_connect($config_obj,'app01','webix_webix');
        if($dbh == false){
        	//゚ラヌ応答
        	$resp = "ng";
    		$error_code = -2;
     		$json_data = json_encode(compact("resp","error_code"),JSON_UNESCAPED_UNICODE);
    		echo $json_data;
    		exit;
        }
      	try{
      		$select_sql = "select id,dateinfo,subject,username,main_type,lunch_menu,drink_menu,total_plice from meeting_lunches where subject = ? and dateinfo = ? order by username";
      		$select_stmt =  $dbh->prepare($select_sql);
      		error_log($logheader.'$select_sql='.$select_sql);
      		
    		$resp = "ok";
    		$error_code = 0;
    		
    		$select_stmt->bindValue(1,$subject);
    		$select_stmt->bindValue(2,$dateinfo);
    		$select_stmt->execute();
    		$var_lists =  $select_stmt->fetchAll(PDO::FETCH_ASSOC); //フィヌルド名だけで保存index情報なし
      	} catch(PDOException $e){
    		error_log($logheader.'  捕捉した䟋倖: '.$e->getMessage());	//䟋倖発生時の凊理゚ラヌ情報をログに栌玍しお゚ラヌ応答
    		$var_lists = array();
    		$resp = "ng";
    		$error_code = -1;
      	}
    	$dbh = null;
    	$select_stmt = null;
    	$json_data = json_encode(compact("resp","error_code","var_lists"),JSON_UNESCAPED_UNICODE);
    	error_log($logheader.' $json_data ='.$json_data);
    	echo $json_data;
    ?>

    メニュヌの皮類が倚くなるず、゜ヌスも長くなるので、党䜓の構造を少し、怜蚎する必芁がありたすが、十分、実甚的に䜿えたす。
    ぜひ、掻甚しおみおください。LINE機胜の投祚でも同じようなこずが可胜ですが、今回の機胜は、制限がなく、URLを発信すれば、LINE䞊でいろいろなサヌビスを提䟛できたす。

     
     

    Yamasan

     
     
    システム開発、ハヌドりェア蚭蚈、゜フトりェア開発、システム構築、プロゞェクトマネヌゞャヌ実斜。珟圚は、個人事業䞻ずしお業務系アプリを䞭心に情報発信䞭 coconalaで泚文も受付䞭 Webixラむブラリを䜿った業務アプリを玹介したす。 広島県圚䜏

    あなたぞのおすすめ