Ejemplo n.º 1
0
	/**
	 * @param string $tablename
	 */
	public static function setTablename($tablename) {
		self::$tablename = $tablename;
	}
Ejemplo n.º 2
0
	/**
	 * @param int $id
	 * @param int $points
	 */
	public static function check_vip($id, $points) {
		// Include LIB
		require_once(LIB_DIR . DS . 'class.phpbb_groups.php');
		require_once(LIB_DIR . DS . 'class.phpbb_group_members.php');
		require_once(LIB_DIR . DS . 'class.phpbb_account.php');
		require_once(LIB_DIR . DS . 'class.phpbb_log.php');

		// Is already VIP
		if(phpbb_group_members::isUserInGroup($id, phpbb_groups::getId(ROA_VIP_GROUP)))
			return;

		// Has enough Points
		if($points < ROA_VIP_POINTS)
			return;

		// Add to group
		phpbb_group_members::add(phpbb_groups::getId(ROA_VIP_GROUP), $id);

		// Set Main Group
		phpbb_account::updateMainGroup($id, phpbb_groups::getId(ROA_VIP_GROUP), phpbb_groups::getColor(phpbb_groups::getId(ROA_VIP_GROUP)));

		// Add to Log
		points_log::add($id, 0, "Du hast " . ROA_VIP_POINTS . " Punkte erreicht und wurdest daher in die " . ROA_VIP_GROUP . "-Gruppe aufgenommen! Glückwunsch!");
		//phpbb_log::add(0, SYSTEM_USER, get_phpbb_info::$instance->ip, time(), "LOG_USERS_ADDED", "a:2:{i:0;s:7:\"" . ROA_VIP_GROUP . "\";i:1;s:8:\"" . get_phpbb_info::$instance->username . "\";}"); todo fix
	}