function checkclash($code) { $club = new Club($code); $ret = mysql_query("select code from club where {$club->queryof()}"); if ($ret && mysql_num_rows($ret) != 0) { $column = "code"; $value = $code; include 'php/nameclash.php'; exit(0); } }
// You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. include 'php/session.php'; include 'php/checklogged.php'; include 'php/opendatabase.php'; include 'php/club.php'; try { $club = new Club(); $club->fromget(); $club->fetchdets(); } catch (ClubException $e) { $mess = $e->getMessage(); include 'php/wrongentry.php'; exit(0); } $ret = mysql_query("delete from club where {$club->queryof()}"); if (!$ret) { $mess = "Cannot delete club"; include 'php/dataerror.php'; exit(0); } $nrows = mysql_affected_rows(); if ($nrows == 0) { $mess = "No clubs deleted"; include 'php/dataerror.php'; exit(0); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <?php