Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Facebooklet</title>
- </head>
- <body>
- <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
- Username: <textbox id="Username" value=""/>
- Password: <textbox id="Password" value=""/>
- <button label="Login">
- <attribute name="onClick">
- profile.login(Username.text , Password.text);
- WebUtilities.showWebPage("main.zhtml");
- </attribute>
- </button>
- <p>
- <button label="Create New Profile">
- <attribute name="onClick">
- profile.createNewUser(Username.text , Password.text);
- profile.login(Username.text , Password.text);
- WebUtilities.showWebPage("main.zhtml");
- </attribute>
- </button>
- </p>
- </body>
- </html>
- ----------------------------------next page
- <html>
- <head>
- <title>edit</title>
- </head>
- <body>
- <style tipe="text/css">
- body { color : black; background-color : gray; }
- </style>
- <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
- <zscript>
- if (profile.getCurrentUser() == null)
- {
- WebUtilities.showWebPage("index.zhtml");
- }
- </zscript>
- <h1>FaceBooklet</h1>
- <panel title="Profile">
- <panelchildren>
- <h2>Profile Information</h2>
- <p>
- You can edit your profile on this page and view your current friends
- </p>
- <p>
- Name: <text value="@{profile.getCurrentUser().getName()}"/><br />
- Status: <textbox id="Status" value="@{profile.getCurrentUser().getStatus()}"/><br />
- Email: <textbox id="Email" value="@{profile.getCurrentUser().getEmail()}"/><br />
- Picture: <textbox id="PictureURL" value="@{profile.getCurrentUser().getPictureThumbUrl()}"/><br />
- </p>
- <p>
- <button label="Save">
- <attribute name="onClick">
- profile.saveProfile();
- </attribute>
- </button>
- </p>
- </panelchildren>
- </panel>
- <panel title="what you're looking up">
- <panelchildren>
- <img src="@{profile.getCurrentUser().getPictureThumbUrl()}" padding="10" width="175" height="175" alt="   User Profile Picture" align="left" />
- <br />
- <h3>
-       Name: <text value="@{profile.getCurrentUser().getName()}"/></h3>
-       Status: <text value="@{profile.getCurrentUser().getStatus()}"/><br />
-       Email: <text value="@{profile.getCurrentUser().getEmail()}"/><br />
- <listbox model="@{profile.getCurrentUser().getWall()}">
- <listitem each="@{wallpost}">
- <listcell>
- <text value="@{wallpost}"/>
- </listcell>
- </listitem>
- </listbox><br />
- <p>
- This is the list of your friends.
- <listbox model="@{profile.getCurrentUser().getFriends()}">
- <listitem each="@{friend}">
- <listcell>
- <text value="@{friend}"/>
- </listcell>
- </listitem>
- </listbox>
- </p>
- </panelchildren>
- </panel>
- <a href="lookup.zhtml">Look up profiles</a>
- <p>
- <button label="Logout">
- <attribute name="onClick">
- profile.logout();
- WebUtilities.showWebPage("main.zhtml");
- </attribute>
- </button>
- </p>
- </body>
- </html>
- ------------------------- next page
- <html>
- <head>
- <title>look up</title>
- </head>
- <body>
- <style tipe="text/css">
- body { color : black; background-color : gray; }
- </style>
- <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
- <zscript>
- if (profile.getCurrentUser() == null)
- {
- WebUtilities.showWebPage("index.zhtml");
- }
- </zscript>
- <h1>Look Up Friends</h1>
- <panel title="Look Up">
- <panelchildren>
- Here you can look up your friends.
- <p>
- Please Enter a Name: <textbox id="Name" value=""/>
- <br />
- <button label="Look Up">
- <attribute name="onClick">
- profile.loadProfile(Name.text);
- </attribute>
- </button>
- <button label="Add as friend">
- <attribute name="onClick">
- profile.getCurrentUser().addFriend(Name.text);
- </attribute>
- </button>
- </p>
- <p>
- <img src="@{profile.getProfile().getPictureThumbUrl()}" padding="10" width="175" height="175" alt="   User Profile Picture" align="left" />
- <br />
-       Name: <text value="@{profile.getProfile().getName()}"/><br />
-       Status: <text value="@{profile.getProfile().getStatus()}"/><br />
-       Email: <text value="@{profile.getProfile().getEmail()}"/>
- </p>
- <p>
- here are your friends!</p>
- <p>
- <listbox model="@{profile.getCurrentUser().getFriends()}" selectedItem="@{profile}">
- <attribute name="onSelected">
- profile.loadProfile(friend);
- </attribute>
- <listitem each="@{friend}">
- <listcell>
- <img src="@{profile.realImgUrl(friend)}"/> <text value="@{friend}"/>
- </listcell>
- </listitem>
- </listbox>
- </p>
- </panelchildren>
- </panel>
- <p>
- post on their wall!<textbox id="post" value=""/>
- <button label="Post">
- <attribute name="onClick">
- profile.getProfile().postToWall(profile.getCurrentUser(), post.text);
- </attribute>
- </button>
- </p>
- <p>
- <listbox model="@{profile.getProfile().getWall()}">
- <listitem each="@{wallpost}">
- <listcell>
- <text value="@{wallpost}"/>
- </listcell>
- </listitem>
- </listbox>
- </p>
- <a href="main.zhtml">go back to your profile</a>
- <p>
- <button label="Logout">
- <attribute name="onClick">
- profile.logout();
- WebUtilities.showWebPage("main.zhtml");
- </attribute>
- </button>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement