PageRenderTime 48ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/ajax/output_fns.php

https://github.com/kanro001/xnote
PHP | 819 lines | 805 code | 14 blank | 0 comment | 21 complexity | 0a1ecbe0bc2fd912dbec4a85fcb1f597 MD5 | raw file
  1. <?php
  2. function do_html_header_register($title){
  3. if(!isset($title)){
  4. $title="Ourbond";
  5. }
  6. ?>
  7. <html>
  8. <head>
  9. <title><?php echo $title;?></title>
  10. <link id="css" href="css/html.css" rel="stylesheet" type="text/css"/>
  11. <script type="text/javascript" src="js/register.js"></script>
  12. </head>
  13. <body>
  14. <div id="header" class="header">
  15. <table>
  16. <tr>
  17. <td align="left">
  18. <img src="img/logo.jpg" alt="OurBond Logo"/>
  19. </td>
  20. <td>
  21. <ul>
  22. <li>Share your mind with your friends.</li>
  23. <li>See what other users discuss.</li>
  24. <li>Find your "Bond" and post in it.</li>
  25. </ul>
  26. </td>
  27. </tr>
  28. </table>
  29. </div>
  30. <div id="main">
  31. <?php
  32. }
  33. function do_html_header($title){
  34. if(!isset($title)){
  35. $title="Ourbond";
  36. }
  37. ?>
  38. <html>
  39. <head>
  40. <title><?php echo $title;?></title>
  41. <link id="css" href="css/html.css" rel="stylesheet" type="text/css"/>
  42. <script type="text/javascript" src="js/member.js" ></script>
  43. <script type="text/javascript" src="js/member_bonds.js"></script>
  44. <script type="text/javascript" src="js/more_stories.js"></script>
  45. <script type="text/javascript" src="js/group.js"></script>
  46. <script type="text/javascript" src="js/changePassword.js"></script>
  47. </head>
  48. <body onload="move()">
  49. <div id="header" class="header">
  50. <table>
  51. <tr>
  52. <td align="left">
  53. <img src="img/logo.jpg" alt="OurBond Logo"/>
  54. </td>
  55. <td>
  56. <ul>
  57. <li>Share your mind with your friends.</li>
  58. <li>See what other users discuss.</li>
  59. <li>Find your "Bond" and post in it.</li>
  60. </ul>
  61. </td>
  62. </tr>
  63. </table>
  64. </div>
  65. <div id="main">
  66. <?php
  67. }
  68. function do_html_header_login_form($title){
  69. if(!isset($title)){
  70. $title="Ourbond";
  71. }
  72. ?>
  73. <html>
  74. <head>
  75. <title><?php echo $title;?></title>
  76. <link id="css" href="css/html.css" rel="stylesheet" type="text/css">
  77. <script type="text/javascript" src="js/register.js"></script>
  78. </script>
  79. </head>
  80. <body>
  81. <div id="login_header" class="header">
  82. <form method="post" action="member.php" name="login_header">
  83. <table>
  84. <tr>
  85. <td rowspan="3" valign="middle">
  86. <a href="../wangwen/main.php"><img src="img/logo.jpg" alt="OurBond Logo"/></a>
  87. </td>
  88. <td width = "600"></td>
  89. <td align="left">
  90. Email:
  91. </td>
  92. <td align="left">
  93. Password:
  94. </td>
  95. <td></td>
  96. </tr>
  97. <tr>
  98. <td width = "600"></td>
  99. <td><input type="text" name="login_email"/></td>
  100. <td><input type="password" name="passwd"/></td>
  101. <td><input type="submit" value="Log in"/></td>
  102. </tr>
  103. <tr>
  104. <td width = "500"></td>
  105. <td><input type="checkbox" name="logsetting"/>Keep me log in</td>
  106. <td><a href="forgot_form.php">Forgot your password?</a></td>
  107. <td></td>
  108. </tr>
  109. </table>
  110. </form>
  111. </div>
  112. <div id ="main">
  113. <?php
  114. }
  115. function do_login_form($error){
  116. if(!isset($error)){
  117. $error="It's free and always be.";
  118. }
  119. ?>
  120. <div id="login_form" class="form">
  121. <form method="post" action="member.php" name="login_form">
  122. <table>
  123. <tr>
  124. <td rowspan="2" width="500">
  125. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  126. </td>
  127. <td rowspan="3" width="50"></td>
  128. <td colspan="2" width="400">
  129. <h2>Sign In:</h2>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td colspan="2">
  134. <h3><?php echo $error;?></h3>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td>
  139. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  140. </td>
  141. <td>
  142. <table>
  143. <tr>
  144. <td align="right" width="150">
  145. Email:
  146. </td>
  147. <td width="250"><input type="text" name="email" size="30" maxlength="100"/></td>
  148. </tr>
  149. <tr>
  150. <td align="right">
  151. Password:
  152. </td>
  153. <td><input type="password" name="passwd" size="30" maxlength="100"/></td>
  154. </tr>
  155. <tr>
  156. <td></td>
  157. <td><input type="checkbox" name="logsetting"/>Keep me log in</td>
  158. </tr>
  159. <tr>
  160. <td></td>
  161. <td><input type="submit" value="Log in"/>
  162. or <a href="register_form.php">Sign up for OurBond</a>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td></td>
  167. <td><a href="forgot_form.php">Forgot your password?</a></td>
  168. </tr>
  169. </table>
  170. </td>
  171. </tr>
  172. </table>
  173. </form>
  174. </div>
  175. <?php
  176. }
  177. function do_forgot_form($error){
  178. if(!isset($error)){
  179. $error="It's free and always be.";
  180. }
  181. ?>
  182. <div id="login_form" class="form">
  183. <form method="post" action="forgot_password.php" name="forgotpassword_form">
  184. <table>
  185. <tr>
  186. <td rowspan="2" width="500">
  187. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  188. </td>
  189. <td rowspan="3" width="50"></td>
  190. <td colspan="2" width="400">
  191. <h2>Retrieve Password:</h2>
  192. </td>
  193. </tr>
  194. <tr>
  195. <td colspan="2">
  196. <h3><?php echo $error;?></h3>
  197. </td>
  198. </tr>
  199. <tr>
  200. <td>
  201. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  202. </td>
  203. <td>
  204. <table>
  205. <tr>
  206. <td align="right" width="150">
  207. Email:
  208. </td>
  209. <td width="250"><input type="text" name="user_email" size="30" maxlength="100"/></td>
  210. </tr>
  211. <tr>
  212. <td align="right" width="150">
  213. First name:
  214. </td>
  215. <td width="250"><input type="text" name="firstname" size="30" maxlength="100"/></td>
  216. </tr>
  217. <tr>
  218. <td align="right" width="150">
  219. Last name:
  220. </td>
  221. <td width="250"><input type="text" name="lastname" size="30" maxlength="100"/></td>
  222. </tr>
  223. <tr>
  224. <td></td>
  225. <td><input type="submit" value="Submit"/>
  226. or <a href="register_form.php">Sign up for OurBond</a>
  227. </td>
  228. </tr>
  229. </table>
  230. </td>
  231. </tr>
  232. </table>
  233. </form>
  234. </div>
  235. <?php
  236. }
  237. function do_changepassword_form($error, $name, $user_id){
  238. if(!isset($error)){
  239. $error="It's free and always be.";
  240. }
  241. if(!isset($name)){
  242. $name="Impossible";
  243. }
  244. if(!isset($user_id)){
  245. $user_id=7;
  246. }
  247. ?>
  248. <div id="changepassword_form" class="form">
  249. <form method="post" action="change_password.php" name="changepassword_form">
  250. <table>
  251. <tr>
  252. <td rowspan="2" width="500">
  253. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  254. </td>
  255. <td rowspan="3" width="50"></td>
  256. <td colspan="2" width="400">
  257. <h2>Change Password:</h2>
  258. </td>
  259. </tr>
  260. <tr>
  261. <td colspan="2">
  262. <h3><?php echo $error;?></h3>
  263. </td>
  264. </tr>
  265. <tr>
  266. <td>
  267. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  268. </td>
  269. <td>
  270. <table>
  271. <tr>
  272. <td align="right" width="150">
  273. Name:
  274. </td>
  275. <td><input type="text" size="30" disabled value="<?php echo $name?>"/></td>
  276. </tr>
  277. <tr>
  278. <td align="right" width="150">
  279. </td>
  280. <td><input type="text" size="30" name="user_id" hidden="hidden" value="<?php echo $user_id?>"/></td>
  281. </tr>
  282. <tr>
  283. <td align="right" width="150">
  284. Old Password:
  285. </td>
  286. <td><input type="password" name="oldpassword" size="30" maxlength="100"/></td>
  287. </tr>
  288. <tr>
  289. <td align="right" width="250">
  290. New Password:
  291. </td>
  292. <td><input type="password" name="newpassword" size="30" maxlength="100"/></td>
  293. </tr>
  294. <tr>
  295. <td align="right">
  296. Re-enter password:
  297. </td>
  298. <td><input type="password" name="re-password" size="30" maxlength="100"/></td>
  299. </tr>
  300. <tr>
  301. <td></td>
  302. <td><input type="submit" value="Submit"/>
  303. or <a href="register_form.php">Sign up for OurBond</a>
  304. </td>
  305. </tr>
  306. <tr>
  307. <td></td>
  308. <td><a href="forgot_form.php">Forgot your password?</a></td>
  309. </tr>
  310. </table>
  311. </td>
  312. </tr>
  313. </table>
  314. </form>
  315. </div>
  316. <?php
  317. }
  318. function do_register_form($error){
  319. if(!isset($error)){
  320. $error="It's free and always be.";
  321. }
  322. ?>
  323. <div id="register_form" class="form">
  324. <form method="post" action="register_new.php" name="register_form">
  325. <table>
  326. <tr>
  327. <td rowspan="2" width="500">
  328. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  329. </td>
  330. <td rowspan="12" width="50"></td>
  331. <td colspan="2" width="400">
  332. <h2>Sign Up</h2>
  333. </td>
  334. </tr>
  335. <tr>
  336. <td colspan="2">
  337. <h3><?php echo $error;?></h3>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td rowspan="10">
  342. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  343. </td>
  344. <td align="right" width="150">
  345. <label for="firstname">First Name:</label>
  346. </td>
  347. <td width="250">
  348. <input id="firstname" type="text" name="firstname" size="25" maxlength="100"/>
  349. <span id="firstnameSpan"></span>
  350. </td>
  351. </tr>
  352. <tr>
  353. <td align="right">
  354. <label for="lastname">Last Name:</label>
  355. </td>
  356. <td>
  357. <input type="text" id="lastname" name="lastname" size="25" maxlength="100"/>
  358. <span id="lastnameSpan"></span>
  359. </td>
  360. </tr>
  361. <tr>
  362. <td align="right">
  363. <label for="email">Your Email:</label>
  364. </td>
  365. <td>
  366. <input type="text" id="email" name="email" size="25" maxlength="100"/>
  367. <span id="emailSpan"></span>
  368. </td>
  369. </tr>
  370. <tr>
  371. <td align="right">
  372. <label for="re_email">Re-enter Email:</label>
  373. </td>
  374. <td>
  375. <input type="text" id="re_email" name="re_email" size="25" maxlength="100"/>
  376. <span id="re_emailSpan"></span>
  377. </td>
  378. </tr>
  379. <tr>
  380. <td align="right">
  381. <label for="password">New Password:</label>
  382. </td>
  383. <td>
  384. <input type="password" id="password" name="password" size="25" maxlength="100"/>
  385. <span id="passwordSpan"></span>
  386. </td>
  387. </tr>
  388. <tr>
  389. <td align="right">
  390. <label for="re_password">Re-enter Password:</label>
  391. </td>
  392. <td>
  393. <input type="password" id="re_password" name="re_password" size="25" maxlength="100"/>
  394. <span id="re_passwordSpan"></span>
  395. </td>
  396. </tr>
  397. <tr>
  398. <td align="right">
  399. <label for="sex">I am:</label>
  400. </td>
  401. <td>
  402. <select name="sex" id="sex">
  403. <option value="Show" disabled="disabled">Select Sex:</option>
  404. <option value="Female">Female</option>
  405. <option value="Male">Male</option>
  406. </select>
  407. <span id="sexSpan"></span>
  408. </td>
  409. </tr>
  410. <tr>
  411. <td align="right">
  412. <label for="birthday">Birthday:</label>
  413. </td>
  414. <td>
  415. <table id="birthday">
  416. <tr>
  417. <td>
  418. <select name="year" id="year" onmouseover="year_birthday()">
  419. <option value="show" disabled="disabled">Year:</option>
  420. </select>
  421. </td>
  422. <td>
  423. <select name="month" id="month" onmouseover="month_birthday()">
  424. <option value="show" disabled="disabled">Month:</option>
  425. </select>
  426. </td>
  427. <td>
  428. <select name="day" id="day" onmouseover="day_birthday()">
  429. <option value="show" disabled="disabled">Day:</option>
  430. </select>
  431. </td>
  432. </tr>
  433. </table>
  434. <span id="birthdaySpan"></span>
  435. </td>
  436. </tr>
  437. <tr>
  438. <td></td>
  439. <td>By clicking Sign Up, you agree to our
  440. <a href="privacy/privacy.php">Terms</a> and that you have read and understand our
  441. <a href="privacy/privacy.php">Privacy &amp; Terms</a>.</td>
  442. </tr>
  443. <tr>
  444. <td></td>
  445. <td align="center"><input type="submit" value="Sign Up"></td>
  446. </tr>
  447. </table>
  448. </form>
  449. </div>
  450. <?php
  451. }
  452. function do_html_profile_form($photo, $firstname, $lastname, $sex, $birthday, $uid, $ispublic){
  453. if($_SESSION['valid_user'] == $uid){
  454. ?>
  455. <div id="profile_form" class="form">
  456. <table>
  457. <tr>
  458. <td rowspan="2" width="500">
  459. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  460. </td>
  461. <td rowspan="3" width="50"></td>
  462. <td colspan="2" width="400">
  463. <h2><?php echo $_SESSION['username']?></h2>
  464. </td>
  465. </tr>
  466. <tr>
  467. <td colspan="2">
  468. <h3><i>Welcome to Ourbond.info</i></h3>
  469. </td>
  470. </tr>
  471. <tr>
  472. <td>
  473. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  474. </td>
  475. <td>
  476. <table>
  477. <tr>
  478. <td rowspan="4">
  479. <img alt="<?php $_SESSION['username']?>" src="<?php echo $photo;?>"/>
  480. </td>
  481. <td rowspan="7" width="50"></td>
  482. <td><i>First Name: </i></td>
  483. </tr>
  484. <tr>
  485. <td><b><?php echo $firstname;?></b></td>
  486. </tr>
  487. <tr>
  488. <td><i>Last Name: </i></td>
  489. </tr>
  490. <tr>
  491. <td><b><?php echo $lastname;?></b></td>
  492. </tr>
  493. <tr>
  494. <td id="privacy_setting">
  495. <i>Privacy Setting: </i>
  496. </td>
  497. <td>
  498. <form method="POST" action="privacy_setting.php">
  499. <select name="setting" id="setting">
  500. <option value="Private" <?php if($ispublic==0) echo "selected";?>>Private</option>
  501. <option value="Public" <?php if($ispublic==1) echo "selected";?>>Public</option>
  502. </select>
  503. <input type="submit" value="Change" ></input>
  504. </form>
  505. </td>
  506. </tr>
  507. <tr>
  508. <td><i>Gender:</i></td>
  509. <td><b><?php echo $sex;?></b></td>
  510. </tr>
  511. <tr>
  512. <td><i>Birth day:</i></td>
  513. <td><b><?php echo $birthday?></b></td>
  514. </tr>
  515. </table>
  516. </td>
  517. </tr>
  518. </table>
  519. </div>
  520. <?php
  521. }else{
  522. ?>
  523. <div id="profile_form" class="form">
  524. <table>
  525. <tr>
  526. <td rowspan="2" width="500">
  527. <h2>OurBond help you share <b>Knowledge</b>, <b>interest</b> and <b>life</b> with your friends and even strangers.</h2>
  528. </td>
  529. <td rowspan="3" width="50"></td>
  530. <td colspan="2" width="400">
  531. <h2><?php echo $_SESSION['username'];?></h2>
  532. </td>
  533. </tr>
  534. <tr>
  535. <td colspan="2">
  536. <h3><i>Welcome to Ourbond.info</i></h3>
  537. </td>
  538. </tr>
  539. <tr>
  540. <td>
  541. <img src="img/pic.jpg" alt="Knowledge bonds everyone." width="500"/>
  542. </td>
  543. <td>
  544. <table>
  545. <?php
  546. if($ispublic == 0){
  547. echo "<tr><td><b>This user's privacy setting is \"Private\".<br>
  548. So you are not able to see its profile.</b></td></tr>";}
  549. else{
  550. ?>
  551. <tr>
  552. <td rowspan="4">
  553. <img alt="<?php echo $firstname." ".$lastname;?>" src="<?php echo $photo;?>"/>
  554. </td>
  555. <td rowspan="7" width="50"></td>
  556. <td><i>First Name: </i></td>
  557. </tr>
  558. <tr>
  559. <td><b><?php echo $firstname;?></b></td>
  560. </tr>
  561. <tr>
  562. <td><i>Last Name: </i></td>
  563. </tr>
  564. <tr>
  565. <td><b><?php echo $lastname;?></b></td>
  566. </tr>
  567. <tr>
  568. <td></td>
  569. <td></td>
  570. </tr>
  571. <tr>
  572. <td><i>Gender:</i></td>
  573. <td><b><?php echo $sex;?></b></td>
  574. </tr>
  575. <tr>
  576. <td><i>Birth day:</i></td>
  577. <td><b><?php echo $birthday?></b></td>
  578. </tr>
  579. <?php
  580. }
  581. ?>
  582. </table>
  583. </td>
  584. </tr>
  585. </table>
  586. </div>
  587. <?php
  588. }
  589. }
  590. function do_html_footer(){
  591. ?>
  592. </div>
  593. <div id="footer">
  594. <a href="#">Privacy &amp; Terms</a> -
  595. <a href="#">Help</a> -
  596. <a href="#">About OurBond</a>
  597. </div>
  598. </body>
  599. </html>
  600. <?php
  601. }
  602. function do_member_item_h($bond_name, $username, $post_content, $post_time, $post_count, $user_id){
  603. if(!isset($bond_name)){
  604. $bond_name = "Bond";
  605. }
  606. if(!isset($username)){
  607. $username = "Mr. Bond";
  608. }
  609. if(!isset($post_content)){
  610. $post_content = "How are your guys doing today?";
  611. }
  612. ?>
  613. <hr/>
  614. <div id="member_item">
  615. <fieldset id="member_item_bond">
  616. <legend id="member_item_bond_name">
  617. <?php
  618. echo $bond_name;
  619. ?>
  620. </legend>
  621. <div id="member_post">
  622. <label class="item_username" for="post_content">
  623. <a href="profile.php?uid=<?php echo $user_id;?>"><?php echo "<b>".$username.": </b>";?></a>
  624. </label>
  625. <div id="post_content">
  626. <?php
  627. echo $post_content." (".$post_time.")";
  628. ?>
  629. </div>
  630. </div>
  631. <div id="2<?php echo $post_count;?>">
  632. <?php
  633. }
  634. function do_member_item_m($username, $comment_content, $comment_time, $comment_user_id){
  635. //can be recuring
  636. if(!isset($username)){
  637. $username = "Mr. Bond";
  638. }
  639. if(!isset($comment_content)){
  640. $comment_content = "I'm fine. And you?";
  641. }
  642. ?>
  643. <div id="member_comment">
  644. <a href="profile.php?uid=<?php echo $comment_user_id;?>"><?php echo "<b>".$username.": </b>";?></a>
  645. <?php echo $comment_content." (".$comment_time.")";?>
  646. </div>
  647. <?php
  648. }
  649. function do_member_item_f($user_id, $username, $post_id, $post_count){
  650. if(!isset($username)){
  651. $username = "Mr. Bond";
  652. }
  653. ?>
  654. </div>
  655. <div id="member_new_comment">
  656. <label id="new_comment_username" for="member_comment_input">
  657. <a href="profile.php?uid=<?php echo $_SESSION['valid_user'];?>"><?php echo "<b>".$username.": </b>";?></a>
  658. </label>
  659. <input type="text" id="1<?php echo $post_count;?>" name="member_comment_input"
  660. onkeydown="sendComment(<?php echo $user_id?>,1<?php echo $post_count?>, <?php echo $post_id?>, 2<?php echo $post_count?>)"/>
  661. </div>
  662. </fieldset>
  663. </div>
  664. <?php
  665. }
  666. function do_member_group_h(){
  667. ?>
  668. <div id="member_bonds">
  669. <fieldset>
  670. <legend>
  671. My Bonds
  672. </legend>
  673. <ul id="bonds_menu">
  674. <li class="bonds_item">
  675. <i>Groups</i>
  676. <ul id="bonds_groups" class="bonds_options">
  677. <?php
  678. }
  679. function do_member_group_m1($group_id, $group_name){
  680. if(!isset($group_id)){
  681. $group_id = "0";
  682. }
  683. if(!isset($group_name)){
  684. $group_name = "Bond";
  685. }
  686. ?>
  687. <li>
  688. <?php
  689. echo "<a href=\"#\" onmouseover=\"show()\" onclick=\"toGroup(".$group_id.")\">".$group_name."</a>";
  690. ?>
  691. </li>
  692. <?php
  693. }
  694. function do_member_group_m(){
  695. ?>
  696. </ul>
  697. </li>
  698. <li class="item">
  699. <i>Circles</i>
  700. <ul id="bonds_circles" class="bonds_options">
  701. <?php
  702. }
  703. function do_member_group_m2($circle_id, $circle_name){
  704. if(!isset($circle_id)){
  705. $circle_id="0";
  706. }
  707. if(!isset($circle_name)){
  708. $circle_name="Bond";
  709. }
  710. ?>
  711. <li>
  712. <?php
  713. echo "<a href=\"#\" onclick=\"toGroup(".$circle_id.")\">".$circle_name."</a>";
  714. ?>
  715. </li>
  716. <?php
  717. }
  718. function do_member_group_f(){
  719. ?>
  720. </ul>
  721. </li>
  722. </ul>
  723. </fieldset>
  724. </div>
  725. <div id="member_items">
  726. <div id="member_items_content">
  727. <?php
  728. }
  729. function do_member_recommendation($user_id, $groups, $circles){
  730. ?>
  731. </div>
  732. <br/>
  733. <br/>
  734. <div id="more_stories" onclick="more()">
  735. <img width="570px" id= "more_stories_img" src="img/more_stories.png"/>
  736. </div>
  737. </div>
  738. <div id="member_recommendations">
  739. <div id="create_menu" >
  740. <fieldset>
  741. <legend>
  742. Create a new Group?
  743. </legend>
  744. <div>
  745. <a href="../wangwen/create_group.php"><img width="150px" src="img/new_bond.png"/></a>
  746. </div>
  747. </fieldset>
  748. </div>
  749. <fieldset>
  750. <legend>Recommendation:</legend>
  751. <table>
  752. <tr>
  753. <td colspan="2"><strong>Top 10 Groups</strong></td>
  754. </tr>
  755. <tr>
  756. <td>
  757. <i>Group</i>
  758. </td>
  759. <td>
  760. <i>Posts</i>
  761. </td>
  762. </tr>
  763. <?php
  764. if(isset($groups) && $groups !== "")
  765. foreach ($groups as $group)
  766. echo "<tr><td><a href=\"#\" onmouseover=\"show()\" onclick=\"toGroup(".$group[0].")\">".$group[1]."</a></td><td>".$group[2]."</td></tr>";
  767. ?>
  768. <tr>
  769. <td colspan="2"><strong>Top 10 Circles</strong></td>
  770. </tr>
  771. <tr>
  772. <td>
  773. <i>Circle</i>
  774. </td>
  775. <td>
  776. <i>Posts</i>
  777. </td>
  778. </tr>
  779. <?php
  780. if(isset($circles) && $circles !== "")
  781. foreach ($circles as $circle)
  782. echo "<tr><td><a href=\"cc/group.php?uid=".$user_id."&gid=".$circle[0]."\">".$circle[1]."</a></td><td>".$circle[2]."</td></tr>";
  783. ?>
  784. </table>
  785. </fieldset>
  786. </div>
  787. <script type="text/javascript">
  788. </script>
  789. <?php
  790. }
  791. function do_html_menu(){
  792. ?>
  793. <div id="member_menu">
  794. &nbsp;&nbsp;&nbsp;&nbsp;<a href="../wangwen/main.php">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../wangwen/publicgroups.php">Public Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../wangwen/privategroups.php">Private Groups</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="member.php">Personal Page</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="profile.php?uid=<?php echo $_SESSION['valid_user'];?>">Profile</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="changepassword_form.php">Change Password</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="logout_form.php">Log out</a>
  795. &nbsp;&nbsp;&nbsp;
  796. Welcome to OurBond.info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "<a href=\"profile.php?uid=".$_SESSION['valid_user']."\">".$_SESSION['username']."</a>";?>
  797. <br>
  798. </div>
  799. <?php
  800. }
  801. ?>