- function newteam() {
- global $xdb;
- $c = X1plugin_style();
- $c .= X1plugin_title(XL_teamcreate_title);
- $cookie = X1_userdetails();
- $username = $cookie[1];
- $to_userid = $cookie[0];
- if ( !isset($_POST['teamname']))return X1plugin_output($c .= X1plugin_title(XL_teamcreate_blankname));
- if(!preg_match("/^[a-z0-9 ]+$/i", $_POST['teamname']))return X1plugin_output($c .= X1plugin_title(XL_teamcreate_invalidfeed));
- if ( !isset($_POST['joinpassword']))return X1plugin_output($c .= X1plugin_title(XL_teamcreate_blankjpass));
- if ( !isset($_POST['clantags']))return X1plugin_output($c .= X1plugin_title(XL_teamcreate_blanktags));
- if ( $_POST['joinpassword'] != $_POST['joinpassword2'])return X1plugin_output($c .= X1plugin_title(XL_teamcreate_jpassnomatch));
- if ( !isset($_POST['country']))return X1plugin_output($c .= X1plugin_title(XL_teamcreate_blankcountry));
- WHERE name=".$xdb->qstr($_POST['teamname'])));
- WHERE mail=".$xdb->qstr($_POST['mail'])));
- WHERE playerone=".$xdb->qstr($_POST['captain'])));
- if ($maxteam >= X1_maxcreate)return X1plugin_output(X1plugin_title($c .= XL_teamcreate_toomanyteams));
- if ($samenick >= 1) {
- return X1plugin_output(X1plugin_title($c .= XL_teamcreate_dupeteam));
- }else{
- modifysql("INSERT INTO", X1_DB_teams, "
- (name, passworddb, mail, country, playerone, clantags, joinpassword, homepage, created)
- VALUES
- (
- ".$xdb->qstr($_POST['teamname']).",
- ".$xdb->qstr($new_pass).",
- ".$xdb->qstr($_POST['mail']).",
- ".$xdb->qstr($_POST['country']).",
- ".$xdb->qstr($_POST['captain']).",
- ".$xdb->qstr($_POST['clantags']).",
- ".$xdb->qstr($_POST['joinpassword']).",
- ".$xdb->qstr($_POST['homepage']).",
- )");
date data
