与朋友一起上课(索引.php)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了与朋友一起上课(索引.php)相关的知识,希望对你有一定的参考价值。

  1. <head>
  2. <title>
  3. Facebook App
  4. </title>
  5. </head>
  6.  
  7. <body>
  8.  
  9. <?
  10.  
  11. include ('connect.php');
  12. include ('fbconnect.php');
  13.  
  14. $fidQuery = "Select count(fid) as ct FROM users where fid =".$var4."";
  15. $runfid = mysql_query($fidQuery);
  16. $row1 = mysql_fetch_array($runfid);
  17. if ($row1['ct'] == 1)
  18. {
  19. echo "<br>Welcome Back ".$var1."!<BR>";
  20. }
  21. else
  22. {
  23.  
  24. echo "<br>Hey...its your first time. Welcome!<br>";
  25. mysql_query("INSERT INTO users (name, gender, email, fid, link) VALUES ('".$var1."','".$var2."','".$var3."','".$var4."','".$var5."')")or die(mysql_error());
  26. }
  27.  
  28.  
  29. ?><br /><br />
  30. Classes that students at Hofstra have enrolled in...<br /><br />
  31. <?
  32.  
  33. $query = "SELECT * from class order by day ASC";
  34. $result = mysql_query($query);
  35.  
  36. $printedTitle = 0;
  37. $printedTitle2 = 0;
  38.  
  39. while ($row = mysql_fetch_array($result))
  40. {
  41.  
  42. if ($printedTitle == 0 && $row['day'] == "MWF")
  43. {
  44. echo "Classes that run on Monday, Wed & Fridays<br>";
  45. $printedTitle++;
  46. }
  47.  
  48. if ($printedTitle2 == 0 && $row['day'] == "TTH")
  49. {
  50. echo "Classes that run on Tuesdays and Thursdays<br>";
  51. $printedTitle2++;
  52. }
  53.  
  54.  
  55. echo $row['className'] ." at ".
  56. $row['time'].
  57. $row['day']." is in the department of ".$row['dept']."<a href='addfromindex.php?id=".$var4."&coursecode=".$row['className']."&time=".$row['time']."&day=".$row['day']."'>[+]</a><br>";
  58. }
  59. ?>
  60. <br />
  61. <br />
  62. Dont see your class here?
  63. <a href="addClass.php?id=<? echo $var4;?>">
  64. Lets Insert A Class Now!</a> or <a href="myclasses.php?id=<? echo $var4;?>">take a look at what classes you're in.</a>
  65. </body>
  66. </html>

以上是关于与朋友一起上课(索引.php)的主要内容,如果未能解决你的问题,请参考以下文章

与朋友一起上课(插入类.php)

与朋友一起上课(用户.php)

与朋友一起上课(添加类.php)

开学啦,LUA准备好了!

朋友 c++ 不与私人成员一起工作

与朋友一起使用超类的私有变量