Subversion-Projekte lars-tiefland.em_wm

Revision

Revision 5 | Revision 49 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 5 Revision 31
Zeile 24... Zeile 24...
24
				$this->t_id=$t_id;
24
				$this->t_id=$t_id;
25
				$this->t_name=$row["t_name"];
25
				$this->t_name=$row["t_name"];
26
				$this->t_group=$row["t_group"];
26
				$this->t_group=$row["t_group"];
27
				return $this;
27
				return $this;
28
			}
28
			}
29
  		}
29
		}
30
 
30
		
31
		function Team($t_id)
31
		function Team($t_id)
32
		{
32
		{
33
			$this->__construct($t_id);
33
			$this->__construct($t_id);
34
		}
34
		}
-
 
35
		
-
 
36
		function update ($t_name, $t_group)
-
 
37
		{
-
 
38
			$this->t_name=$t_name;
-
 
39
			$this->t_group=$t_group;
-
 
40
		}
-
 
41
		
-
 
42
		function save($op)
-
 
43
		{
-
 
44
			global $db;
-
 
45
			switch($op)
-
 
46
			{
-
 
47
				case "save":
-
 
48
					$sql="INSERT INTO teams (t_name, t_group)
-
 
49
						VALUES ('$this->t_name', $this->t_group)";
-
 
50
					break;
-
 
51
				case "update":
-
 
52
					$sql="UPDATE teams SET t_name='$this->t_name', t_group=$this->t_group WHERE t_id=$this->t_id";
-
 
53
					break;
-
 
54
				case "del":
-
 
55
					$sql="DELETE FROM teams WHERE t_id=$this->t_id";
-
 
56
					break;
-
 
57
			}
-
 
58
			return $db->query($sql);
-
 
59
		}
-
 
60
		
35
  		function listeTeam($limit, $start=0)
61
		function listeTeam($limit, $start=0)
36
		{
62
		{
37
			global $db, $db_meld, $error, $meld, $user;
63
			global $db, $db_meld, $error, $meld, $user;
38
			$sql="SELECT * FROM teams";
64
			$sql="SELECT * FROM teams";
39
//			echo $db->provides('limit');
-
 
40
			if ($db->provides('limit') && $limit > 0)
65
			if ($db->provides('limit') && $limit > 0)
41
			{
66
			{
42
				$res=$db->limitquery($sql, $start, $limit);
67
				$res=$db->limitquery($sql, $start, $limit);
43
			}
68
			}
44
			else
69
			else
Zeile 51... Zeile 76...
51
				$meld="Ein Fehler ist aufgetreten!";
76
				$meld="Ein Fehler ist aufgetreten!";
52
				$db_meld=$res->getUserInfo();
77
				$db_meld=$res->getUserInfo();
53
			}
78
			}
54
			return $res;
79
			return $res;
55
		}
80
		}
56
 	}
81
	}
57
?>
82
?>