Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Facebooklet</title>
  4. </head>
  5. <body>
  6.  
  7.  
  8.  
  9. <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
  10.  
  11.  
  12. Username: <textbox id="Username" value=""/>
  13. Password: <textbox id="Password" value=""/>
  14. <button label="Login">
  15. <attribute name="onClick">
  16. profile.login(Username.text , Password.text);
  17. WebUtilities.showWebPage("main.zhtml");
  18. </attribute>
  19. </button>
  20.  
  21. <p>
  22. <button label="Create New Profile">
  23. <attribute name="onClick">
  24. profile.createNewUser(Username.text , Password.text);
  25. profile.login(Username.text , Password.text);
  26. WebUtilities.showWebPage("main.zhtml");
  27. </attribute>
  28. </button>
  29. </p>
  30.  
  31.  
  32.  
  33.  
  34.  
  35. </body>
  36. </html>
  37.  
  38.  
  39.  
  40.  
  41. ----------------------------------next page
  42.  
  43.  
  44. <html>
  45. <head>
  46. <title>edit</title>
  47. </head>
  48. <body>
  49.  
  50. <style tipe="text/css">
  51. body { color : black; background-color : gray; }
  52. </style>
  53.  
  54. <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
  55.  
  56.  
  57. <zscript>
  58. if (profile.getCurrentUser() == null)
  59. {
  60. WebUtilities.showWebPage("index.zhtml");
  61. }
  62. </zscript>
  63. <h1>FaceBooklet</h1>
  64.  
  65. <panel title="Profile">
  66. <panelchildren>
  67. <h2>Profile Information</h2>
  68. <p>
  69. You can edit your profile on this page and view your current friends
  70. </p>
  71.  
  72. <p>
  73. Name: <text value="@{profile.getCurrentUser().getName()}"/><br />
  74. Status: <textbox id="Status" value="@{profile.getCurrentUser().getStatus()}"/><br />
  75. Email: <textbox id="Email" value="@{profile.getCurrentUser().getEmail()}"/><br />
  76. Picture: <textbox id="PictureURL" value="@{profile.getCurrentUser().getPictureThumbUrl()}"/><br />
  77. </p>
  78. <p>
  79. <button label="Save">
  80. <attribute name="onClick">
  81. profile.saveProfile();
  82. </attribute>
  83. </button>
  84. </p>
  85. </panelchildren>
  86. </panel>
  87.  
  88. <panel title="what you're looking up">
  89. <panelchildren>
  90. <img src="@{profile.getCurrentUser().getPictureThumbUrl()}" padding="10" width="175" height="175" alt="&#160;&#160;&#160;User Profile Picture" align="left" />
  91. <br />
  92.  
  93.  
  94. <h3>
  95. &#160;&#160;&#160;&#160;&#160;&#160;Name: <text value="@{profile.getCurrentUser().getName()}"/></h3>
  96. &#160;&#160;&#160;&#160;&#160;&#160;Status: <text value="@{profile.getCurrentUser().getStatus()}"/><br />
  97. &#160;&#160;&#160;&#160;&#160;&#160;Email: <text value="@{profile.getCurrentUser().getEmail()}"/><br />
  98. <listbox model="@{profile.getCurrentUser().getWall()}">
  99. <listitem each="@{wallpost}">
  100. <listcell>
  101. <text value="@{wallpost}"/>
  102. </listcell>
  103. </listitem>
  104. </listbox><br />
  105.  
  106.  
  107.  
  108.  
  109. <p>
  110. This is the list of your friends.
  111. <listbox model="@{profile.getCurrentUser().getFriends()}">
  112. <listitem each="@{friend}">
  113. <listcell>
  114. <text value="@{friend}"/>
  115. </listcell>
  116. </listitem>
  117. </listbox>
  118. </p>
  119. </panelchildren>
  120. </panel>
  121.  
  122. <a href="lookup.zhtml">Look up profiles</a>
  123. <p>
  124. <button label="Logout">
  125. <attribute name="onClick">
  126. profile.logout();
  127. WebUtilities.showWebPage("main.zhtml");
  128. </attribute>
  129. </button>
  130. </p>
  131.  
  132.  
  133. </body>
  134. </html>
  135.  
  136.  
  137. ------------------------- next page
  138.  
  139.  
  140. <html>
  141. <head>
  142. <title>look up</title>
  143. </head>
  144. <body>
  145. <style tipe="text/css">
  146. body { color : black; background-color : gray; }
  147. </style>
  148. <variable type="FaceBooklet" name="profile" value="new FaceBooklet()"/>
  149. <zscript>
  150. if (profile.getCurrentUser() == null)
  151. {
  152. WebUtilities.showWebPage("index.zhtml");
  153. }
  154. </zscript>
  155.  
  156. <h1>Look Up Friends</h1>
  157. <panel title="Look Up">
  158. <panelchildren>
  159. Here you can look up your friends.
  160. <p>
  161. Please Enter a Name: <textbox id="Name" value=""/>
  162. <br />
  163. <button label="Look Up">
  164. <attribute name="onClick">
  165. profile.loadProfile(Name.text);
  166. </attribute>
  167. </button>
  168. <button label="Add as friend">
  169. <attribute name="onClick">
  170. profile.getCurrentUser().addFriend(Name.text);
  171. </attribute>
  172. </button>
  173. </p>
  174. <p>
  175. <img src="@{profile.getProfile().getPictureThumbUrl()}" padding="10" width="175" height="175" alt="&#160;&#160;&#160;User Profile Picture" align="left" />
  176. <br />
  177. &#160;&#160;&#160;&#160;&#160;&#160;Name: <text value="@{profile.getProfile().getName()}"/><br />
  178. &#160;&#160;&#160;&#160;&#160;&#160;Status: <text value="@{profile.getProfile().getStatus()}"/><br />
  179. &#160;&#160;&#160;&#160;&#160;&#160;Email: <text value="@{profile.getProfile().getEmail()}"/>
  180. </p>
  181. <p>
  182. here are your friends!</p>
  183. <p>
  184. <listbox model="@{profile.getCurrentUser().getFriends()}" selectedItem="@{profile}">
  185. <attribute name="onSelected">
  186. profile.loadProfile(friend);
  187. </attribute>
  188. <listitem each="@{friend}">
  189. <listcell>
  190. <img src="@{profile.realImgUrl(friend)}"/> <text value="@{friend}"/>
  191. </listcell>
  192. </listitem>
  193. </listbox>
  194.  
  195. </p>
  196. </panelchildren>
  197. </panel>
  198. <p>
  199.  
  200.  
  201. post on their wall!<textbox id="post" value=""/>
  202. <button label="Post">
  203. <attribute name="onClick">
  204. profile.getProfile().postToWall(profile.getCurrentUser(), post.text);
  205. </attribute>
  206. </button>
  207. </p>
  208. <p>
  209. <listbox model="@{profile.getProfile().getWall()}">
  210. <listitem each="@{wallpost}">
  211. <listcell>
  212. <text value="@{wallpost}"/>
  213. </listcell>
  214. </listitem>
  215. </listbox>
  216. </p>
  217.  
  218. <a href="main.zhtml">go back to your profile</a>
  219. <p>
  220. <button label="Logout">
  221. <attribute name="onClick">
  222. profile.logout();
  223. WebUtilities.showWebPage("main.zhtml");
  224. </attribute>
  225. </button>
  226. </p>
  227. </body>
  228. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement