0

私は現在カレンダーシステムを開発しており、いくつかのイベント/日付をWebカレンダーに直接送信してicsファイルに送信したいと思っています。

Dhtmlxschedulerはまさに私が必要としているものです。mysqlへのデータの書き込みは機能し、データの読み取りも行いますが、icsおよびicsからは読み取りません。

これが私がこれまでに持っているコードです:

<script src="../../codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
<script src="../../codebase/ext/dhtmlxscheduler_serialize.js" type="text/javascript" charset="utf-8"></script>
<script src="../../codebase/ext/dhtmlxscheduler_multisource.js" type="text/javascript" charset="utf-8"></script>

<link rel="stylesheet" href="../../codebase/dhtmlxscheduler.css" type="text/css" title="no title" charset="utf-8">




<script type="text/javascript" charset="utf-8">
    function init() {

        scheduler.config.xml_date="%Y-%m-%d %H:%i";
        scheduler.config.prevent_cache = true;

        scheduler.config.lightbox.sections=[    
            {name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
            {name:"location", height:43, type:"textarea", map_to:"details" },
            {name:"time", height:72, type:"time", map_to:"auto"}
        ]

        scheduler.config.first_hour=4;
        scheduler.locale.labels.section_location="Location";
        //scheduler.config.details_on_create=true;
        //scheduler.config.details_on_dblclick=true;



        scheduler.init('scheduler',new Date(2009,10,1),"month");
        scheduler.setLoadMode("month");
        scheduler.load(["php/events.php","/ics/schedule.ics"]);

        var dp = new dataProcessor("php/events.php");
        dp.init(scheduler);



    }


    function show(){
        alert(scheduler.toICal());
    }

    function save(){
        var form = document.forms[0];
        form.elements.data.value = scheduler.toICal();
        form.submit();
    }
    function get(){
        var form = document.forms[1];
        form.elements.data.value = scheduler.toICal();
        form.submit();
    }

    </script>

    </head>

<body onload="init();">

    <form action="../04_export/php/ical_writer.php" method="post" target="hidden_frame" accept-charset="utf-8">
        <input type="hidden" name="data" value="" id="data">
    </form>

あなたが私を助けてくれたらいいのにと思います。ありがとう。投稿が少し奇妙に見えることをお詫び申し上げます。コード付きの私の最初の投稿です。

4

1 に答える 1

0

上記のコードは 2 つのソースから同時にデータをロードします。これにより、1 つのソースが xml ベースで、もう 1 つが ical データであるため、問題が発生します。

scheduler.load(["php/events.php","/ics/schedule.ics"]);

個別のデータ読み込みに置き換える必要があります

scheduler.load("php/events.php", "xml")
scheduler.load("ics/schedule.ics", "ical")
于 2012-12-05T12:06:56.583 に答える