=CLAN_OFFICER){ $clanmotd = substr(httppost('clanmotd'),0,4096); if (httppostisset('clanmotd') && stripslashes($clanmotd)!=$claninfo['clanmotd']){ $sql = "UPDATE " . db_prefix("clans") . " SET clanmotd='$clanmotd',motdauthor={$session['user']['acctid']} WHERE clanid={$claninfo['clanid']}"; db_query($sql); invalidatedatacache("clandata-{$claninfo['clanid']}"); $claninfo['clanmotd']=stripslashes($clanmotd); output("Updating MoTD`n"); $claninfo['motdauthor']=$session['user']['acctid']; } $clandesc = httppost('clandesc'); if (httppostisset('clandesc') && stripslashes($clandesc)!=$claninfo['clandesc'] && $claninfo['descauthor']!=4294967295){ $sql = "UPDATE " . db_prefix("clans") . " SET clandesc='".addslashes(substr(stripslashes($clandesc),0,4096))."',descauthor={$session['user']['acctid']} WHERE clanid={$claninfo['clanid']}"; db_query($sql); invalidatedatacache("clandata-{$claninfo['clanid']}"); output("Updating description`n"); $claninfo['clandesc']=stripslashes($clandesc); $claninfo['descauthor']=$session['user']['acctid']; } $customsay = httppost('customsay'); if (httppostisset('customsay') && $customsay!=$claninfo['customsay'] && $session['user']['clanrank']>=CLAN_LEADER){ $sql = "UPDATE " . db_prefix("clans") . " SET customsay='$customsay' WHERE clanid={$claninfo['clanid']}"; db_query($sql); invalidatedatacache("clandata-{$claninfo['clanid']}"); output("Updating custom say line`n"); $claninfo['customsay']=stripslashes($customsay); } $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$claninfo['motdauthor']}"; $result = db_query($sql); $row = db_fetch_assoc($result); $motdauthname = $row['name']; $sql = "SELECT name FROM " . db_prefix("accounts") . " WHERE acctid={$claninfo['descauthor']}"; $result = db_query($sql); $row = db_fetch_assoc($result); $descauthname = $row['name']; output("`&`bCurrent MoTD:`b `#by %s`2`n",$motdauthname); output_notl(nltoappon($claninfo['clanmotd'])."`n"); output("`&`bCurrent Description:`b `#by %s`2`n",$descauthname); output_notl(nltoappon($claninfo['clandesc'])."`n"); rawoutput("
"); }else{ output("You do not have authority to change your clan's motd or description."); } addnav("Return to your clan hall","clan.php"); ?>