/[LeafOK_CVS]/fenglin/bbs/user_section_favor.inc.php
ViewVC logotype

Diff of /fenglin/bbs/user_section_favor.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Wed Apr 23 06:57:51 2025 UTC Revision 1.2 by sysadm, Sun Apr 27 04:32:05 2025 UTC
# Line 37  if (!isset($_BBS_S_FAVOR_CLASS_INIT_)) Line 37  if (!isset($_BBS_S_FAVOR_CLASS_INIT_))
37                                  array_push($this->s_list, $row["SID"]);                                  array_push($this->s_list, $row["SID"]);
38                          }                          }
39                          mysqli_free_result($rs);                          mysqli_free_result($rs);
40                            
41                          return 0;                          return 0;
42                  }                  }
43                    
44                  function save_s_favor($uid, $db_conn)                  function save_s_favor($uid, $db_conn)
45                  {                  {
46                          if ($db_conn == NULL)                          if ($db_conn == NULL)
# Line 52  if (!isset($_BBS_S_FAVOR_CLASS_INIT_)) Line 52  if (!isset($_BBS_S_FAVOR_CLASS_INIT_))
52                          {                          {
53                                  return -2;                                  return -2;
54                          }                          }
55                            
56                          foreach ($this->s_list as $sid)                          foreach ($this->s_list as $sid)
57                          {                          {
58                                  if (mysqli_query($db_conn, "INSERT INTO section_favorite(UID, SID) VALUES($uid, $sid)") == false)                                  if (mysqli_query($db_conn, "INSERT INTO section_favorite(UID, SID) VALUES($uid, $sid)") == false)
# Line 63  if (!isset($_BBS_S_FAVOR_CLASS_INIT_)) Line 63  if (!isset($_BBS_S_FAVOR_CLASS_INIT_))
63    
64                          return 0;                          return 0;
65                  }                  }
66                    
67                  function is_in($sid)                  function is_in($sid)
68                  {                  {
69                          return in_array($sid, $this->s_list);                          return in_array($sid, $this->s_list);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1