Thursday, July 29th 2010, 1:34pm UTC+2

You are not logged in.

  • Login
  • Register

[PHP & Flash] [XML] Kalender Extension

undefined

Super Moderator

Posts: 4,248

Location: Germany

1

Wednesday, May 5th 2004, 4:47pm

[XML] Kalender Extension

Ein Klasse die es euch erlaubt einen Kalender wie hier im Portal zu sehen nach Flash zu portieren. :)
Der Kalender wird komplett in PHP generiert und benötigt keine Zusätzliche Server extensions wie z.B. Calendar ;)
Die Ausgabe erfolgt in XML oder XHTML strict und läst sich sehr einfach einlesen. Vielleicht findet ja noch jemand Zeit und stellt die Flash Schnittstelle zu verfügung ;) Die Klasse gibt es in PHP5 und PHP4 im angehangenen tar File
Beispiel Ausgabe:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" ?>
<month>
	<week>
		....
		<days dayinit="15" daystr="Samstag" full="Samstag Mai 2004"/>
		<days dayinit="16" daystr="Sonntag" full="Sonntag Mai 2004"/>
	</week>
	<week>
		<days dayinit="17" daystr="Montag" full="Montag Mai 2004"/>
		<days dayinit="18" daystr="Dienstag" full="Dienstag Mai 2004"/>
		<days dayinit="19" daystr="Mittwoch" full="Mittwoch Mai 2004"/>
		<days dayinit="20" daystr="Donnerstag" full="Donnerstag Mai 2004"/>
		<days dayinit="21" daystr="Freitag" full="Freitag Mai 2004"/>
		<days dayinit="22" daystr="Samstag" full="Samstag Mai 2004"/>
		<days dayinit="23" daystr="Sonntag" full="Sonntag Mai 2004"/>
	</week>
	<week>
		<days dayinit="24" daystr="Montag" full="Montag Mai 2004"/>
		<days dayinit="25" daystr="Dienstag" full="Dienstag Mai 2004"/>
		<days dayinit="26" daystr="Mittwoch" full="Mittwoch Mai 2004"/>
		<days dayinit="27" daystr="Donnerstag" full="Donnerstag Mai 2004"/>
		<days dayinit="28" daystr="Freitag" full="Freitag Mai 2004"/>.....
</month>


Viel Spass damit ;)
Ming
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

undefined

Super Moderator

Posts: 4,248

Location: Germany

2

Tuesday, May 11th 2004, 11:33am

Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

undefined

Super Moderator

Posts: 4,248

Location: Germany

3

Wednesday, May 12th 2004, 7:14pm

Hier das XMLConnect Script passend zum PHP. Den Download findet ihr im Link des letzten Beitrages.

ActionScript-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
 * Die Variable _global.SRCURL sitz auf Bild 1
 * @see MovieClip "quanta"
 * @set MovieClips (box_[1-x]) 
 */
