$file = $opts['i'];
}
-$emails = split("\n", file_get_contents($file));
+$emails = explode("\n", file_get_contents($file));
foreach ($emails as $_email) {
$email = valide_email($_email);
if (empty($email) || $email=='@') {
if (Env::has('add_member')) {
$add = Env::get('add_member');
if(strstr($add, '@')) {
- list($mbox,$dom) = split('@', strtolower($add));
+ list($mbox,$dom) = explode('@', strtolower($add));
} else {
$mbox = $add;
$dom = 'm4x.org';
if (strpos($email, '@') === false) {
$email .= '@m4x.org';
}
- list($mbox,$dom) = split('@', $email);
+ list($mbox,$dom) = explode('@', $email);
$res = $globals->xdb->query(
"SELECT uid, nom, prenom, email, email AS email2, perms='admin', origine
if (Env::has('email')) {
$email = Env::get('email');
- list(,$fqdn) = split('@', $email);
+ list(,$fqdn) = explode('@', $email);
$fqdn = strtolower($fqdn);
if ($fqdn == 'polytechnique.org' || $fqdn == 'melix.org' ||
$fqdn == 'm4x.org' || $fqdn == 'melix.net')
$this->_cookies = array();
$this->_authentication = false;
$this->_realm = false;
- foreach (split("\r\n", $headers) as $header_line) {
+ foreach (explode("\r\n", $headers) as $header_line) {
$this->_parseHeaderLine($header_line);
}
}
* @access private
*/
function _parseCookie($cookie_line) {
- $parts = split(";", $cookie_line);
+ $parts = explode(";", $cookie_line);
$cookie = array();
preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
foreach ($parts as $part) {
$this->_setError('Could not parse headers');
$this->_headers = &new SimpleHttpHeaders($raw);
} else {
- list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
+ list($headers, $this->_content) = explode("\r\n\r\n", $raw, 2);
$this->_headers = &new SimpleHttpHeaders($headers);
}
}
return ! $packet;
}
}
-?>
\ No newline at end of file
+?>
}
if (preg_match('/(.*?)@(.*)/', $url, $matches)) {
$url = $prefix . $matches[2];
- $parts = split(":", $matches[1]);
+ $parts = explode(":", $matches[1]);
return array(
urldecode($parts[0]),
isset($parts[1]) ? urldecode($parts[1]) : false);
*/
function _parseRequest($raw) {
$request = new SimpleQueryString();
- foreach (split("&", $raw) as $pair) {
+ foreach (explode("&", $raw) as $pair) {
if (preg_match('/(.*?)=(.*)/', $pair, $matches)) {
$request->add($matches[1], urldecode($matches[2]));
} elseif ($pair) {
return preg_replace('|/\./|', '/', $path);
}
}
-?>
\ No newline at end of file
+?>
* @access protected
*/
function _findHeader($compare) {
- $lines = split("\r\n", $compare);
+ $lines = explode("\r\n", $compare);
foreach ($lines as $line) {
if ($this->_testHeaderLine($line)) {
return $line;
* @access private
*/
function _testHeaderLine($line) {
- if (count($parsed = split(':', $line)) < 2) {
+ if (count($parsed = explode(':', $line)) < 2) {
return false;
}
list($header, $value) = $parsed;
sprintf($message, "Not expecting cookie [$name]"));
}
}
-?>
\ No newline at end of file
+?>
/* cree le champs "auth" renvoye au Groupe X */
function gpex_make_auth($chlg, $privkey, $datafields) {
global $globals;
- $fieldarr = split(",",$datafields);
+ $fieldarr = explode(",",$datafields);
$tohash = "1$chlg$privkey";
while (list(,$val) = each($fieldarr)) {
function gpex_make_params($chlg, $privkey, $datafields) {
global $globals;
$params = "&auth=".gpex_make_auth($chlg, $privkey, $datafields);
- $fieldarr = split(",",$datafields);
+ $fieldarr = explode(",",$datafields);
while (list(,$val) = each($fieldarr)) {
if (isset($_SESSION[$val])) {
$params .= "&$val=".$_SESSION[$val];
} elseif (Post::has('email')) {
$email = valide_email(Post::get('email'));
- list(,$fqdn) = split('@', $email);
+ list(,$fqdn) = explode('@', $email);
$fqdn = strtolower($fqdn);
if ($fqdn == 'polytechnique.org' || $fqdn == 'melix.org' || $fqdn == 'm4x.org' || $fqdn == 'melix.net') {
$page->assign('neuneu', true);
$forlife.'@'.$globals->mail->domain, $forlife.'@'.$globals->mail->domain2);
$melix = $res->fetchOneCell();
if ($melix) {
- list($melix) = split('@', $melix);
+ list($melix) = explode('@', $melix);
$page->assign('melix',$melix);
}
$membres = Array();
foreach ($members as $member) {
- list($m) = split('@',$member[1]);
+ list($m) = explode('@',$member[1]);
$res = $globals->xdb->query("SELECT prenom,IF(nom_usage='', nom, nom_usage) AS nom, promo, a.alias AS forlife
FROM auth_user_md5 AS u
INNER JOIN aliases AS a ON u.user_id = a.id
require_once('xorg.inc.php');
require_once('webservices/manageurs.server.inc.php');
-$ips = array_flip(split(' ',$globals->manageurs->authorized_ips));
+$ips = array_flip(explode(' ',$globals->manageurs->authorized_ips));
if($ips && isset($ips[$_SERVER['REMOTE_ADDR']])){
$server = xmlrpc_server_create();
$membres = Array();
foreach($members as $mem) {
- list($m, $dom) = split('@',$mem);
+ list($m, $dom) = explode('@',$mem);
if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
$res = $globals->xdb->query('SELECT prenom,IF(nom_usage="", nom, nom_usage), promo
FROM auth_user_md5 AS u
function justify($text,$n)
{
- $arr = split("\n",wordwrap($text,$n));
+ $arr = explode("\n",wordwrap($text,$n));
$arr = array_map('trim',$arr);
$res = '';
foreach ($arr as $key => $line) {
$data = $data.'@'.$globals->mail->domain;
}
- list($mbox, $fqdn) = split('@', $data);
+ list($mbox, $fqdn) = explode('@', $data);
if ($fqdn == $globals->mail->domain || $fqdn == $globals->mail->domain2) {
$res = $globals->xdb->query("SELECT a.alias
INNER JOIN virtual USING(vid)
WHERE alias={?}", $mbox.'@'.$globals->mail->alias_dom);
if ($redir = $res->fetchOneCell()) {
- list($alias) = split('@', $redir);
+ list($alias) = explode('@', $redir);
} else {
$page->trig("il n'y a pas d'utilisateur avec cet alias");
$alias = false;
foreach ($mls as $ml) {
if (list(,$members) = $client->get_members($ml)) {
foreach ($members as $mem) {
- list($m, $dom) = split('@',$mem[1]);
+ list($m, $dom) = explode('@',$mem[1]);
if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) {
$res = $globals->xdb->query('SELECT prenom, nom, FIND_IN_SET("femme", u.flags) AS sexe
FROM auth_user_md5 AS u