this.xmlloader = function() {
    if (_global.SRCURL != null && _global.SRCURL.indexOf("http://") != -1) {
        _root.Monat;
        _root.xml_obj = new XML();
        _root.xml_obj.ignoreWhite true;
        _root.xml_obj.request _global.SendRequest;
        _root.xml_obj.load(_global.SRCURL_root.xml_obj);
        _root.xml_obj.onLoad = function(insert) {
            if (arguments != true) {
                this.onLoad = {};
            }
            // Nehme Monatzeile
            _root.Monat _root.xml_obj.childNodes[0].firstChild.attributes.monat;
            // Erstelle Wochentage
            var tagnamen _root.xml_obj.firstChild.childNodes[1].childNodes;
            for (var 0i<tagnamen.lengthi++) {
                tagnamen[i].attributes.name;
            }
            // Durchlaufe WochenTage
            var weekdays _root.xml_obj.firstChild.childNodes[2].childNodes;
            var sum int(0);
            var xw int(10);
            var yh int(10);
            var int(28);
            //
            for (var 0i<weekdays.lengthi++) {
                var woche weekdays[i].childNodes;
                for (var 0j<woche.lengthj++) {
                    // MovieCLip Ausgabe
                    _root.kalender.attachMovie("quanta""box_"+sum120+sum);
                    _root.kalender["box_"+sum]._x xw;
                    _root.kalender["box_"+sum]._y yh;
                    // Attributes init (Tages Zahl)
                    if (woche[j].attributes.init != null) {
                        if (woche[j].attributes.init != 0) {
                            _root.kalender["box_"+sum].ziffer_txt.text woche[j].attributes.init;
                            _root.kalender["box_"+sum].ziffer_txt.tabIndex woche[j].attributes.init;
                        }
                    }
                    // Tag hervorheben
                    if (woche[j].attributes.aktiv != null) {
                        if (woche[j].attributes.aktiv != 0) {
                            _root.kalender["box_"+sum].ziffer_txt.textColor "0xFF0099";
                        } else {
                            _root.kalender["box_"+sum].ziffer_txt.textColor "0x00000";
                        }
                    }
                    // Attributes name (Name des Tages)
                    if (woche[j].attributes.name != null) {
                        woche[j].attributes.name;
                    }
                    // Attributes full (volles Datum)
                    if (woche[j].attributes.full != null) {
                        woche[j].attributes.full;
                    }
                    // Counter für Element Anzahl
                    _root.kalender["box_"+sum].ziffer_txt.autoSize "center";
                    _root.kalender["box_"+sum].ziffer_txt.condenseWhite true;
                    _root.kalender["box_"+sum].ziffer_txt.embedFonts false;
                    _root.kalender["box_"+sum].ziffer_txt.backgroundColor "0x000000";
                    //
                    sum++;
                    // Zeilen Umbruch
                    xw = (xw != null) ? xw+20 _root.kalender._x;
                    if ((sum%7) == (null || 0)) {
                        yh = (yh+20);
                        xw 10;
                    }
                }
            }
        };
    } else {
        trace("Das ist keine reguläre URL angabe\n XML.onLoad benötigt dies damit das PHP-Script vom Server geparst werden kann!");    
    }
};
_root.onLoad xmlloader();
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

undefined

Super Moderator

Posts: 4,248

Location: Germany

4

Thursday, May 13th 2004, 6:27pm

Die Flash6 Version ist jetzt fertig und kann hier getestet und gedownloaded werden.
Link zur Flash Demo und Download
have fun :D
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

kelor

Super Moderator

Posts: 3,408

Location: formel1-stadt hockenheim

5

Thursday, May 13th 2004, 6:57pm

very nice undefined ming... 8) :]


pretty good...


greetz

kelor
[ActionScript-Trainer] [Referent ActionScript] [Buchautor]
[Online/Offline Flash_Applications & Developer]
  • Go to the top of the page

undefined

Super Moderator

Posts: 4,248

Location: Germany

6

Thursday, May 13th 2004, 8:49pm

Ist aber noch buggy, ist dir aufgefallen - die unterste reie wird nicht neu eingelesen oder entfernt. Mal sehen wie ich das hinbekomme.
Hab da noch irgendwo einen Rechenfehler.

ActionScript-Quelltext

1

				
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

Posts: 1,620

Location: NRW

7

Thursday, May 13th 2004, 8:51pm

Wollt ich grad noch posten... Aber ansonsten - beide daumen hoch ;)
Fakten, unterfüttert mit Emotionen ergibt Kernkompetenz!
klicken Sie hier!
  • Go to the top of the page

undefined

Super Moderator

Posts: 4,248

Location: Germany

8

Thursday, May 13th 2004, 9:34pm

Fehler behoben :)
Undefined Behavior (undefiniertes Verhalten) bedeutet meistens etwas ungültiges.
PHP Katepart - Speichenrechner - .htpasswd - RPM XDG Tool - Kcmnvview - QTidy
  • Go to the top of the page

Posts: 1,620

Location: NRW

9

Thursday, May 13th 2004, 9:49pm

sauber. ;)
Ich kann immer nur wieder staunen. ihr müsst echt langeweile haben ... ;) :D
Fakten, unterfüttert mit Emotionen ergibt Kernkompetenz!
klicken Sie hier!
  • Go to the top of the page

kelor

Super Moderator

Posts: 3,408

Location: formel1-stadt hockenheim

10

Wednesday, April 13th 2005, 12:48pm

mal des ding besser bewerten...;):D

iss schließlich ne gute sache...


greetz

kelor
[ActionScript-Trainer] [Referent ActionScript] [Buchautor]
[Online/Offline Flash_Applications & Developer]
  • Go to the top of the page