Remove duplicate web folder
parent
08c094e957
commit
1d06892f16
@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
include_once('thread_utils.php');
|
||||
include_once('mail_utils.php');
|
||||
include_once('admin_utils.php');
|
||||
|
||||
if (($user_login != "support" || ($remote_addr != "192.168.1.153" && $remote_addr != "192.168.3.1")) && $remote_addr != "127.0.0.1")
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
importParam('recover_forum');
|
||||
if ($recover_forum)
|
||||
{
|
||||
echo "recover forum $recover_forum<br>\n";
|
||||
recover_thread($recover_forum);
|
||||
die();
|
||||
}
|
||||
|
||||
importParam('recover_thread');
|
||||
importParam('recover_threadthread');
|
||||
if ($recover_thread && isset($recover_threadthread))
|
||||
{
|
||||
echo "recover forum $recover_thread<br>\n";
|
||||
recover_one_thread($recover_thread, $recover_threadthread);
|
||||
die();
|
||||
}
|
||||
|
||||
importParam('rename_forum');
|
||||
importParam('into_forum');
|
||||
if ($rename_forum)
|
||||
{
|
||||
echo "rename forum $rename_forum into $into_forum<br>\n";
|
||||
rename_forum($rename_forum, $into_forum);
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
importParam('shard');
|
||||
|
||||
importParam('mailbox');
|
||||
importParam('mail');
|
||||
|
||||
if ($mail)
|
||||
{
|
||||
$mdir = get_user_dir($mailbox, $shard);
|
||||
readfile($mdir.$mail);
|
||||
die();
|
||||
}
|
||||
else if ($mailbox)
|
||||
{
|
||||
display_mailbox_content($shard, $mailbox);
|
||||
die();
|
||||
}
|
||||
|
||||
importParam('forum');
|
||||
importParam('thread');
|
||||
|
||||
if ($thread)
|
||||
{
|
||||
display_thread_content($shard, $forum, $thread);
|
||||
die();
|
||||
}
|
||||
else if ($forum)
|
||||
{
|
||||
display_forum_content($shard, $forum);
|
||||
die();
|
||||
}
|
||||
|
||||
?>
|
@ -1,103 +0,0 @@
|
||||
<?php
|
||||
|
||||
$server = "localhost";
|
||||
$port = 80;
|
||||
|
||||
// import HTTP_GET_VARS as _GET if _GET doesn't exist
|
||||
if (!isset($_GET) && isset($HTTP_GET_VARS))
|
||||
$_GET = &$HTTP_GET_VARS;
|
||||
|
||||
echo "<form method='get' action='$PHP_SELF'>\n";
|
||||
echo "SHARD: <input type='text' name='shard' value='".$_GET['shard']."'><br>\n";
|
||||
echo "MAILBOX: <input type='text' name='mailbox' value='".$_GET['mailbox']."'><br>\n";
|
||||
echo "FORUM: <input type='text' name='forum' value='".$_GET['forum']."'><br>\n";
|
||||
echo "<input type='submit' value='Retrieve'><br>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
if ($_GET["mailbox"])
|
||||
{
|
||||
echo "Get mailbox ".$_GET["mailbox"]." content:<br>\n";
|
||||
$s = fsockopen($server, $port, &$errno, &$errstr, 30) or die ("ERROR: can't connect to $server:$port");
|
||||
fputs($s,"GET /websrv/admin.php?user_login=support&shard=".$_GET["shard"]."&mailbox=".$_GET["mailbox"]." HTTP/1.0\n\n");
|
||||
|
||||
while(!feof($s))
|
||||
{
|
||||
$l = trim(fgets($s, 2048));
|
||||
if (ereg("^FILE:(.*)", $l, $reg))
|
||||
echo "<a href=\"$PHP_SELF?shard=".$_GET["shard"]."&mailbox=".$_GET["mailbox"]."&mail=".$reg[1]."\">".$reg[1]."</a><br>\n";
|
||||
}
|
||||
|
||||
fclose($s);
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
if ($_GET["mail"])
|
||||
{
|
||||
echo "Get mail ".$_GET["mailbox"]."/".$_GET["mail"]." content:<br>\n";
|
||||
$s = fsockopen($server, $port, &$errno, &$errstr, 30) or die ("ERROR: can't connect to $server:$port");
|
||||
fputs($s, "GET /websrv/admin.php?user_login=support&shard=".$_GET["shard"]."&mail=".$_GET["mail"]."&mailbox=".$_GET["mailbox"]." HTTP/1.0\n\n");
|
||||
|
||||
echo "Content of mail:<br>\n";
|
||||
while(!feof($s))
|
||||
echo nl2br(htmlentities(trim(fgets($s, 2048))));
|
||||
|
||||
fclose($s);
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
if ($_GET["recover_thread"])
|
||||
{
|
||||
echo "Recover thread ".$_GET["forum"]." ".$_GET["recover_thread"]."<br>\n";
|
||||
$s = fsockopen($server, $port, &$errno, &$errstr, 30) or die ("ERROR: can't connect to $server:$port");
|
||||
fputs($s, "GET /websrv/admin.php?user_login=support&shard=".$_GET["shard"]."&recover_thread=".$_GET["forum"]."&recover_threadthread=".$_GET["recover_thread"]." HTTP/1.0\n\n");
|
||||
fclose($s);
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
if ($_GET["forum"])
|
||||
{
|
||||
echo "Get forum ".$_GET["forum"]." content:<br>\n";
|
||||
$s = fsockopen($server, $port, &$errno, &$errstr, 30) or die ("ERROR: can't connect to $server:$port");
|
||||
fputs($s, "GET /websrv/admin.php?user_login=support&shard=".$_GET["shard"]."&forum=".$_GET["forum"]." HTTP/1.0\n\n");
|
||||
|
||||
while(!feof($s))
|
||||
{
|
||||
$l = trim(fgets($s, 2048));
|
||||
if (ereg("^FILE:(.*)", $l, $reg))
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?shard=".$_GET["shard"]."&forum=".$_GET["forum"]."&thread=".trim($reg[1])."\">".trim($reg[1])."</a>\n";
|
||||
if ($reg[1]{0} == '_')
|
||||
{
|
||||
echo " <a href=\"$PHP_SELF?shard=".$_GET["shard"]."&forum=".$_GET["forum"]."&recover_thread=".trim($reg[1])."\">recover thread</a>\n";
|
||||
}
|
||||
echo "<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
fclose($s);
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
if ($_GET["thread"])
|
||||
{
|
||||
echo "Get thread ".$_GET["forum"]."/".$_GET["thread"]." content:<br>\n";
|
||||
$s = fsockopen($server, $port, &$errno, &$errstr, 30) or die ("ERROR: can't connect to $server:$port");
|
||||
fputs($s, "GET /websrv/admin.php?user_login=support&shard=".$_GET["shard"]."&forum=".$_GET["forum"]."&thread=".$_GET["thread"]." HTTP/1.0\n\n");
|
||||
|
||||
echo "Content of thread:<br>\n";
|
||||
while(!feof($s))
|
||||
{
|
||||
$l = trim(fgets($s, 2048));
|
||||
if (ereg("^TOPIC:(.*) SUBMIT:(.*)$", $l, $reg))
|
||||
echo nl2br(htmlentities(" TOPIC:".$reg[1]."SUBMITED BY: ".$reg[2]."\n"));
|
||||
if (ereg("^AUTHOR:(.*) DATE:(.*) POST:(.*)", $l, $reg))
|
||||
echo nl2br(htmlentities("AUTHOR: ".$reg[1]." DATE:".$reg[2]." POST:".$reg[3]."\n"));
|
||||
}
|
||||
|
||||
fclose($s);
|
||||
echo "<br><br>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
|
||||
function display_mailbox_content($shard, $user)
|
||||
{
|
||||
$udir = get_user_dir($user, $shard);
|
||||
|
||||
echo "-- MAILBOX $user ($udir)\n";
|
||||
$dir = opendir($udir);
|
||||
while ($dir && ($file = readdir($dir)))
|
||||
if (ereg("^mail_([0-9]*)\.html", $file) || ereg("^_mail_([0-9]*)\.html", $file))
|
||||
echo "FILE:$file\n";
|
||||
echo "-- END MAILBOX $user\n";
|
||||
}
|
||||
|
||||
function display_forum_content($shard, $user)
|
||||
{
|
||||
$udir = get_user_dir($user, $shard);
|
||||
|
||||
echo "-- FORUM $user ($udir)\n";
|
||||
$dir = opendir($udir);
|
||||
while ($dir && ($file = readdir($dir)))
|
||||
if (ereg("^thread_([0-9]*)\.index", $file) || ereg("^_thread_([0-9]*)\.index", $file))
|
||||
echo "FILE:$file\n";
|
||||
echo "-- END FORUM $user\n";
|
||||
}
|
||||
|
||||
function display_thread_content($shard, $forum, $thread)
|
||||
{
|
||||
$udir = get_user_dir($forum, $shard);
|
||||
read_index($udir.$thread, &$header, &$array);
|
||||
|
||||
$a = explode("%%", $header);
|
||||
|
||||
echo "-- THREAD $forum $thread\n";
|
||||
echo "TOPIC: ".$a[1]." SUBMIT: ".$a[0]."\n";
|
||||
if (count($array) > 0)
|
||||
{
|
||||
foreach ($array as $post)
|
||||
{
|
||||
echo "AUTHOR: ".$post[0]." DATE: ".$post[2]." POST: ".$post[1]."\n";
|
||||
}
|
||||
}
|
||||
echo "-- END THREAD $forum $thread\n";
|
||||
}
|
||||
|
||||
?>
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
include_once('utils.php');
|
||||
|
||||
unset($user);
|
||||
$user = $user_login;
|
||||
|
||||
$user_dir = get_user_dir($user, $shard);
|
||||
if (!is_dir($user_dir))
|
||||
die("0");
|
||||
|
||||
$fname = $user_dir.'new_mails';
|
||||
if (file_exists($fname))
|
||||
{
|
||||
unlink($fname);
|
||||
die("1");
|
||||
}
|
||||
else
|
||||
{
|
||||
die("0");
|
||||
}
|
||||
?>
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
$USERS_DIR = '/home/nevrax/live/www'; // without final /
|
||||
$TEMPLATE_DIR = './template'; // without final /
|
||||
|
||||
?>
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
include_once('mail_utils.php');
|
||||
|
||||
//
|
||||
// INPUT:
|
||||
//
|
||||
// $user_login login of the user that consults the mailbox
|
||||
// $select_mail_%% mails to be removed
|
||||
//
|
||||
|
||||
read_template('confirm_delete_mail.html', $confirm_delete_mail);
|
||||
|
||||
$mails = array();
|
||||
$selected_mails = '';
|
||||
foreach ($_POST as $var => $value)
|
||||
{
|
||||
if (matchParam($var, "select_mail_", $mail))
|
||||
{
|
||||
$mails[] = $mail;
|
||||
$selected_mails .= "<input type='hidden' name='select_mail_$mail' value='selected'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
$instance = str_replace(array('%%MAIL%%', '%%SELECTED_MAILS%%'),
|
||||
array($mails[0], $selected_mails),
|
||||
$confirm_delete_mail);
|
||||
|
||||
echo $instance;
|
||||
?>
|
@ -1,71 +0,0 @@
|
||||
<?php
|
||||
include_once('thread_utils.php');
|
||||
|
||||
//
|
||||
// INPUT:
|
||||
//
|
||||
// $user_login login of the user that consults the forum
|
||||
// $shard shard from which the user connects in
|
||||
// $post_from user who create the thread
|
||||
// $post_to forum in which the thread is to be created
|
||||
// $post_subject topic of the new thread
|
||||
// $post_content content of the first post (optional)
|
||||
//
|
||||
|
||||
importParam('post_from');
|
||||
importParam('post_to');
|
||||
importParam('post_subject');
|
||||
importParam('post_content');
|
||||
|
||||
check_character_belongs_to_guild($user_login, $post_to);
|
||||
|
||||
// check mail is valid
|
||||
//if (!isset($post_from) || !isset($post_to) || !isset($post_subject))
|
||||
// die('Incomplete post to send');
|
||||
//if ($post_subject == '') $post_subject = 'No Subject';
|
||||
|
||||
// check recipient has an account
|
||||
$to_dir = build_user_dir($post_to, $shard);
|
||||
$to_index = $to_dir.'forum.index';
|
||||
|
||||
if (!file_exists($to_index))
|
||||
{
|
||||
build_forum_page($post_to);
|
||||
}
|
||||
|
||||
if (trim($post_subject) != '')
|
||||
{
|
||||
$post_from = clean_string($post_from);
|
||||
$post_to = clean_string($post_to);
|
||||
$post_subject = clean_string($post_subject);
|
||||
|
||||
//
|
||||
// send mail to recipient
|
||||
//
|
||||
|
||||
// create new thread index
|
||||
add_thread_to_forum_index($post_from, $post_to, $post_subject, $index);
|
||||
|
||||
// create thread file
|
||||
create_thread($post_from, $post_to, $post_subject, $index);
|
||||
|
||||
// add main post to thread
|
||||
if ($post_content != "")
|
||||
add_post($post_from, $post_to, $post_content, $index, $last_date);
|
||||
|
||||
// rebuild thread page
|
||||
build_thread_page($post_to, $index, $num_posts);
|
||||
|
||||
// update forum index since thread was touched
|
||||
update_forum_index($post_to, $index, $num_posts, $last_date);
|
||||
|
||||
// rebuild forum page
|
||||
build_forum_page($post_to);
|
||||
}
|
||||
|
||||
// redirect browser to new forum page
|
||||
//redirect("forum.php?forum=$post_to");
|
||||
exportParam('forum', $post_to);
|
||||
//$forum = $post_to;
|
||||
include('forum.php');
|
||||
?>
|
@ -1,135 +0,0 @@
|
||||
<?php
|
||||
include_once('mail_utils.php');
|
||||
include_once('thread_utils.php');
|
||||
|
||||
if ($enter_login)
|
||||
{
|
||||
if ($login)
|
||||
setcookie('user_login', $login, time()+86400);
|
||||
else
|
||||
setcookie('user_login');
|
||||
}
|
||||
|
||||
if ($rebuild_mailbox)
|
||||
{
|
||||
build_mail_page($user);
|
||||
}
|
||||
|
||||
if ($rebuild_forum)
|
||||
{
|
||||
build_forum_page($user);
|
||||
}
|
||||
|
||||
if ($rebuild_thread)
|
||||
{
|
||||
build_thread_page($user, $thread, $num_posts);
|
||||
}
|
||||
|
||||
if ($remove_thread)
|
||||
{
|
||||
remove_thread($user, $thread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function selectUser($var)
|
||||
{
|
||||
return "<select name='$var'>\n".
|
||||
"<option value='ace'>Ace\n".
|
||||
"<option value='ben'>Ben\n".
|
||||
"<option value='hulud'>Hulud\n".
|
||||
"<option value='lem'>Lem\n".
|
||||
"<option value='guild'>Guild\n".
|
||||
"<option value='guest'>Guest\n".
|
||||
"</select>\n";
|
||||
}
|
||||
|
||||
echo "<html><head><title>Fake post form</title></head>\n";
|
||||
echo "<body>\n";
|
||||
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit value='Refresh'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td>Login</td><td><input type=text name='login' size=50 maxlength=255 value='$user_login'></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit name='enter_login' value='Enter'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Post a mail<br>\n";
|
||||
echo "<table><form method=post action='post_mail.php'>\n";
|
||||
echo "<tr valign=top><td>From</td><td>".selectUser('mail_from')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>To</td><td>".selectUser('mail_to')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>Subject</td><td><input type=text name='mail_subject' size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr valign=top><td>Content</td><td><textarea name='mail_content' rows=20 cols=50></textarea></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit value='Send'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Rebuild a mail box<br>\n";
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td>User</td><td>".selectUser('user')."</td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit name='rebuild_mailbox' value='Rebuild'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
|
||||
|
||||
echo "Create a thread in a forum<br>\n";
|
||||
echo "<table><form method=post action='create_thread.php'>\n";
|
||||
echo "<tr valign=top><td>From</td><td>".selectUser('post_from')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>To</td><td>".selectUser('post_to')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>Subject</td><td><input type=text name='post_subject' size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr valign=top><td>Content</td><td><textarea name='post_content' rows=20 cols=50></textarea></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit value='Post'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Post a topic in a thread<br>\n";
|
||||
echo "<table><form method=post action='post.php'>\n";
|
||||
echo "<tr valign=top><td>From</td><td>".selectUser('post_from')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>To</td><td>".selectUser('post_to')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>Thread</td><td><input type=text name='post_thread' size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr valign=top><td>Content</td><td><textarea name='post_content' rows=20 cols=50></textarea></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit value='Post'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Rebuild a forum<br>\n";
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td>User</td><td>".selectUser('user')."</td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit name='rebuild_forum' value='Rebuild'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Rebuild a thread<br>\n";
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td>User</td><td>".selectUser('user')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>Thread</td><td><input type=text name='thread' size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit name='rebuild_thread' value='Rebuild'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "Remove a thread<br>\n";
|
||||
echo "<table><form method=post action='form_post.php'>\n";
|
||||
echo "<tr valign=top><td>User</td><td>".selectUser('user')."</td></tr>\n";
|
||||
echo "<tr valign=top><td>Thread</td><td><input type=text name='thread' size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr valign=top><td></td><td><input type=submit name='remove_thread' value='Remove'></td></tr>\n";
|
||||
echo "</form></table>\n";
|
||||
|
||||
echo "<br><hr><br>\n";
|
||||
|
||||
echo "</body>\n";
|
||||
echo "</html>\n";
|
||||
|
||||
?>
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
include_once('utils.php');
|
||||
|
||||
//
|
||||
// INPUT:
|
||||
//
|
||||
// $user_login login of the user that consults the forum
|
||||
// $shard shard from which the user connects in
|
||||
// $forum forum to view
|
||||
//
|
||||
|
||||
importParam('forum');
|
||||
importParam('page');
|
||||
|
||||
check_character_belongs_to_guild($user_login, $forum);
|
||||
|
||||
$forum_dir = build_user_dir($forum, $shard);
|
||||
|
||||
$fname = $forum_dir.'forum'.(isset($page) && $page!="" && $page!="0" ? "_$page" : '').'.html';
|
||||
if (!file_exists($fname))
|
||||
{
|
||||
include_once('thread_utils.php');
|
||||
build_forum_page($forum);
|
||||
}
|
||||
|
||||
$f = fopen($fname, 'r');
|
||||
echo fread($f, filesize($fname));
|
||||
fclose($f);
|
||||
?>
|
@ -1,123 +0,0 @@
|
||||
<?php
|
||||
|
||||
$race = &$_GET['race'];
|
||||
$faction = &$_GET['faction'];
|
||||
$shard = &$_GET['shard'];
|
||||
$lang = &$_GET['lang'];
|
||||
$user_login = &$_GET['user_login'];
|
||||
$guild_name=&$_GET['guild_name'];
|
||||
$guild_name=str_replace('_',' ', $guild_name);
|
||||
|
||||
|
||||
include 'episode2_hof_outils.php';
|
||||
|
||||
$include_files = hof_init(array('episode2_valeurs_craft.hdt','episode2_valeurs_seuils.hdt'), 'episode2_hof_noms_%lang%.php');
|
||||
foreach ($include_files as $include_file)
|
||||
{
|
||||
if (!@include $include_file)
|
||||
{
|
||||
//die('include file '.$include_file.' not found');
|
||||
exit();
|
||||
}
|
||||
}
|
||||
include 'episode2_hof_titles.php';
|
||||
|
||||
echo '<html>';
|
||||
echo '<head><title>'.$titre.'</title></head>';
|
||||
echo '<body bgcolor="#30353A">';
|
||||
|
||||
echo hof_tab_hgroup($tabs, 'chantier');
|
||||
echo '<br>';
|
||||
if ($faction=='karavan')
|
||||
{
|
||||
$tmp_item1_max = ${"maxSocle".$race};
|
||||
$tmp_item1_cur = ${"Socle".$race};
|
||||
$item1_percent = min($tmp_item1_cur, $tmp_item1_max) * 100 / $tmp_item1_max;
|
||||
$tmp_item2_max = ${"maxColonne".$race};
|
||||
$tmp_item2_cur = ${"Colonne".$race};
|
||||
$item2_percent = min($tmp_item2_cur, $tmp_item2_max) * 100 / $tmp_item2_max;
|
||||
$tmp_item3_max = ${"maxComble".$race};
|
||||
$tmp_item3_cur = ${"Comble".$race};
|
||||
$item3_percent = min($tmp_item3_cur, $tmp_item3_max) * 100 / $tmp_item3_max;
|
||||
$tmp_item4_max = ${"maxMuraille".$race};
|
||||
$tmp_item4_cur = ${"Muraille".$race};
|
||||
$item4_percent = min($tmp_item4_cur, $tmp_item4_max) * 100 / $tmp_item4_max;
|
||||
$tmp_item5_max = ${"maxRevetement".$race};
|
||||
$tmp_item5_cur = ${"Revetement".$race};
|
||||
$item5_percent = min($tmp_item5_cur, $tmp_item5_max) * 100 / $tmp_item5_max;
|
||||
$tmp_item6_max = ${"maxOrnement".$race};
|
||||
$tmp_item6_cur = ${"Ornement".$race};
|
||||
$item6_percent = min($tmp_item6_cur, $tmp_item6_max) * 100 / $tmp_item6_max;
|
||||
$tmp_item7_max = ${"maxStatue".$race};
|
||||
$tmp_item7_cur = ${"Statue".$race};
|
||||
$item7_percent = min($tmp_item7_cur, $tmp_item7_max) * 100 / $tmp_item7_max;
|
||||
$tmp_main_max = ${"maxJustice".$race};
|
||||
$tmp_main_cur = ${"Justice".$race};
|
||||
$main_percent = min($tmp_main_cur, $tmp_main_max) * 100 / $tmp_main_max;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp_item1_max = ${"maxRacine".$race};
|
||||
$tmp_item1_cur = ${"Racine".$race};
|
||||
$item1_percent = min($tmp_item1_cur, $tmp_item1_max) * 100 / $tmp_item1_max;
|
||||
$tmp_item2_max = ${"maxTronc".$race};
|
||||
$tmp_item2_cur = ${"Tronc".$race};
|
||||
$item2_percent = min($tmp_item2_cur, $tmp_item2_max) * 100 / $tmp_item2_max;
|
||||
$tmp_item3_max = ${"maxFibre".$race};
|
||||
$tmp_item3_cur = ${"Fibre".$race};
|
||||
$item3_percent = min($tmp_item3_cur, $tmp_item3_max) * 100 / $tmp_item3_max;
|
||||
$tmp_item4_max = ${"maxEcorce".$race};
|
||||
$tmp_item4_cur = ${"Ecorce".$race};
|
||||
$item4_percent = min($tmp_item4_cur, $tmp_item4_max) * 100 / $tmp_item4_max;
|
||||
$tmp_item5_max = ${"maxFeuille".$race};
|
||||
$tmp_item5_cur = ${"Feuille".$race};
|
||||
$item5_percent = min($tmp_item5_cur, $tmp_item5_max) * 100 / $tmp_item5_max;
|
||||
$tmp_item6_max = ${"maxFleur".$race};
|
||||
$tmp_item6_cur = ${"Fleur".$race};
|
||||
$item6_percent = min($tmp_item6_cur, $tmp_item6_max) * 100 / $tmp_item6_max;
|
||||
$tmp_item7_max = ${"maxSymbole".$race};
|
||||
$tmp_item7_cur = ${"Symbole".$race};
|
||||
$item7_percent = min($tmp_item7_cur, $tmp_item7_max) * 100 / $tmp_item7_max;
|
||||
$tmp_main_max = ${"maxNoyau".$race};
|
||||
$tmp_main_cur = ${"Noyau".$race};
|
||||
$main_percent = min($tmp_main_cur, $tmp_main_max) * 100 / $tmp_main_max;
|
||||
}
|
||||
$total_percent= ($item1_percent+$item2_percent+$item3_percent+$item4_percent+$item5_percent+$item6_percent+$item7_percent+$main_percent)/8;
|
||||
|
||||
echo '<table nowrap cellspacing=10 width=100% align="center"><tr><td height=5 bgcolor="#101112"></td></tr><tr><td><table nowrap cellspacing=10 width=100% align="center">';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right"><H2>'.$txt_progress_batiment.'</H2></td><td width=300 align="left">'.hof_progress_bar_huge($total_percent).'</td><td width=25></td></tr></table><table nowrap cellspacing=10 width=100% align="center">';
|
||||
if ($noActe == 1)
|
||||
{
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece1.' </td><td width=300 align="left">'.hof_progress_bar($item1_percent,1).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece2.' </td><td width=300 align="left">'.hof_progress_bar($item2_percent,1).'</td><td width=25></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece1.' </td><td width=300 align="left">'.hof_progress_bar($item1_percent,0).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece2.' </td><td width=300 align="left">'.hof_progress_bar($item2_percent,0).'</td><td width=25></td></tr>';
|
||||
if($noActe == 2)
|
||||
{
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece3.' </td><td width=300 align="left">'.hof_progress_bar($item3_percent,1).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece4.' </td><td width=300 align="left">'.hof_progress_bar($item4_percent,1).'</td><td width=25></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece3.' </td><td width=300 align="left">'.hof_progress_bar($item3_percent,0).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece4.' </td><td width=300 align="left">'.hof_progress_bar($item4_percent,0).'</td><td width=25></td></tr>';
|
||||
if($noActe == 3)
|
||||
{
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece5.' </td><td width=300 align="left">'.hof_progress_bar($item5_percent,1).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece6.' </td><td width=300 align="left">'.hof_progress_bar($item6_percent,1).'</td><td width=25></td></tr>';
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right">'.$txt_piece7.' </td><td width=300 align="left">'.hof_progress_bar($item7_percent,1).'</td><td width=25></td></tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<tr><td width=25></td><td width=300 valign="middle" align="right"><b>'.$txt_piece8.'</b> </td><td width=300 align="left">'.hof_progress_bar($main_percent,1).'</td><td width=25></td></tr></table>';
|
||||
echo '<tr><td height=5 bgcolor="#101112"></td></tr></table>';
|
||||
|
||||
|
||||
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
|
||||
?>
|
@ -1,189 +0,0 @@
|
||||
<?php
|
||||
|
||||
$race = &$_GET['race'];
|
||||
$faction = &$_GET['faction'];
|
||||
$shard = &$_GET['shard'];
|
||||
$lang = &$_GET['lang'];
|
||||
$user_login = &$_GET['user_login'];
|
||||
$guild_name = $_GET['guild_name'];
|
||||
$guild_name = str_replace('_', ' ', $guild_name);
|
||||
$type = &$_GET['type'];
|
||||
$tableau = &$_GET['tableau'];
|
||||
|
||||
// Number of entries in the top
|
||||
$top_len = 10;
|
||||
|
||||
// Profile the include time
|
||||
$WANT_PROFILE = 0;
|
||||
function microtime_float()
|
||||
{
|
||||
list($usec, $sec) = explode(" ", microtime());
|
||||
return ((float)$usec + (float)$sec);
|
||||
}
|
||||
if ($WANT_PROFILE)
|
||||
{
|
||||
$time_start = microtime_float();
|
||||
}
|
||||
|
||||
// Includes
|
||||
include 'episode2_hof_outils.php';
|
||||
|
||||
$hdt_files = array(
|
||||
'episode2_top10_faction_'.$type.'.hdt',
|
||||
'episode2_top10_faction_guild_'.$type.'.hdt',
|
||||
'episode2_top10_guild_'.$type.'.hdt',
|
||||
'episode2_top10_faction_guild_'.$type.'_'.$race.'.hdt',
|
||||
'episode2_top10_faction_acte_guild_'.$type.'_'.$race.'.hdt',
|
||||
'episode2_top10_'.$type.'.hdt',
|
||||
'episode2_top10_faction_'.$type.'_'.$race.'.hdt',
|
||||
'episode2_top10_faction_acte_'.$type.'_'.$race.'.hdt',
|
||||
'episode2_valeurs_seuils.hdt'
|
||||
);
|
||||
|
||||
$include_files = hof_init($hdt_files, 'episode2_hof_noms_%lang%.php');
|
||||
|
||||
foreach ($include_files as $include_file)
|
||||
{
|
||||
if (!@include $include_file)
|
||||
{
|
||||
die('include file '.$include_file.' not found');
|
||||
}
|
||||
}
|
||||
|
||||
include 'episode2_hof_titles.php';
|
||||
include 'episode2_hof_tableaux.php';
|
||||
|
||||
if ($WANT_PROFILE)
|
||||
{
|
||||
$time = microtime_float()- $time_start;
|
||||
echo '<br>PROFILE: include time = '.$time.'<br>';
|
||||
}
|
||||
|
||||
if ($type == 'fight')
|
||||
$type_uppercase = 'Kill';
|
||||
else
|
||||
$type_uppercase = ucfirst($type);
|
||||
|
||||
echo '<html>';
|
||||
echo '<head><title>'.$titre.'</title></head>';
|
||||
echo '<body bgcolor="#30353A">';
|
||||
|
||||
echo '<table width=825><tr><td>';
|
||||
echo hof_tab_hgroup($tabs,$type);
|
||||
echo '</td></tr><tr><td height=5 bgcolor="#101112"></td></tr><tr><td height=20></td></tr><tr><td align="center"><H1>'.${'classement_'.$type}.'</H1></td></tr><tr><td>';
|
||||
echo hof_tab_hgroup_tableaux($tabs_tableaux,$tableau);
|
||||
echo '</td></tr><tr><td height=5 bgcolor="#101112"></td></tr><tr><td height=20></td></tr><tr><td valign="middle" align="center"><table border=0 align="center"><tr><td align=center valign="top"><h2>'.$classement_player.'</h2></td></tr><tr><td height=30></td></tr><tr><td align=center valign="top"><h2>'.$main_title.'</h2></td></tr><tr><td valign="middle" align="center"><h3>'.$titre_tableau_player.'</h3></td></tr></table></td></tr><tr><td height=10></td></tr><tr><td align="center">'.$comment_tableau_player.'</td></tr><tr><td height=10></td></tr>';
|
||||
echo '<tr><td height=3></td></tr><tr><td align="center">';
|
||||
echo '<tr><td>';
|
||||
|
||||
// Top players
|
||||
////
|
||||
if ($tableau == 'total')
|
||||
{
|
||||
$j = 0;
|
||||
$k = 0;
|
||||
$nb_rows_kami = count(${'score_Top10_Best_'.$type_uppercase.'_kami'});
|
||||
$nb_rows_karavan = count(${'score_Top10_Best_'.$type_uppercase.'_karavan'});
|
||||
$nb_rows = $nb_rows_kami + $nb_rows_karavan;
|
||||
|
||||
$names = array();
|
||||
$scores = array();
|
||||
$factions = array();
|
||||
for ($i = 0; $i < $nb_rows; $i++)
|
||||
{
|
||||
if ($j < $nb_rows_kami && ($k >= $nb_rows_karavan || ${'score_Top10_Best_'.$type_uppercase.'_kami'}[$j] >= ${'score_Top10_Best_'.$type_uppercase.'_karavan'}[$k]))
|
||||
{
|
||||
$names[$i] = ${'nom_Top10_Best_'.$type_uppercase.'_kami'}[$j];
|
||||
$scores[$i] = ${'score_Top10_Best_'.$type_uppercase.'_kami'}[$j];
|
||||
$factions[$i] = 'Kami';
|
||||
$j++;
|
||||
}
|
||||
else if ($k < $nb_rows_karavan && ($j >= $nb_rows_kami || ${'score_Top10_Best_'.$type_uppercase.'_karavan'}[$k] > ${'score_Top10_Best_'.$type_uppercase.'_kami'}[$j]))
|
||||
{
|
||||
$names[$i] = ${'nom_Top10_Best_'.$type_uppercase.'_karavan'}[$k];
|
||||
$scores[$i] = ${'score_Top10_Best_'.$type_uppercase.'_karavan'}[$k];
|
||||
$factions[$i] = 'Karavan';
|
||||
$k++;
|
||||
}
|
||||
}
|
||||
echo hof_score_table($names, $factions, $scores, $top_len, $user_login);
|
||||
}
|
||||
else if ($tableau == 'faction')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_faction_'.$type_uppercase.'_'.$faction;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $user_login);
|
||||
}
|
||||
else if ($tableau == 'chantier')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_'.$type_uppercase.'_'.$race.'_'.$faction;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $user_login);
|
||||
}
|
||||
else if ($tableau == 'acte')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_'.$type_uppercase.'_'.$race.'_'.$faction.'_Acte'.$noActe;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $user_login);
|
||||
}
|
||||
|
||||
echo '</td></tr><tr><td height=20></td></tr><tr><td height=5 bgcolor="#101112"></td></tr><tr><td height=20></td></tr><tr><td valign="middle" align="center"><table border=0 align="center"><tr><td align=center valign="top"><h2>'.$classement_guild.'</h2></td></tr><tr><td height=30></td></tr><tr><tr><td align=center valign="top"><h2>'.$main_title.'</h2></td></tr><tr><td valign="middle" align="center"><h3>'.$titre_tableau_guild.'</h3></td></tr></table></td></tr><tr><td height=10></td></tr><tr><td align="center">'.$comment_tableau_guild.'</td></tr><tr><td height=10></td></tr>';
|
||||
echo '<tr><td>';
|
||||
|
||||
// Top guilds
|
||||
////
|
||||
if ($tableau == 'total')
|
||||
{
|
||||
$j = 0;
|
||||
$k = 0;
|
||||
$nb_rows_kami = count(${'score_Top10_Best_Guild_'.$type_uppercase.'_kami'});
|
||||
$nb_rows_karavan = count(${'score_Top10_Best_Guild_'.$type_uppercase.'_karavan'});
|
||||
$nb_rows = $nb_rows_kami + $nb_rows_karavan;
|
||||
|
||||
$names = array();
|
||||
$scores = array();
|
||||
$factions = array();
|
||||
for ($i = 0; $i < $nb_rows; $i++)
|
||||
{
|
||||
if ($j < $nb_rows_kami && ($k >= $nb_rows_karavan || ${'score_Top10_Best_Guild_'.$type_uppercase.'_kami'}[$j] >= ${'score_Top10_Best_Guild_'.$type_uppercase.'_karavan'}[$k]))
|
||||
{
|
||||
$names[$i] = ${'nom_Top10_Best_Guild_'.$type_uppercase.'_kami'}[$j];
|
||||
$scores[$i] = ${'score_Top10_Best_Guild_'.$type_uppercase.'_kami'}[$j];
|
||||
$factions[$i] = 'Kami';
|
||||
$j++;
|
||||
}
|
||||
else if ($k < $nb_rows_karavan && ($j >= $nb_rows_kami || ${'score_Top10_Best_Guild_'.$type_uppercase.'_karavan'}[$k] > ${'score_Top10_Best_Guild_'.$type_uppercase.'_kami'}[$j]))
|
||||
{
|
||||
$names[$i] = ${'nom_Top10_Best_Guild_'.$type_uppercase.'_karavan'}[$k];
|
||||
$scores[$i] = ${'score_Top10_Best_Guild_'.$type_uppercase.'_karavan'}[$k];
|
||||
$factions[$i] = 'Karavan';
|
||||
$k++;
|
||||
}
|
||||
}
|
||||
echo hof_score_table($names, $factions, $scores, $top_len, $guild_name);
|
||||
}
|
||||
else if ($tableau == 'faction')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_Guild_faction_'.$type_uppercase.'_'.$faction;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $guild_name);
|
||||
}
|
||||
else if ($tableau == 'chantier')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_Guild_'.$type_uppercase.'_'.$race.'_'.$faction;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $guild_name);
|
||||
}
|
||||
else if ($tableau == 'acte')
|
||||
{
|
||||
$varname_suffix = '_Top10_Best_Guild_'.$type_uppercase.'_'.$race.'_'.$faction.'_Acte'.$noActe;
|
||||
echo hof_score_table_same_faction(${'nom'.$varname_suffix}, $faction, ${'score'.$varname_suffix}, $top_len, $guild_name);
|
||||
}
|
||||
|
||||
echo '</td></tr><tr><td height=20></td></tr></table>';
|
||||
|
||||
if ($WANT_PROFILE)
|
||||
{
|
||||
$time = microtime_float()- $time_start;
|
||||
echo '<br>PROFILE: total time = '.$time.'<br>';
|
||||
}
|
||||
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
|
||||
?>
|
@ -1,345 +0,0 @@
|
||||
<?php
|
||||
|
||||
include_once('../config.php');
|
||||
|
||||
function hof_init($hdt_files, $txt_files)
|
||||
{
|
||||
$include_files = array();
|
||||
|
||||
if (!is_array($hdt_files))
|
||||
$hdt_files = array($hdt_files);
|
||||
|
||||
if (!is_array($txt_files))
|
||||
{
|
||||
if($txt_files!='')
|
||||
$txt_files = array($txt_files);
|
||||
}
|
||||
|
||||
if (!isset($_GET['shard']))
|
||||
die('shard is missing');
|
||||
|
||||
$shard = &$_GET['shard'];
|
||||
if (!is_numeric($shard))
|
||||
die('shard is invalid');
|
||||
|
||||
foreach ($hdt_files as $hdt_file)
|
||||
{
|
||||
global $USERS_DIR;
|
||||
|
||||
$include_files[] = $USERS_DIR.'/'.strtolower($shard).'/'.str_replace('.hdt', '.php', $hdt_file);
|
||||
}
|
||||
|
||||
if (isset($_GET['lang']))
|
||||
{
|
||||
$lang = &$_GET['lang'];
|
||||
if ($lang != 'fr' && $lang != 'en' && $lang != 'de')
|
||||
die('invalid lang');
|
||||
}
|
||||
else
|
||||
$lang = 'en';
|
||||
|
||||
if (is_array($txt_files))
|
||||
{
|
||||
foreach ($txt_files as $txt_file)
|
||||
{
|
||||
$include_files[] = str_replace('%lang%', $lang, $txt_file);
|
||||
}
|
||||
}
|
||||
|
||||
return $include_files;
|
||||
}
|
||||
|
||||
function hof_score_table($names, $factions, $scores, $max_rows, $highlight_name)
|
||||
{
|
||||
if ($_GET['faction'] == 'kami')
|
||||
{
|
||||
$color_tab = '#1A807F';
|
||||
$color_tab_bis = '#3E9D9C';
|
||||
$color_tab_titles = '#242E2E';
|
||||
$color_highlight = '#922121';
|
||||
}
|
||||
else if ($_GET['faction'] == 'karavan')
|
||||
{
|
||||
$color_tab = '#922121';
|
||||
$color_tab_bis = '#A04747';
|
||||
$color_tab_titles = '#322727';
|
||||
$color_highlight = '#1A807F';
|
||||
}
|
||||
|
||||
if ($_GET['lang'] == 'fr')
|
||||
{
|
||||
$txt_position = 'POSITION';
|
||||
$txt_name = 'NOM';
|
||||
$txt_faction = 'FACTION';
|
||||
$txt_score = 'SCORE';
|
||||
}
|
||||
else if ($_GET['lang'] == 'en')
|
||||
{
|
||||
$txt_position = 'POSITION';
|
||||
$txt_name = 'NAME';
|
||||
$txt_faction = 'FACTION';
|
||||
$txt_score = 'SCORE';
|
||||
}
|
||||
else if ($_GET['lang'] == 'de')
|
||||
{
|
||||
$txt_position = 'PLATZ';
|
||||
$txt_name = 'NAME';
|
||||
$txt_faction = 'FRAKTION';
|
||||
$txt_score = 'PUNKTE';
|
||||
}
|
||||
|
||||
$nb_rows = count($names);
|
||||
if ($nb_rows == 0)
|
||||
return '';
|
||||
if (count($factions) != $nb_rows || count($scores) != $nb_rows)
|
||||
die('wrong params: different nb of rows');
|
||||
|
||||
if ($max_rows > $nb_rows)
|
||||
$max_rows = $nb_rows;
|
||||
|
||||
$found_names = array();
|
||||
$top_names = array();
|
||||
$top_factions = array();
|
||||
$top_scores = array();
|
||||
$top_colors = array();
|
||||
$nb_top_rows = 0;
|
||||
$top_index = 0;
|
||||
$found_hl_name_in_top = false;
|
||||
foreach ($names as $i => $name)
|
||||
{
|
||||
if ($top_index < $max_rows)
|
||||
{
|
||||
if (!isset($found_names[strtolower($name)]))
|
||||
{
|
||||
$found_names[strtolower($name)] = true;
|
||||
if (strtolower($name) == strtolower($highlight_name))
|
||||
{
|
||||
$line_color = $color_highlight;
|
||||
$found_hl_name_in_top = true;
|
||||
}
|
||||
else if ($top_index % 2 == 0)
|
||||
$line_color = $color_tab_bis;
|
||||
else
|
||||
$line_color = $color_tab;
|
||||
|
||||
$top_names[$top_index] = $name;
|
||||
$top_factions[$top_index] = $factions[$i];
|
||||
$top_scores[$top_index] = $scores[$i];
|
||||
$top_colors[$top_index] = $line_color;
|
||||
$top_index++;
|
||||
$nb_top_rows = $top_index;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($found_hl_name_in_top)
|
||||
break;
|
||||
|
||||
if (!isset($found_names[strtolower($name)]))
|
||||
{
|
||||
$found_names[strtolower($name)] = true;
|
||||
if (strtolower($name) == strtolower($highlight_name))
|
||||
{
|
||||
$top_names[$top_index] = $name;
|
||||
$top_factions[$top_index] = $factions[$i];
|
||||
$top_scores[$top_index] = $scores[$i];
|
||||
$top_colors[$top_index] = $color_highlight;
|
||||
break;
|
||||
}
|
||||
$top_index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$vsep = '<td width=2 bgcolor="#101112"></td>';
|
||||
$hsep = '<tr bgcolor="#101112"><td height=2></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>';
|
||||
|
||||
$res = '<table width=608 bgcolor="#101112" align="center" valign="middle"><tr><td height=8 width=5></td><td width=600></td><td width=5></td></tr>';
|
||||
$res .= '<tr><td></td><td align="center"><table bgcolor="'.$color_tab.'" width=591 border=0>';
|
||||
$res .= '<tr align="center" valign="middle" bgcolor="'.$color_tab_titles.'">';
|
||||
$res .= '<td width=85 height=20><H5>'.$txt_position.'</H5></td>'.$vsep;
|
||||
$res .= '<td width=150><H5>'.$txt_name.'</H5></td>'.$vsep;
|
||||
$res .= '<td width=150><H5>'.$txt_faction.'</H5></td>'.$vsep;
|
||||
$res .= '<td width=200><H5>'.$txt_score.'</H5></td></tr>'.$hsep;
|
||||
|
||||
$previous_i = -1;
|
||||
foreach ($top_names as $i => $name)
|
||||
{
|
||||
$score = $top_scores[$i];
|
||||
$faction = $top_factions[$i];
|
||||
$line_color = $top_colors[$i];
|
||||
|
||||
if ($previous_i == $nb_top_rows - 1)
|
||||
{
|
||||
$res .= $hsep;
|
||||
if ($i > $nb_top_rows)
|
||||
{
|
||||
$res .= '<tr bgcolor="'.$color_tab_titles.'" align="center" valign="middle"><td height=20>...</td>'.$vsep.'<td>...</td>'.$vsep.'<td>...</td>'.$vsep.'<td>...</td></tr>';
|
||||
$res .= $hsep;
|
||||
}
|
||||
}
|
||||
|
||||
$res .= '<tr bgcolor="'.$line_color.'" align="center" valign="middle">';
|
||||
$res .= '<td height=20>'.($i+1).'</td>'.$vsep.'<td>'.$name.'</td>'.$vsep.'<td>'.$faction.'</td>'.$vsep.'<td>'.$score.'</td>';
|
||||
$res .= '</tr>';
|
||||
|
||||
if ($i + 1 < $nb_top_rows)
|
||||
$res .= $hsep;
|
||||
|
||||
$previous_i = $i;
|
||||
}
|
||||
|
||||
$res .= '</table></td><td></td></tr><tr><td height=8 width=5></td><td width=600></td><td width=5></td></tr></table>';
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_score_table_same_faction($names, $faction, $scores, $max_rows, $highlight_name)
|
||||
{
|
||||
$faction = ucfirst($faction);
|
||||
$factions = array();
|
||||
foreach ($names as $i => $name)
|
||||
$factions[$i] = $faction;
|
||||
return hof_score_table($names, $factions, $scores, $max_rows, $highlight_name);
|
||||
}
|
||||
|
||||
function hof_progress_bar($percent, $termine, $width=200, $height=10, $left_color='#0D0D0D', $right_color='#281F1A')
|
||||
{
|
||||
if (is_float($percent) || is_double($percent))
|
||||
$percent = (int)$percent;
|
||||
|
||||
if (!is_int($percent))
|
||||
die('invalid arg');
|
||||
|
||||
if ($percent > 100)
|
||||
$percent = 100;
|
||||
|
||||
$left_text = $percent;
|
||||
$right_text = '';
|
||||
if ($percent > 0)
|
||||
{
|
||||
if ($percent < 30)
|
||||
$left_color='#9B1515';
|
||||
else if ($percent < 70)
|
||||
$left_color='#A6AE25';
|
||||
else if ($percent < 100)
|
||||
$left_color='#108E42';
|
||||
else
|
||||
$left_color='#1442DA';
|
||||
//if ($termine == 0)
|
||||
// $left_color='#0D0D0D';
|
||||
|
||||
$res = '<table width='.$width.'><tr>';
|
||||
$res .= '<td bgcolor="'.$left_color.'" width="'.$percent.' %" height='.$height.' valign="middle" align="center">'.$left_text.'%</td>';
|
||||
$res .= '<td bgcolor="'.$right_color.'">'.$right_text.'</td>';
|
||||
$res .= '</tr></table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$left_color='#281F1A';
|
||||
$res = '<table width='.$width.'><tr>';
|
||||
$res .= '<td bgcolor="'.$left_color.'" width="100 %" height='.$height.' valign="middle" align="center">0%</td>';
|
||||
$res .= '</tr></table>';
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_progress_bar_huge($percent, $width=200, $height=25, $left_color='#077F64', $right_color='#281F1A')
|
||||
{
|
||||
if (is_float($percent) || is_double($percent))
|
||||
$percent = (int)$percent;
|
||||
|
||||
if (!is_int($percent))
|
||||
die('invalid arg');
|
||||
|
||||
if ($percent > 100)
|
||||
$percent = 100;
|
||||
|
||||
$left_text = $percent;
|
||||
$right_text = '';
|
||||
if ($percent > 0)
|
||||
{
|
||||
if ($percent < 30)
|
||||
$left_color='#9B1515';
|
||||
else if ($percent < 70)
|
||||
$left_color='#A6AE25';
|
||||
else if ($percent < 100)
|
||||
$left_color='#108E42';
|
||||
else
|
||||
$left_color='#1442DA';
|
||||
|
||||
$res = '<table width='.$width.'><tr>';
|
||||
$res .= '<td bgcolor="'.$left_color.'" width="'.$percent.' %" height='.$height.' valign="middle" align="center">'.$left_text.'%</td>';
|
||||
$res .= '<td bgcolor="'.$right_color.'">'.$right_text.'</td>';
|
||||
$res .= '</tr></table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$left_color='#281F1A';
|
||||
$res = '<table width='.$width.'><tr>';
|
||||
$res .= '<td bgcolor="'.$left_color.'" width="100 %" height='.$height.' valign="middle" align="center">0%</td>';
|
||||
$res .= '</tr></table>';
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_link($url, $text)
|
||||
{
|
||||
$res = '<a href="'.$url.'">'.$text.'</a>';
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_margin_table($content, $margin)
|
||||
{
|
||||
$res = '<table border='.$margin.'><tr><td>'.$content.'</td></tr></table>';
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_tab($url, $text)
|
||||
{
|
||||
$res = array();
|
||||
$res['inactive'] = hof_link($url, $text);
|
||||
$res['active'] = $text;
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_tab_hgroup($tabs, $active_tab_id)
|
||||
{
|
||||
$res = '<table valign="middle" width=825 align="center" cellspacing=20><tr><td width=7></td>';
|
||||
foreach ($tabs as $tab_id => $tab)
|
||||
{
|
||||
if ($tab_id == $active_tab_id)
|
||||
$content = $tab['active'];
|
||||
else
|
||||
$content = $tab['inactive'];
|
||||
|
||||
$res .= '<td width=120 bgcolor="#101112"><H1>'.hof_margin_table($content, 8).'</H1></td><td width=7></td>';
|
||||
}
|
||||
$res .= '</tr><td width=7></td></table>';
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function hof_tab_hgroup_tableaux($tabs, $active_tab_id)
|
||||
{
|
||||
$res = '<table valign="middle" width=825 align="center" cellspacing=20><tr><td width=100></td>';
|
||||
foreach ($tabs as $tab_id => $tab)
|
||||
{
|
||||
if ($tab_id == $active_tab_id)
|
||||
$content = $tab['active'];
|
||||
else
|
||||
$content = $tab['inactive'];
|
||||
|
||||
if ($content == 'chantier')
|
||||
$res .= '<td width=90 bgcolor="#101112"><H5>'.hof_margin_table($content, 8).'</H5></td><td width=10 bgcolor="#101112"></td>';
|
||||
else
|
||||
$res .= '<td width=90 bgcolor="#101112"><H5>'.hof_margin_table($content, 8).'</H5></td><td width=10></td>';
|
||||
}
|
||||
$res .= '</tr><td width=100></td></table>';
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
?>
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
$guild_name_http = str_replace(' ', '_', $guild_name);
|
||||
|
||||
$tabs_tableaux = array(
|
||||
'total' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type='.$type.'&race='.$race.'&guild_name='.$guild_name_http.'&tableau=total', $txt_tab_total),
|
||||
'faction' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type='.$type.'&race='.$race.'&guild_name='.$guild_name_http.'&tableau=faction', $txt_tab_faction),
|
||||
'chantier' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type='.$type.'&race='.$race.'&guild_name='.$guild_name_http.'&tableau=chantier', $txt_tab_chantier),
|
||||
'acte' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type='.$type.'&race='.$race.'&guild_name='.$guild_name_http.'&tableau=acte', $txt_tab_acte)
|
||||
)
|
||||
?>
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
$guild_name_http = str_replace(' ', '_', $guild_name);
|
||||
if ($tableau == '')
|
||||
$tableau = 'total';
|
||||
|
||||
$tabs = array(
|
||||
'chantier' => hof_tab('episode2_hof_chantier.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type=chantier&race='.$race.'&guild_name='.$guild_name_http.'&noActe='.$noActe, $txt_tab_chantier),
|
||||
'craft' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type=craft&race='.$race.'&guild_name='.$guild_name_http.'&noActe='.$noActe.'&tableau='.$tableau, $txt_tab_craft),
|
||||
'harvest' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type=harvest&race='.$race.'&guild_name='.$guild_name_http.'&noActe='.$noActe.'&tableau='.$tableau, $txt_tab_harvest),
|
||||
'fight' => hof_tab('episode2_hof_classement.php?shard='.$shard.'&lang='.$lang.'&user_login='.$user_login.'&faction='.$faction.'&type=fight&race='.$race.'&guild_name='.$guild_name_http.'&noActe='.$noActe.'&tableau='.$tableau, $txt_tab_fight)
|
||||
)
|
||||
|
||||
?>
|
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (isset($_GET['lang']))
|
||||
{
|
||||
$lang = &$_GET['lang'];
|
||||
if ($lang != 'fr' && $lang != 'en' && $lang != 'de')
|
||||
die('invalid lang');
|
||||
}
|
||||
|
||||
$faction = &$_GET['faction'];
|
||||
$race = &$_GET['race'];
|
||||
$self = &$_SERVER['PHP_SELF'];
|
||||
$page_en_cours = &$_GET['page_en_cours'];
|
||||
if ($page_en_cours =='')
|
||||
$page_en_cours = 0;
|
||||
|
||||
|
||||
include 'episode2_textes_'.$faction.'_'.$lang.'.php';
|
||||
|
||||
function stele_menu_item($label, $page, $page_active, $page_en_cours)
|
||||
{
|
||||
global $self, $lang, $race, $faction;
|
||||
if ($page_en_cours!=$page_active)
|
||||
return '<a href="episode2_steles.php?lang='.$lang.'&page_en_cours='.$page_active.'&faction='.$faction.'&race='.$race.'&page='.$page.'">'.$label.'</a>';
|
||||
else return $label;
|
||||
|
||||
}
|
||||
if (isset($_GET['page']))
|
||||
$texte = $$_GET['page'];
|
||||
else
|
||||
$texte = $texteDefault;
|
||||
|
||||
echo '<html>';
|
||||
echo '<head><title>'.$titre.'</title></head>';
|
||||
echo '<body bgcolor="#30353A">';
|
||||
|
||||
if ($faction=='kami')
|
||||
$couleur='1A807F';
|
||||
else
|
||||
$couleur='922121';
|
||||
|
||||
echo '<table height=365><tr><td height=15></td></tr><tr><td width=200 align="center"><H1>'.${'TITLE_'.$faction}.'</H1></td></tr><tr><td height=30></td></tr><tr><td><table><tr><td height=10 bgcolor=#101112></td><td height=10 bgcolor=#101112><td height=10 bgcolor=#101112></td></td><td bgcolor=#101112></td><td bgcolor=#101112></td></tr><tr><td><table><tr><td width=10 height=328 bgcolor=#101112></td></tr><tr><td></td></tr></table></td></tr><td height=280 valign="top"><table height=285 align="center">';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center" width=290><H4>'.stele_menu_item($menu1, 'texte_stele_'.$faction.'_1',1 ,$page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu2, 'texte_stele_'.$faction.'_2',2, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu3, 'texte_stele_'.$faction.'_3',3, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu4, 'texte_stele_'.$faction.'_4',4, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu5, 'texte_stele_'.$faction.'_5',5, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu6, 'texte_stele_'.$faction.'_6',6, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu7, 'texte_stele_'.$faction.'_7',7, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item(${'menu8'.$race}, 'texte_stele_'.$faction.'_8'.$race,8, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu9, 'texte_stele_'.$faction.'_9',9, $page_en_cours).'</H4></td></tr><tr><td height=2 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td bgcolor=#'.$couleur.' valign="middle" height=30 align="center"><H4>'.stele_menu_item($menu10, 'texte_stele_'.$faction.'_10',10, $page_en_cours).'</H4></td></tr>';
|
||||
echo '<tr><td height=10 bgcolor=#101112></td></tr><tr><td height=150></td></tr></table></td><td width=10 bgcolor=#101112></td>';
|
||||
echo '<td width=500 align="center"><table><tr><td height=15></td></tr><tr>';
|
||||
if ($page_en_cours!=8 && $page_en_cours!=0)
|
||||
echo '<td align="center" height=10><H2>'.${'menu'.$page_en_cours}.'</H2><br></td>';
|
||||
else if ($page_en_cours!=0)
|
||||
echo '<td align="center" height=10><H2>'.${'menu'.$page_en_cours.$race}.'</H2><br></td>';
|
||||
echo '</tr><tr><td height=255 align="center" valign="top"><table><tr><td width=20></td><td>'.$texte.'</td><td width=20></td></table></td></tr></table></td><td width=10 bgcolor=#101112></td></tr>';
|
||||
echo '<tr><td height=10 ></td><td height=10 ></td><td height=10 bgcolor=#101112></td><td bgcolor=#101112></td><td bgcolor=#101112></td></tr></table></td></tr></table>';
|
||||
|
||||
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
|
||||
?>
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Craft_kami", "storyline.episode2.*.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Craft_kami", "storyline.episode2.*.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs crafteurs par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Craft_fyros_kami_Acte1", "storyline.episode2.fyros.kami.craft.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.craft.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_fyros_kami_Acte1", "storyline.episode2.fyros.kami.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_fyros_kami_Acte2", "storyline.episode2.fyros.kami.craft.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.craft.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_fyros_kami_Acte2", "storyline.episode2.fyros.kami.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_fyros_kami_Acte3", "storyline.episode2.fyros.kami.craft.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.craft.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_fyros_kami_Acte3", "storyline.episode2.fyros.kami.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs crafteurs par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Craft_matis_kami_Acte1", "storyline.episode2.matis.kami.craft.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_matis_karavan_Acte1", "storyline.episode2.matis.karavan.craft.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_matis_kami_Acte1", "storyline.episode2.matis.kami.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_matis_karavan_Acte1", "storyline.episode2.matis.karavan.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_matis_kami_Acte2", "storyline.episode2.matis.kami.craft.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_matis_karavan_Acte2", "storyline.episode2.matis.karavan.craft.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_matis_kami_Acte2", "storyline.episode2.matis.kami.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_matis_karavan_Acte2", "storyline.episode2.matis.karavan.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_matis_kami_Acte3", "storyline.episode2.matis.kami.craft.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_matis_karavan_Acte3", "storyline.episode2.matis.karavan.craft.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_matis_kami_Acte3", "storyline.episode2.matis.kami.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_matis_karavan_Acte3", "storyline.episode2.matis.karavan.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs crafteurs par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Craft_tryker_kami_Acte1", "storyline.episode2.tryker.kami.craft.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.craft.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_tryker_kami_Acte1", "storyline.episode2.tryker.kami.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_tryker_kami_Acte2", "storyline.episode2.tryker.kami.craft.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.craft.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_tryker_kami_Acte2", "storyline.episode2.tryker.kami.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_tryker_kami_Acte3", "storyline.episode2.tryker.kami.craft.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.craft.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_tryker_kami_Acte3", "storyline.episode2.tryker.kami.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs crafteurs par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Craft_zorai_kami_Acte1", "storyline.episode2.zorai.kami.craft.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.craft.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_zorai_kami_Acte1", "storyline.episode2.zorai.kami.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.craft.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_zorai_kami_Acte2", "storyline.episode2.zorai.kami.craft.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.craft.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_zorai_kami_Acte2", "storyline.episode2.zorai.kami.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.craft.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Craft_zorai_kami_Acte3", "storyline.episode2.zorai.kami.craft.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.craft.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_zorai_kami_Acte3", "storyline.episode2.zorai.kami.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.craft.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Kill_fyros_kami_Acte1", "storyline.episode2.fyros.kami.kill.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.kill.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_fyros_kami_Acte1", "storyline.episode2.fyros.kami.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_fyros_kami_Acte2", "storyline.episode2.fyros.kami.kill.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.kill.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_fyros_kami_Acte2", "storyline.episode2.fyros.kami.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_fyros_kami_Acte3", "storyline.episode2.fyros.kami.kill.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.kill.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_fyros_kami_Acte3", "storyline.episode2.fyros.kami.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Kill_matis_kami_Acte1", "storyline.episode2.matis.kami.kill.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_matis_karavan_Acte1", "storyline.episode2.matis.karavan.kill.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_matis_kami_Acte1", "storyline.episode2.matis.kami.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_matis_karavan_Acte1", "storyline.episode2.matis.karavan.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_matis_kami_Acte2", "storyline.episode2.matis.kami.kill.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_matis_karavan_Acte2", "storyline.episode2.matis.karavan.kill.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_matis_kami_Acte2", "storyline.episode2.matis.kami.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_matis_karavan_Acte2", "storyline.episode2.matis.karavan.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_matis_kami_Acte3", "storyline.episode2.matis.kami.kill.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_matis_karavan_Acte3", "storyline.episode2.matis.karavan.kill.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_matis_kami_Acte3", "storyline.episode2.matis.kami.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_matis_karavan_Acte3", "storyline.episode2.matis.karavan.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Kill_tryker_kami_Acte1", "storyline.episode2.tryker.kami.kill.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.kill.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_tryker_kami_Acte1", "storyline.episode2.tryker.kami.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_tryker_kami_Acte2", "storyline.episode2.tryker.kami.kill.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.kill.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_tryker_kami_Acte2", "storyline.episode2.tryker.kami.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_tryker_kami_Acte3", "storyline.episode2.tryker.kami.kill.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.kill.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_tryker_kami_Acte3", "storyline.episode2.tryker.kami.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Kill_zorai_kami_Acte1", "storyline.episode2.zorai.kami.kill.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.kill.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_zorai_kami_Acte1", "storyline.episode2.zorai.kami.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.kill.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_zorai_kami_Acte2", "storyline.episode2.zorai.kami.kill.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.kill.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_zorai_kami_Acte2", "storyline.episode2.zorai.kami.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.kill.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_zorai_kami_Acte3", "storyline.episode2.zorai.kami.kill.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.kill.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_zorai_kami_Acte3", "storyline.episode2.zorai.kami.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.kill.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs guildes crafteurs par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Guild_Craft_fyros_kami_Acte1", "storyline.episode2.fyros.kami.craft.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.craft.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_fyros_kami_Acte1", "storyline.episode2.fyros.kami.craft.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.craft.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_fyros_kami_Acte2", "storyline.episode2.fyros.kami.craft.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.craft.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_fyros_kami_Acte2", "storyline.episode2.fyros.kami.craft.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.craft.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_fyros_kami_Acte3", "storyline.episode2.fyros.kami.craft.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.craft.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_fyros_kami_Acte3", "storyline.episode2.fyros.kami.craft.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.craft.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs guildes crafteurs par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Guild_Craft_matis_kami_Acte1", "storyline.episode2.matis.kami.craft.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_matis_karavan_Acte1", "storyline.episode2.matis.karavan.craft.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_matis_kami_Acte1", "storyline.episode2.matis.kami.craft.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_matis_karavan_Acte1", "storyline.episode2.matis.karavan.craft.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_matis_kami_Acte2", "storyline.episode2.matis.kami.craft.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_matis_karavan_Acte2", "storyline.episode2.matis.karavan.craft.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_matis_kami_Acte2", "storyline.episode2.matis.kami.craft.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_matis_karavan_Acte2", "storyline.episode2.matis.karavan.craft.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_matis_kami_Acte3", "storyline.episode2.matis.kami.craft.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_matis_karavan_Acte3", "storyline.episode2.matis.karavan.craft.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_matis_kami_Acte3", "storyline.episode2.matis.kami.craft.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_matis_karavan_Acte3", "storyline.episode2.matis.karavan.craft.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs guildes crafteurs par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Guild_Craft_tryker_kami_Acte1", "storyline.episode2.tryker.kami.craft.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.craft.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_tryker_kami_Acte1", "storyline.episode2.tryker.kami.craft.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.craft.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_tryker_kami_Acte2", "storyline.episode2.tryker.kami.craft.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.craft.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_tryker_kami_Acte2", "storyline.episode2.tryker.kami.craft.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.craft.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_tryker_kami_Acte3", "storyline.episode2.tryker.kami.craft.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.craft.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_tryker_kami_Acte3", "storyline.episode2.tryker.kami.craft.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.craft.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
|
||||
// ==== Top 10 des meilleurs guildes crafteurs par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Guild_Craft_zorai_kami_Acte1", "storyline.episode2.zorai.kami.craft.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.craft.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_zorai_kami_Acte1", "storyline.episode2.zorai.kami.craft.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.craft.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_zorai_kami_Acte2", "storyline.episode2.zorai.kami.craft.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.craft.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_zorai_kami_Acte2", "storyline.episode2.zorai.kami.craft.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.craft.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_zorai_kami_Acte3", "storyline.episode2.zorai.kami.craft.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.craft.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_zorai_kami_Acte3", "storyline.episode2.zorai.kami.craft.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.craft.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Guild_Kill_fyros_kami_Acte1", "storyline.episode2.fyros.kami.kill.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.kill.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_fyros_kami_Acte1", "storyline.episode2.fyros.kami.kill.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.kill.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_fyros_kami_Acte2", "storyline.episode2.fyros.kami.kill.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.kill.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_fyros_kami_Acte2", "storyline.episode2.fyros.kami.kill.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.kill.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_fyros_kami_Acte3", "storyline.episode2.fyros.kami.kill.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.kill.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_fyros_kami_Acte3", "storyline.episode2.fyros.kami.kill.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.kill.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Guild_Kill_matis_kami_Acte1", "storyline.episode2.matis.kami.kill.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_matis_karavan_Acte1", "storyline.episode2.matis.karavan.kill.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_matis_kami_Acte1", "storyline.episode2.matis.kami.kill.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_matis_karavan_Acte1", "storyline.episode2.matis.karavan.kill.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_matis_kami_Acte2", "storyline.episode2.matis.kami.kill.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_matis_karavan_Acte2", "storyline.episode2.matis.karavan.kill.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_matis_kami_Acte2", "storyline.episode2.matis.kami.kill.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_matis_karavan_Acte2", "storyline.episode2.matis.karavan.kill.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_matis_kami_Acte3", "storyline.episode2.matis.kami.kill.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_matis_karavan_Acte3", "storyline.episode2.matis.karavan.kill.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_matis_kami_Acte3", "storyline.episode2.matis.kami.kill.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_matis_karavan_Acte3", "storyline.episode2.matis.karavan.kill.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Guild_Kill_tryker_kami_Acte1", "storyline.episode2.tryker.kami.kill.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.kill.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_tryker_kami_Acte1", "storyline.episode2.tryker.kami.kill.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.kill.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_tryker_kami_Acte2", "storyline.episode2.tryker.kami.kill.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.kill.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_tryker_kami_Acte2", "storyline.episode2.tryker.kami.kill.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.kill.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_tryker_kami_Acte3", "storyline.episode2.tryker.kami.kill.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.kill.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_tryker_kami_Acte3", "storyline.episode2.tryker.kami.kill.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.kill.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Guild_Kill_zorai_kami_Acte1", "storyline.episode2.zorai.kami.kill.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.kill.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_zorai_kami_Acte1", "storyline.episode2.zorai.kami.kill.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.kill.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_zorai_kami_Acte2", "storyline.episode2.zorai.kami.kill.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.kill.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_zorai_kami_Acte2", "storyline.episode2.zorai.kami.kill.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.kill.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_zorai_kami_Acte3", "storyline.episode2.zorai.kami.kill.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.kill.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_zorai_kami_Acte3", "storyline.episode2.zorai.kami.kill.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.kill.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_kami_Acte1", "storyline.episode2.fyros.kami.harvest.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.harvest.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_fyros_kami_Acte1", "storyline.episode2.fyros.kami.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_kami_Acte2", "storyline.episode2.fyros.kami.harvest.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.harvest.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_fyros_kami_Acte2", "storyline.episode2.fyros.kami.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_kami_Acte3", "storyline.episode2.fyros.kami.harvest.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.harvest.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_fyros_kami_Acte3", "storyline.episode2.fyros.kami.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Guild_Harvest_matis_kami_Acte1", "storyline.episode2.matis.kami.harvest.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_matis_karavan_Acte1", "storyline.episode2.matis.karavan.harvest.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_matis_kami_Acte1", "storyline.episode2.matis.kami.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_matis_karavan_Acte1", "storyline.episode2.matis.karavan.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_matis_kami_Acte2", "storyline.episode2.matis.kami.harvest.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_matis_karavan_Acte2", "storyline.episode2.matis.karavan.harvest.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_matis_kami_Acte2", "storyline.episode2.matis.kami.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_matis_karavan_Acte2", "storyline.episode2.matis.karavan.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_matis_kami_Acte3", "storyline.episode2.matis.kami.harvest.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_matis_karavan_Acte3", "storyline.episode2.matis.karavan.harvest.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_matis_kami_Acte3", "storyline.episode2.matis.kami.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_matis_karavan_Acte3", "storyline.episode2.matis.karavan.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_kami_Acte1", "storyline.episode2.tryker.kami.harvest.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.harvest.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_tryker_kami_Acte1", "storyline.episode2.tryker.kami.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_kami_Acte2", "storyline.episode2.tryker.kami.harvest.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.harvest.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_tryker_kami_Acte2", "storyline.episode2.tryker.kami.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_kami_Acte3", "storyline.episode2.tryker.kami.harvest.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.harvest.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_tryker_kami_Acte3", "storyline.episode2.tryker.kami.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_kami_Acte1", "storyline.episode2.zorai.kami.harvest.acte1", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.harvest.acte1", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_zorai_kami_Acte1", "storyline.episode2.zorai.kami.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.harvest.acte1", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_kami_Acte2", "storyline.episode2.zorai.kami.harvest.acte2", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.harvest.acte2", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_zorai_kami_Acte2", "storyline.episode2.zorai.kami.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.harvest.acte2", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_kami_Acte3", "storyline.episode2.zorai.kami.harvest.acte3", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.harvest.acte3", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_zorai_kami_Acte3", "storyline.episode2.zorai.kami.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.harvest.acte3", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//fyros
|
||||
"nom_Top10_Best_Harvest_fyros_kami_Acte1", "storyline.episode2.fyros.kami.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_fyros_kami_Acte1", "storyline.episode2.fyros.kami.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_fyros_karavan_Acte1", "storyline.episode2.fyros.karavan.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_fyros_kami_Acte2", "storyline.episode2.fyros.kami.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_fyros_kami_Acte2", "storyline.episode2.fyros.kami.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_fyros_karavan_Acte2", "storyline.episode2.fyros.karavan.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_fyros_kami_Acte3", "storyline.episode2.fyros.kami.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_fyros_kami_Acte3", "storyline.episode2.fyros.kami.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_fyros_karavan_Acte3", "storyline.episode2.fyros.karavan.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//matis
|
||||
"nom_Top10_Best_Harvest_matis_kami_Acte1", "storyline.episode2.matis.kami.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_matis_karavan_Acte1", "storyline.episode2.matis.karavan.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_matis_kami_Acte1", "storyline.episode2.matis.kami.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_matis_karavan_Acte1", "storyline.episode2.matis.karavan.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_matis_kami_Acte2", "storyline.episode2.matis.kami.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_matis_karavan_Acte2", "storyline.episode2.matis.karavan.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_matis_kami_Acte2", "storyline.episode2.matis.kami.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_matis_karavan_Acte2", "storyline.episode2.matis.karavan.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_matis_kami_Acte3", "storyline.episode2.matis.kami.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_matis_karavan_Acte3", "storyline.episode2.matis.karavan.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_matis_kami_Acte3", "storyline.episode2.matis.kami.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_matis_karavan_Acte3", "storyline.episode2.matis.karavan.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//tryker
|
||||
"nom_Top10_Best_Harvest_tryker_kami_Acte1", "storyline.episode2.tryker.kami.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_tryker_kami_Acte1", "storyline.episode2.tryker.kami.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_tryker_karavan_Acte1", "storyline.episode2.tryker.karavan.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_tryker_kami_Acte2", "storyline.episode2.tryker.kami.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_tryker_kami_Acte2", "storyline.episode2.tryker.kami.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_tryker_karavan_Acte2", "storyline.episode2.tryker.karavan.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_tryker_kami_Acte3", "storyline.episode2.tryker.kami.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_tryker_kami_Acte3", "storyline.episode2.tryker.kami.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_tryker_karavan_Acte3", "storyline.episode2.tryker.karavan.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs par faction (par chantier) par acte
|
||||
//zorai
|
||||
"nom_Top10_Best_Harvest_zorai_kami_Acte1", "storyline.episode2.zorai.kami.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.harvest.acte1", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_zorai_kami_Acte1", "storyline.episode2.zorai.kami.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_zorai_karavan_Acte1", "storyline.episode2.zorai.karavan.harvest.acte1", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_zorai_kami_Acte2", "storyline.episode2.zorai.kami.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.harvest.acte2", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_zorai_kami_Acte2", "storyline.episode2.zorai.kami.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_zorai_karavan_Acte2", "storyline.episode2.zorai.karavan.harvest.acte2", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_zorai_kami_Acte3", "storyline.episode2.zorai.kami.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.harvest.acte3", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_zorai_kami_Acte3", "storyline.episode2.zorai.kami.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_zorai_karavan_Acte3", "storyline.episode2.zorai.karavan.harvest.acte3", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_faction_Craft_kami", "storyline.episode2.*.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_faction_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_faction_Craft_kami", "storyline.episode2.*.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_faction_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Craft_fyros_kami", "storyline.episode2.fyros.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_fyros_karavan", "storyline.episode2.fyros.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_fyros_kami", "storyline.episode2.fyros.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_fyros_karavan", "storyline.episode2.fyros.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
|
||||
"nom_Top10_Best_Craft_matis_kami", "storyline.episode2.matis.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_matis_karavan", "storyline.episode2.matis.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_matis_kami", "storyline.episode2.matis.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_matis_karavan", "storyline.episode2.matis.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Craft_tryker_kami", "storyline.episode2.tryker.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_tryker_karavan", "storyline.episode2.tryker.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_tryker_kami", "storyline.episode2.tryker.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_tryker_karavan", "storyline.episode2.tryker.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Craft_zorai_kami", "storyline.episode2.zorai.kami.craft.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Craft_zorai_karavan", "storyline.episode2.zorai.karavan.craft.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Craft_zorai_kami", "storyline.episode2.zorai.kami.craft.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Craft_zorai_karavan", "storyline.episode2.zorai.karavan.craft.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_faction_Kill_kami", "storyline.episode2.*.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_faction_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_faction_Kill_kami", "storyline.episode2.*.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_faction_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Kill_fyros_kami", "storyline.episode2.fyros.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_fyros_karavan", "storyline.episode2.fyros.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_fyros_kami", "storyline.episode2.fyros.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_fyros_karavan", "storyline.episode2.fyros.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Kill_matis_kami", "storyline.episode2.matis.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_matis_karavan", "storyline.episode2.matis.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_matis_kami", "storyline.episode2.matis.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_matis_karavan", "storyline.episode2.matis.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Kill_tryker_kami", "storyline.episode2.tryker.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_tryker_karavan", "storyline.episode2.tryker.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_tryker_kami", "storyline.episode2.tryker.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_tryker_karavan", "storyline.episode2.tryker.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Kill_zorai_kami", "storyline.episode2.zorai.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Kill_zorai_karavan", "storyline.episode2.zorai.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Kill_zorai_kami", "storyline.episode2.zorai.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Kill_zorai_karavan", "storyline.episode2.zorai.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_faction_Craft_kami", "storyline.episode2.*.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_faction_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_faction_Craft_kami", "storyline.episode2.*.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_faction_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Craft_fyros_kami", "storyline.episode2.fyros.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_fyros_karavan", "storyline.episode2.fyros.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_fyros_kami", "storyline.episode2.fyros.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_fyros_karavan", "storyline.episode2.fyros.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Craft_matis_kami", "storyline.episode2.matis.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_matis_karavan", "storyline.episode2.matis.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_matis_kami", "storyline.episode2.matis.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_matis_karavan", "storyline.episode2.matis.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Craft_tryker_kami", "storyline.episode2.tryker.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_tryker_karavan", "storyline.episode2.tryker.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_tryker_kami", "storyline.episode2.tryker.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_tryker_karavan", "storyline.episode2.tryker.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Craft_zorai_kami", "storyline.episode2.zorai.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Craft_zorai_karavan", "storyline.episode2.zorai.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Craft_zorai_kami", "storyline.episode2.zorai.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_zorai_karavan", "storyline.episode2.zorai.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_faction_Kill_kami", "storyline.episode2.*.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_faction_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_faction_Kill_kami", "storyline.episode2.*.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_faction_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_Kill_fyros_kami", "storyline.episode2.fyros.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_fyros_karavan", "storyline.episode2.fyros.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_fyros_kami", "storyline.episode2.fyros.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_fyros_karavan", "storyline.episode2.fyros.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_Kill_matis_kami", "storyline.episode2.matis.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_matis_karavan", "storyline.episode2.matis.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_matis_kami", "storyline.episode2.matis.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_matis_karavan", "storyline.episode2.matis.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_Kill_tryker_kami", "storyline.episode2.tryker.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_tryker_karavan", "storyline.episode2.tryker.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_tryker_kami", "storyline.episode2.tryker.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_tryker_karavan", "storyline.episode2.tryker.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_Kill_zorai_kami", "storyline.episode2.zorai.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Kill_zorai_karavan", "storyline.episode2.zorai.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Kill_zorai_kami", "storyline.episode2.zorai.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_zorai_karavan", "storyline.episode2.zorai.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_faction_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_faction_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_faction_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_faction_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_kami", "storyline.episode2.fyros.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_fyros_karavan", "storyline.episode2.fyros.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_fyros_kami", "storyline.episode2.fyros.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_fyros_karavan", "storyline.episode2.fyros.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Harvest_matis_kami", "storyline.episode2.matis.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_matis_karavan", "storyline.episode2.matis.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_matis_kami", "storyline.episode2.matis.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_matis_karavan", "storyline.episode2.matis.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_kami", "storyline.episode2.tryker.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_tryker_karavan", "storyline.episode2.tryker.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_tryker_kami", "storyline.episode2.tryker.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_tryker_karavan", "storyline.episode2.tryker.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_kami", "storyline.episode2.zorai.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"nom_Top10_Best_Guild_Harvest_zorai_karavan", "storyline.episode2.zorai.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Guild_Harvest_zorai_kami", "storyline.episode2.zorai.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_zorai_karavan", "storyline.episode2.zorai.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_faction_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_faction_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_faction_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_faction_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Harvest_fyros_kami", "storyline.episode2.fyros.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_fyros_karavan", "storyline.episode2.fyros.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_fyros_kami", "storyline.episode2.fyros.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_fyros_karavan", "storyline.episode2.fyros.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Harvest_matis_kami", "storyline.episode2.matis.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_matis_karavan", "storyline.episode2.matis.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_matis_kami", "storyline.episode2.matis.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_matis_karavan", "storyline.episode2.matis.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Harvest_tryker_kami", "storyline.episode2.tryker.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_tryker_karavan", "storyline.episode2.tryker.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_tryker_kami", "storyline.episode2.tryker.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_tryker_karavan", "storyline.episode2.tryker.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Harvest_zorai_kami", "storyline.episode2.zorai.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"nom_Top10_Best_Harvest_zorai_karavan", "storyline.episode2.zorai.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
|
||||
"score_Top10_Best_Harvest_zorai_kami", "storyline.episode2.zorai.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_zorai_karavan", "storyline.episode2.zorai.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs killers de l'episode 2
|
||||
"nom_Top10_Best_Kill_kami", "storyline.episode2.*.kami.kill.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Kill_kami", "storyline.episode2.*.kami.kill.*", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs guildes crafteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Craft_kami", "storyline.episode2.*.kami.craft.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_kami", "storyline.episode2.*.kami.craft.*", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Craft_karavan", "storyline.episode2.*.karavan.craft.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs guildes killers de l'episode 2
|
||||
"nom_Top10_Best_Guild_Kill_kami", "storyline.episode2.*.kami.kill.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_kami", "storyline.episode2.*.kami.kill.*", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Kill_karavan", "storyline.episode2.*.karavan.kill.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs guildes harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Guild_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "GuildValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Guild_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "GuildName", "*", "Sum",
|
||||
"score_Top10_Best_Guild_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "GuildValue", "*", "Sum",
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
WildcardTables =
|
||||
{
|
||||
// ==== Top 10 des meilleurs harvesteurs de l'episode 2
|
||||
"nom_Top10_Best_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_kami", "storyline.episode2.*.kami.harvest.*", "PlayerValue", "*", "Sum",
|
||||
|
||||
"nom_Top10_Best_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "PlayerName", "*", "Sum",
|
||||
"score_Top10_Best_Harvest_karavan", "storyline.episode2.*.karavan.harvest.*", "PlayerValue", "*", "Sum",
|
||||
};
|
@ -1,79 +0,0 @@
|
||||
WildcardValues =
|
||||
{
|
||||
// ==== quantite craftee des elements de construction Fyros
|
||||
"Soclefyros", "storyline.episode2.fyros.socle.*", "Sum",
|
||||
"Colonnefyros", "storyline.episode2.fyros.colonne.*", "Sum",
|
||||
"Comblefyros", "storyline.episode2.fyros.comble.*", "Sum",
|
||||
"Muraillefyros", "storyline.episode2.fyros.muraille.*", "Sum",
|
||||
"Revetementfyros", "storyline.episode2.fyros.revetement.*", "Sum",
|
||||
"Ornementfyros", "storyline.episode2.fyros.ornement.*", "Sum",
|
||||
"Statuefyros", "storyline.episode2.fyros.statue.*", "Sum",
|
||||
"Justicefyros", "storyline.episode2.fyros.colonne_justice.*", "Sum",
|
||||
|
||||
"Racinefyros", "storyline.episode2.fyros.racine.*", "Sum",
|
||||
"Troncfyros", "storyline.episode2.fyros.tronc.*", "Sum",
|
||||
"Fibrefyros", "storyline.episode2.fyros.fibre.*", "Sum",
|
||||
"Ecorcefyros", "storyline.episode2.fyros.ecorce.*", "Sum",
|
||||
"Feuillefyros", "storyline.episode2.fyros.feuille.*", "Sum",
|
||||
"Fleurfyros", "storyline.episode2.fyros.fleur.*", "Sum",
|
||||
"Symbolefyros", "storyline.episode2.fyros.symbole.*", "Sum",
|
||||
"Noyaufyros", "storyline.episode2.fyros.noyau.*", "Sum",
|
||||
|
||||
// ==== quantite craftee des elements de construction Tryker
|
||||
"Socletryker", "storyline.episode2.tryker.socle.*", "Sum",
|
||||
"Colonnetryker", "storyline.episode2.tryker.colonne.*", "Sum",
|
||||
"Combletryker", "storyline.episode2.tryker.comble.*", "Sum",
|
||||
"Murailletryker", "storyline.episode2.tryker.muraille.*", "Sum",
|
||||
"Revetementtryker", "storyline.episode2.tryker.revetement.*", "Sum",
|
||||
"Ornementtryker", "storyline.episode2.tryker.ornement.*", "Sum",
|
||||
"Statuetryker", "storyline.episode2.tryker.statue.*", "Sum",
|
||||
"Justicetryker", "storyline.episode2.tryker.colonne_justice.*", "Sum",
|
||||
|
||||
"Racinetryker", "storyline.episode2.tryker.racine.*", "Sum",
|
||||
"Tronctryker", "storyline.episode2.tryker.tronc.*", "Sum",
|
||||
"Fibretryker", "storyline.episode2.tryker.fibre.*", "Sum",
|
||||
"Ecorcetryker", "storyline.episode2.tryker.ecorce.*", "Sum",
|
||||
"Feuilletryker", "storyline.episode2.tryker.feuille.*", "Sum",
|
||||
"Fleurtryker", "storyline.episode2.tryker.fleur.*", "Sum",
|
||||
"Symboletryker", "storyline.episode2.tryker.symbole.*", "Sum",
|
||||
"Noyautryker", "storyline.episode2.tryker.noyau.*", "Sum",
|
||||
|
||||
// ==== quantite craftee des elements de construction Matis
|
||||
"Soclematis", "storyline.episode2.matis.socle.*", "Sum",
|
||||
"Colonnematis", "storyline.episode2.matis.colonne.*", "Sum",
|
||||
"Comblematis", "storyline.episode2.matis.comble.*", "Sum",
|
||||
"Muraillematis", "storyline.episode2.matis.muraille.*", "Sum",
|
||||
"Revetementmatis", "storyline.episode2.matis.revetement.*", "Sum",
|
||||
"Ornementmatis", "storyline.episode2.matis.ornement.*", "Sum",
|
||||
"Statuematis", "storyline.episode2.matis.statue.*", "Sum",
|
||||
"Justicematis", "storyline.episode2.matis.colonne_justice.*", "Sum",
|
||||
|
||||
"Racinematis", "storyline.episode2.matis.racine.*", "Sum",
|
||||
"Troncmatis", "storyline.episode2.matis.tronc.*", "Sum",
|
||||
"Fibrematis", "storyline.episode2.matis.fibre.*", "Sum",
|
||||
"Ecorcematis", "storyline.episode2.matis.ecorce.*", "Sum",
|
||||
"Feuillematis", "storyline.episode2.matis.feuille.*", "Sum",
|
||||
"Fleurmatis", "storyline.episode2.matis.fleur.*", "Sum",
|
||||
"Symbolematis", "storyline.episode2.matis.symbole.*", "Sum",
|
||||
"Noyaumatis", "storyline.episode2.matis.noyau.*", "Sum",
|
||||
|
||||
// ==== quantite craftee des elements de construction Zorai
|
||||
"Soclezorai", "storyline.episode2.zorai.socle.*", "Sum",
|
||||
"Colonnezorai", "storyline.episode2.zorai.colonne.*", "Sum",
|
||||
"Comblezorai", "storyline.episode2.zorai.comble.*", "Sum",
|
||||
"Muraillezorai", "storyline.episode2.zorai.muraille.*", "Sum",
|
||||
"Revetementzorai", "storyline.episode2.zorai.revetement.*", "Sum",
|
||||
"Ornementzorai", "storyline.episode2.zorai.ornement.*", "Sum",
|
||||
"Statuezorai", "storyline.episode2.zorai.statue.*", "Sum",
|
||||
"Justicezorai", "storyline.episode2.zorai.colonne_justice.*", "Sum",
|
||||
|
||||
"Racinezorai", "storyline.episode2.zorai.racine.*", "Sum",
|
||||
"Tronczorai", "storyline.episode2.zorai.tronc.*", "Sum",
|
||||
"Fibrezorai", "storyline.episode2.zorai.fibre.*", "Sum",
|
||||
"Ecorcezorai", "storyline.episode2.zorai.ecorce.*", "Sum",
|
||||
"Feuillezorai", "storyline.episode2.zorai.feuille.*", "Sum",
|
||||
"Fleurzorai", "storyline.episode2.zorai.fleur.*", "Sum",
|
||||
"Symbolezorai", "storyline.episode2.zorai.symbole.*", "Sum",
|
||||
"Noyauzorai", "storyline.episode2.zorai.noyau.*", "Sum",
|
||||
|
||||
};
|
@ -1,80 +0,0 @@
|
||||
Values =
|
||||
{
|
||||
"noActe", "storyline.episode2.no_acte",
|
||||
// ==== valeur seuil des elements de construction Fyros
|
||||
"maxSoclefyros", "storyline.episode2.fyros.socle_max",
|
||||
"maxColonnefyros", "storyline.episode2.fyros.colonne_max",
|
||||
"maxComblefyros", "storyline.episode2.fyros.comble_max",
|
||||
"maxMuraillefyros", "storyline.episode2.fyros.muraille_max",
|
||||
"maxRevetementfyros", "storyline.episode2.fyros.revetement_max",
|
||||
"maxOrnementfyros", "storyline.episode2.fyros.ornement_max",
|
||||
"maxStatuefyros", "storyline.episode2.fyros.statue_max",
|
||||
"maxJusticefyros", "storyline.episode2.fyros.colonne_justice_max",
|
||||
|
||||
"maxRacinefyros", "storyline.episode2.fyros.racine_max",
|
||||
"maxTroncfyros", "storyline.episode2.fyros.tronc_max",
|
||||
"maxFibrefyros", "storyline.episode2.fyros.fibre_max",
|
||||
"maxEcorcefyros", "storyline.episode2.fyros.ecorce_max",
|
||||
"maxFeuillefyros", "storyline.episode2.fyros.feuille_max",
|
||||
"maxFleurfyros", "storyline.episode2.fyros.fleur_max",
|
||||
"maxSymbolefyros", "storyline.episode2.fyros.symbole_max",
|
||||
"maxNoyaufyros", "storyline.episode2.fyros.noyau_max",
|
||||
|
||||
// ==== valeur seuil des elements de construction Tryker
|
||||
"maxSocletryker", "storyline.episode2.tryker.socle_max",
|
||||
"maxColonnetryker", "storyline.episode2.tryker.colonne_max",
|
||||
"maxCombletryker", "storyline.episode2.tryker.comble_max",
|
||||
"maxMurailletryker", "storyline.episode2.tryker.muraille_max",
|
||||
"maxRevetementtryker", "storyline.episode2.tryker.revetement_max",
|
||||
"maxOrnementtryker", "storyline.episode2.tryker.ornement_max",
|
||||
"maxStatuetryker", "storyline.episode2.tryker.statue_max",
|
||||
"maxJusticetryker", "storyline.episode2.tryker.colonne_justice_max",
|
||||
|
||||
"maxRacinetryker", "storyline.episode2.tryker.racine_max",
|
||||
"maxTronctryker", "storyline.episode2.tryker.tronc_max",
|
||||
"maxFibretryker", "storyline.episode2.tryker.fibre_max",
|
||||
"maxEcorcetryker", "storyline.episode2.tryker.ecorce_max",
|
||||
"maxFeuilletryker", "storyline.episode2.tryker.feuille_max",
|
||||
"maxFleurtryker", "storyline.episode2.tryker.fleur_max",
|
||||
"maxSymboletryker", "storyline.episode2.tryker.symbole_max",
|
||||
"maxNoyautryker", "storyline.episode2.tryker.noyau_max",
|
||||
|
||||
// ==== valeur seuil des elements de construction Matis
|
||||
"maxSoclematis", "storyline.episode2.matis.socle_max",
|
||||
"maxColonnematis", "storyline.episode2.matis.colonne_max",
|
||||
"maxComblematis", "storyline.episode2.matis.comble_max",
|
||||
"maxMuraillematis", "storyline.episode2.matis.muraille_max",
|
||||
"maxRevetementmatis", "storyline.episode2.matis.revetement_max",
|
||||
"maxOrnementmatis", "storyline.episode2.matis.ornement_max",
|
||||
"maxStatuematis", "storyline.episode2.matis.statue_max",
|
||||
"maxJusticematis", "storyline.episode2.matis.colonne_justice_max",
|
||||
|
||||
"maxRacinematis", "storyline.episode2.matis.racine_max",
|
||||
"maxTroncmatis", "storyline.episode2.matis.tronc_max",
|
||||
"maxFibrematis", "storyline.episode2.matis.fibre_max",
|
||||
"maxEcorcematis", "storyline.episode2.matis.ecorce_max",
|
||||
"maxFeuillematis", "storyline.episode2.matis.feuille_max",
|
||||
"maxFleurmatis", "storyline.episode2.matis.fleur_max",
|
||||
"maxSymbolematis", "storyline.episode2.matis.symbole_max",
|
||||
"maxNoyaumatis", "storyline.episode2.matis.noyau_max",
|
||||
|
||||
// ==== valeur seuil des elements de construction Zorai
|
||||
"maxSoclezorai", "storyline.episode2.zorai.socle_max",
|
||||
"maxColonnezorai", "storyline.episode2.zorai.colonne_max",
|
||||
"maxComblezorai", "storyline.episode2.zorai.comble_max",
|
||||
"maxMuraillezorai", "storyline.episode2.zorai.muraille_max",
|
||||
"maxRevetementzorai", "storyline.episode2.zorai.revetement_max",
|
||||
"maxOrnementzorai", "storyline.episode2.zorai.ornement_max",
|
||||
"maxStatuezorai", "storyline.episode2.zorai.statue_max",
|
||||
"maxJusticezorai", "storyline.episode2.zorai.colonne_justice_max",
|
||||
|
||||
"maxRacinezorai", "storyline.episode2.zorai.racine_max",
|
||||
"maxTronczorai", "storyline.episode2.zorai.tronc_max",
|
||||
"maxFibrezorai", "storyline.episode2.zorai.fibre_max",
|
||||
"maxEcorcezorai", "storyline.episode2.zorai.ecorce_max",
|
||||
"maxFeuillezorai", "storyline.episode2.zorai.feuille_max",
|
||||
"maxFleurzorai", "storyline.episode2.zorai.fleur_max",
|
||||
"maxSymbolezorai", "storyline.episode2.zorai.symbole_max",
|
||||
"maxNoyauzorai", "storyline.episode2.zorai.noyau_max",
|
||||
|
||||
};
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
|
||||
die();
|
||||
|
||||
?>
|
@ -1,127 +0,0 @@
|
||||
<?php
|
||||
|
||||
// LOG database
|
||||
$StatsDBHost = "192.168.1.169";
|
||||
$StatsDBUserName = "root";
|
||||
$StatsDBPassword = "";
|
||||
$StatsDBName = "stats";
|
||||
|
||||
include_once('config.php');
|
||||
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
|
||||
// global var
|
||||
$link = NULL;
|
||||
$dev_ip="192.168.1.169"; //ip where sql error are displayed
|
||||
$private_network = "/192\.168\.1\./i"; //ip where the cmd=log&msg=dump function works
|
||||
|
||||
//get the ip of the viewer
|
||||
function getIp()
|
||||
{
|
||||
if (getenv("HTTP_CLIENT_IP"))
|
||||
{
|
||||
$ip = getenv("HTTP_CLIENT_IP");
|
||||
}
|
||||
elseif(getenv("HTTP_X_FORWARDED_FOR"))
|
||||
{
|
||||
$ip = getenv("HTTP_X_FORWARDED_FOR");
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
}
|
||||
return $ip;
|
||||
}
|
||||
|
||||
|
||||
// if the player ip is the dev ip then the sql error is explain
|
||||
function die2($debug_str)
|
||||
{
|
||||
global $private_network;
|
||||
if ( preg_match($private_network, getIp()) )
|
||||
{
|
||||
die($debug_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
die("GENERIC_ERROR");
|
||||
}
|
||||
}
|
||||
|
||||
// Get head or post infos from the query url.
|
||||
// return default if the value has not be found
|
||||
function getPost($value, $default=NULL)
|
||||
{
|
||||
if ( isSet( $_GET[$value] ) ) { return $_GET[$value]; }
|
||||
if ( isSet($_POST[$value]) ) { return $_POST[$value]; }
|
||||
return $default;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
$cmd = getPost("cmd", "get_patch_url");
|
||||
switch ($cmd)
|
||||
{
|
||||
// get Patch url from the nel database
|
||||
|
||||
case "get_patch_url":
|
||||
$domain = getPost("domain", "");
|
||||
|
||||
|
||||
if ($domain == "")
|
||||
{
|
||||
echo "0:wrong domain";
|
||||
die2();
|
||||
}
|
||||
$domainName = getPost("domain");
|
||||
$nelLink = mysql_connect($DBHost, $DBUserName, $DBPassword) or die2 (__FILE__. " " .__LINE__." Can't connect to database host:$DBHost user:$DBUserName");
|
||||
mysql_select_db ($DBName, $nelLink) or die2 (__FILE__. " " .__LINE__." Can't access to the table dbname:$DBName");
|
||||
$query = "SELECT backup_patch_url, patch_urls FROM domain WHERE domain_name='$domainName'";
|
||||
$result = mysql_query ($query, $nelLink) or die2 (__FILE__. " " .__LINE__." Can't execute the query: ".$query);
|
||||
|
||||
if (mysql_num_rows($result) != 1)
|
||||
{
|
||||
// unrecoverable error, we must giveup
|
||||
$reason = "Can't find domain '".$domainName."' (error code x)";
|
||||
$res = false;
|
||||
}
|
||||
|
||||
$req = mysql_fetch_array($result);
|
||||
|
||||
$backup_patch_url = $req["backup_patch_url"];
|
||||
$patch_urls = $req["patch_urls"];
|
||||
|
||||
$args = $patch_urls;
|
||||
$urls = explode(";", $args);
|
||||
// first display backup url
|
||||
echo "<version ";
|
||||
|
||||
echo 'serverPath="'.$backup_patch_url.'"';
|
||||
echo ">\n";
|
||||
|
||||
// then display default uris
|
||||
$first = 0;
|
||||
$last = count($urls);
|
||||
for (; $first != $last; $first++)
|
||||
{
|
||||
if ($urls[$first] == "")
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "\t<patchURI>$urls[$first]</patchURI>\n";
|
||||
}
|
||||
}
|
||||
echo "</version>\n";
|
||||
|
||||
mysql_close($nelLink);
|
||||
unset($nelLink);
|
||||
break;
|
||||
|
||||
default:
|
||||
echo "0:Unknown command";
|
||||
die2();
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
// This file contains all variables needed by other php scripts
|
||||
|
||||
include_once('/home/nevrax/patchman/config.php');
|
||||
|
||||
?>
|
@ -1,872 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* RFC 822 Email address list validation Utility
|
||||
*
|
||||
* What is it?
|
||||
*
|
||||
* This class will take an address string, and parse it into it's consituent
|
||||
* parts, be that either addresses, groups, or combinations. Nested groups
|
||||
* are not supported. The structure it returns is pretty straight forward,
|
||||
* and is similar to that provided by the imap_rfc822_parse_adrlist(). Use
|
||||
* print_r() to view the structure.
|
||||
*
|
||||
* How do I use it?
|
||||
*
|
||||
* $address_string = 'My Group: "Richard Heyes" <richard@localhost> (A comment), ted@example.com (Ted Bloggs), Barney;';
|
||||
* $structure = Mail_RFC822::parseAddressList($address_string, 'example.com', TRUE)
|
||||
* print_r($structure);
|
||||
*
|
||||
* @author Richard Heyes <richard@phpguru.org>
|
||||
* @author Chuck Hagenbuch <chuck@horde.org>
|
||||
* @version $Revision: 1.1 $
|
||||
* @package Mail
|
||||
*/
|
||||
|
||||
class Mail_RFC822
|
||||
{
|
||||
/**
|
||||
* The address being parsed by the RFC822 object.
|
||||
* @var string $address
|
||||
*/
|
||||
var $address = '';
|
||||
|
||||
/**
|
||||
* The default domain to use for unqualified addresses.
|
||||
* @var string $default_domain
|
||||
*/
|
||||
var $default_domain = 'localhost';
|
||||
|
||||
/**
|
||||
* Should we return a nested array showing groups, or flatten everything?
|
||||
* @var boolean $nestGroups
|
||||
*/
|
||||
var $nestGroups = true;
|
||||
|
||||
/**
|
||||
* Whether or not to validate atoms for non-ascii characters.
|
||||
* @var boolean $validate
|
||||
*/
|
||||
var $validate = true;
|
||||
|
||||
/**
|
||||
* The array of raw addresses built up as we parse.
|
||||
* @var array $addresses
|
||||
*/
|
||||
var $addresses = array();
|
||||
|
||||
/**
|
||||
* The final array of parsed address information that we build up.
|
||||
* @var array $structure
|
||||
*/
|
||||
var $structure = array();
|
||||
|
||||
/**
|
||||
* The current error message, if any.
|
||||
* @var string $error
|
||||
*/
|
||||
var $error = null;
|
||||
|
||||
/**
|
||||
* An internal counter/pointer.
|
||||
* @var integer $index
|
||||
*/
|
||||
var $index = null;
|
||||
|
||||
/**
|
||||
* The number of groups that have been found in the address list.
|
||||
* @var integer $num_groups
|
||||
* @access public
|
||||
*/
|
||||
var $num_groups = 0;
|
||||
|
||||
/**
|
||||
* A variable so that we can tell whether or not we're inside a
|
||||
* Mail_RFC822 object.
|
||||
* @var boolean $mailRFC822
|
||||
*/
|
||||
var $mailRFC822 = true;
|
||||
|
||||
/**
|
||||
* A limit after which processing stops
|
||||
* @var int $limit
|
||||
*/
|
||||
var $limit = null;
|
||||
|
||||
|
||||
/**
|
||||
* Sets up the object. The address must either be set here or when
|
||||
* calling parseAddressList(). One or the other.
|
||||
*
|
||||
* @access public
|
||||
* @param string $address The address(es) to validate.
|
||||
* @param string $default_domain Default domain/host etc. If not supplied, will be set to localhost.
|
||||
* @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing.
|
||||
* @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
|
||||
*
|
||||
* @return object Mail_RFC822 A new Mail_RFC822 object.
|
||||
*/
|
||||
function Mail_RFC822($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null)
|
||||
{
|
||||
if (isset($address)) $this->address = $address;
|
||||
if (isset($default_domain)) $this->default_domain = $default_domain;
|
||||
if (isset($nest_groups)) $this->nestGroups = $nest_groups;
|
||||
if (isset($validate)) $this->validate = $validate;
|
||||
if (isset($limit)) $this->limit = $limit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Starts the whole process. The address must either be set here
|
||||
* or when creating the object. One or the other.
|
||||
*
|
||||
* @access public
|
||||
* @param string $address The address(es) to validate.
|
||||
* @param string $default_domain Default domain/host etc.
|
||||
* @param boolean $nest_groups Whether to return the structure with groups nested for easier viewing.
|
||||
* @param boolean $validate Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
|
||||
*
|
||||
* @return array A structured array of addresses.
|
||||
*/
|
||||
function parseAddressList($address = null, $default_domain = null, $nest_groups = null, $validate = null, $limit = null)
|
||||
{
|
||||
|
||||
if (!isset($this->mailRFC822)) {
|
||||
$obj = new Mail_RFC822($address, $default_domain, $nest_groups, $validate, $limit);
|
||||
return $obj->parseAddressList();
|
||||
}
|
||||
|
||||
if (isset($address)) $this->address = $address;
|
||||
if (isset($default_domain)) $this->default_domain = $default_domain;
|
||||
if (isset($nest_groups)) $this->nestGroups = $nest_groups;
|
||||
if (isset($validate)) $this->validate = $validate;
|
||||
if (isset($limit)) $this->limit = $limit;
|
||||
|
||||
$this->structure = array();
|
||||
$this->addresses = array();
|
||||
$this->error = null;
|
||||
$this->index = null;
|
||||
|
||||
while ($this->address = $this->_splitAddresses($this->address)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($this->address === false || isset($this->error)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Reset timer since large amounts of addresses can take a long time to
|
||||
// get here
|
||||
set_time_limit(30);
|
||||
|
||||
// Loop through all the addresses
|
||||
for ($i = 0; $i < count($this->addresses); $i++){
|
||||
|
||||
if (($return = $this->_validateAddress($this->addresses[$i])) === false
|
||||
|| isset($this->error)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->nestGroups) {
|
||||
$this->structure = array_merge($this->structure, $return);
|
||||
} else {
|
||||
$this->structure[] = $return;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->structure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits an address into seperate addresses.
|
||||
*
|
||||
* @access private
|
||||
* @param string $address The addresses to split.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _splitAddresses($address)
|
||||
{
|
||||
|
||||
if (!empty($this->limit) AND count($this->addresses) == $this->limit) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($this->_isGroup($address) && !isset($this->error)) {
|
||||
$split_char = ';';
|
||||
$is_group = true;
|
||||
} elseif (!isset($this->error)) {
|
||||
$split_char = ',';
|
||||
$is_group = false;
|
||||
} elseif (isset($this->error)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Split the string based on the above ten or so lines.
|
||||
$parts = explode($split_char, $address);
|
||||
$string = $this->_splitCheck($parts, $split_char);
|
||||
|
||||
// If a group...
|
||||
if ($is_group) {
|
||||
// If $string does not contain a colon outside of
|
||||
// brackets/quotes etc then something's fubar.
|
||||
|
||||
// First check there's a colon at all:
|
||||
if (strpos($string, ':') === false) {
|
||||
$this->error = 'Invalid address: ' . $string;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now check it's outside of brackets/quotes:
|
||||
if (!$this->_splitCheck(explode(':', $string), ':'))
|
||||
return false;
|
||||
|
||||
// We must have a group at this point, so increase the counter:
|
||||
$this->num_groups++;
|
||||
}
|
||||
|
||||
// $string now contains the first full address/group.
|
||||
// Add to the addresses array.
|
||||
$this->addresses[] = array(
|
||||
'address' => trim($string),
|
||||
'group' => $is_group
|
||||
);
|
||||
|
||||
// Remove the now stored address from the initial line, the +1
|
||||
// is to account for the explode character.
|
||||
$address = trim(substr($address, strlen($string) + 1));
|
||||
|
||||
// If the next char is a comma and this was a group, then
|
||||
// there are more addresses, otherwise, if there are any more
|
||||
// chars, then there is another address.
|
||||
if ($is_group && substr($address, 0, 1) == ','){
|
||||
$address = trim(substr($address, 1));
|
||||
return $address;
|
||||
|
||||
} elseif (strlen($address) > 0) {
|
||||
return $address;
|
||||
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
|
||||
// If you got here then something's off
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for a group at the start of the string.
|
||||
*
|
||||
* @access private
|
||||
* @param string $address The address to check.
|
||||
* @return boolean Whether or not there is a group at the start of the string.
|
||||
*/
|
||||
function _isGroup($address)
|
||||
{
|
||||
// First comma not in quotes, angles or escaped:
|
||||
$parts = explode(',', $address);
|
||||
$string = $this->_splitCheck($parts, ',');
|
||||
|
||||
// Now we have the first address, we can reliably check for a
|
||||
// group by searching for a colon that's not escaped or in
|
||||
// quotes or angle brackets.
|
||||
if (count($parts = explode(':', $string)) > 1) {
|
||||
$string2 = $this->_splitCheck($parts, ':');
|
||||
return ($string2 !== $string);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A common function that will check an exploded string.
|
||||
*
|
||||
* @access private
|
||||
* @param array $parts The exloded string.
|
||||
* @param string $char The char that was exploded on.
|
||||
* @return mixed False if the string contains unclosed quotes/brackets, or the string on success.
|
||||
*/
|
||||
function _splitCheck($parts, $char)
|
||||
{
|
||||
$string = $parts[0];
|
||||
|
||||
for ($i = 0; $i < count($parts); $i++) {
|
||||
if ($this->_hasUnclosedQuotes($string)
|
||||
|| $this->_hasUnclosedBrackets($string, '<>')
|
||||
|| $this->_hasUnclosedBrackets($string, '[]')
|
||||
|| $this->_hasUnclosedBrackets($string, '()')
|
||||
|| substr($string, -1) == '\\') {
|
||||
if (isset($parts[$i + 1])) {
|
||||
$string = $string . $char . $parts[$i + 1];
|
||||
} else {
|
||||
$this->error = 'Invalid address spec. Unclosed bracket or quotes';
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$this->index = $i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string has an unclosed quotes or not.
|
||||
*
|
||||
* @access private
|
||||
* @param string $string The string to check.
|
||||
* @return boolean True if there are unclosed quotes inside the string, false otherwise.
|
||||
*/
|
||||
function _hasUnclosedQuotes($string)
|
||||
{
|
||||
$string = explode('"', $string);
|
||||
$string_cnt = count($string);
|
||||
|
||||
for ($i = 0; $i < (count($string) - 1); $i++)
|
||||
if (substr($string[$i], -1) == '\\')
|
||||
$string_cnt--;
|
||||
|
||||
return ($string_cnt % 2 === 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string has an unclosed brackets or not. IMPORTANT:
|
||||
* This function handles both angle brackets and square brackets;
|
||||
*
|
||||
* @access private
|
||||
* @param string $string The string to check.
|
||||
* @param string $chars The characters to check for.
|
||||
* @return boolean True if there are unclosed brackets inside the string, false otherwise.
|
||||
*/
|
||||
function _hasUnclosedBrackets($string, $chars)
|
||||
{
|
||||
$num_angle_start = substr_count($string, $chars[0]);
|
||||
$num_angle_end = substr_count($string, $chars[1]);
|
||||
|
||||
$this->_hasUnclosedBracketsSub($string, $num_angle_start, $chars[0]);
|
||||
$this->_hasUnclosedBracketsSub($string, $num_angle_end, $chars[1]);
|
||||
|
||||
if ($num_angle_start < $num_angle_end) {
|
||||
$this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
|
||||
return false;
|
||||
} else {
|
||||
return ($num_angle_start > $num_angle_end);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sub function that is used only by hasUnclosedBrackets().
|
||||
*
|
||||
* @access private
|
||||
* @param string $string The string to check.
|
||||
* @param integer &$num The number of occurences.
|
||||
* @param string $char The character to count.
|
||||
* @return integer The number of occurences of $char in $string, adjusted for backslashes.
|
||||
*/
|
||||
function _hasUnclosedBracketsSub($string, &$num, $char)
|
||||
{
|
||||
$parts = explode($char, $string);
|
||||
for ($i = 0; $i < count($parts); $i++){
|
||||
if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i]))
|
||||
$num--;
|
||||
if (isset($parts[$i + 1]))
|
||||
$parts[$i + 1] = $parts[$i] . $char . $parts[$i + 1];
|
||||
}
|
||||
|
||||
return $num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to begin checking the address.
|
||||
*
|
||||
* @access private
|
||||
* @param string $address The address to validate.
|
||||
* @return mixed False on failure, or a structured array of address information on success.
|
||||
*/
|
||||
function _validateAddress($address)
|
||||
{
|
||||
$is_group = false;
|
||||
|
||||
if ($address['group']) {
|
||||
$is_group = true;
|
||||
|
||||
// Get the group part of the name
|
||||
$parts = explode(':', $address['address']);
|
||||
$groupname = $this->_splitCheck($parts, ':');
|
||||
$structure = array();
|
||||
|
||||
// And validate the group part of the name.
|
||||
if (!$this->_validatePhrase($groupname)){
|
||||
$this->error = 'Group name did not validate.';
|
||||
return false;
|
||||
} else {
|
||||
// Don't include groups if we are not nesting
|
||||
// them. This avoids returning invalid addresses.
|
||||
if ($this->nestGroups) {
|
||||
$structure = new stdClass;
|
||||
$structure->groupname = $groupname;
|
||||
}
|
||||
}
|
||||
|
||||
$address['address'] = ltrim(substr($address['address'], strlen($groupname . ':')));
|
||||
}
|
||||
|
||||
// If a group then split on comma and put into an array.
|
||||
// Otherwise, Just put the whole address in an array.
|
||||
if ($is_group) {
|
||||
while (strlen($address['address']) > 0) {
|
||||
$parts = explode(',', $address['address']);
|
||||
$addresses[] = $this->_splitCheck($parts, ',');
|
||||
$address['address'] = trim(substr($address['address'], strlen(end($addresses) . ',')));
|
||||
}
|
||||
} else {
|
||||
$addresses[] = $address['address'];
|
||||
}
|
||||
|
||||
// Check that $addresses is set, if address like this:
|
||||
// Groupname:;
|
||||
// Then errors were appearing.
|
||||
if (!isset($addresses)){
|
||||
$this->error = 'Empty group.';
|
||||
return false;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($addresses); $i++) {
|
||||
$addresses[$i] = trim($addresses[$i]);
|
||||
}
|
||||
|
||||
// Validate each mailbox.
|
||||
// Format could be one of: name <geezer@domain.com>
|
||||
// geezer@domain.com
|
||||
// geezer
|
||||
// ... or any other format valid by RFC 822.
|
||||
array_walk($addresses, array($this, 'validateMailbox'));
|
||||
|
||||
// Nested format
|
||||
if ($this->nestGroups) {
|
||||
if ($is_group) {
|
||||
$structure->addresses = $addresses;
|
||||
} else {
|
||||
$structure = $addresses[0];
|
||||
}
|
||||
|
||||
// Flat format
|
||||
} else {
|
||||
if ($is_group) {
|
||||
$structure = array_merge($structure, $addresses);
|
||||
} else {
|
||||
$structure = $addresses;
|
||||
}
|
||||
}
|
||||
|
||||
return $structure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a phrase.
|
||||
*
|
||||
* @access private
|
||||
* @param string $phrase The phrase to check.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _validatePhrase($phrase)
|
||||
{
|
||||
// Splits on one or more Tab or space.
|
||||
$parts = preg_split('/[ \\x09]+/', $phrase, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
$phrase_parts = array();
|
||||
while (count($parts) > 0){
|
||||
$phrase_parts[] = $this->_splitCheck($parts, ' ');
|
||||
for ($i = 0; $i < $this->index + 1; $i++)
|
||||
array_shift($parts);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($phrase_parts); $i++) {
|
||||
// If quoted string:
|
||||
if (substr($phrase_parts[$i], 0, 1) == '"') {
|
||||
if (!$this->_validateQuotedString($phrase_parts[$i]))
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Otherwise it's an atom:
|
||||
if (!$this->_validateAtom($phrase_parts[$i])) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate an atom which from rfc822 is:
|
||||
* atom = 1*<any CHAR except specials, SPACE and CTLs>
|
||||
*
|
||||
* If validation ($this->validate) has been turned off, then
|
||||
* validateAtom() doesn't actually check anything. This is so that you
|
||||
* can split a list of addresses up before encoding personal names
|
||||
* (umlauts, etc.), for example.
|
||||
*
|
||||
* @access private
|
||||
* @param string $atom The string to check.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _validateAtom($atom)
|
||||
{
|
||||
if (!$this->validate) {
|
||||
// Validation has been turned off; assume the atom is okay.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check for any char from ASCII 0 - ASCII 127
|
||||
if (!preg_match('/^[\\x00-\\x7E]+$/i', $atom, $matches)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for specials:
|
||||
if (preg_match('/[][()<>@,;\\:". ]/', $atom)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for control characters (ASCII 0-31):
|
||||
if (preg_match('/[\\x00-\\x1F]+/', $atom)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate quoted string, which is:
|
||||
* quoted-string = <"> *(qtext/quoted-pair) <">
|
||||
*
|
||||
* @access private
|
||||
* @param string $qstring The string to check
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _validateQuotedString($qstring)
|
||||
{
|
||||
// Leading and trailing "
|
||||
$qstring = substr($qstring, 1, -1);
|
||||
|
||||
// Perform check.
|
||||
return !(preg_match('/(.)[\x0D\\\\"]/', $qstring, $matches) && $matches[1] != '\\');
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a mailbox, which is:
|
||||
* mailbox = addr-spec ; simple address
|
||||
* / phrase route-addr ; name and route-addr
|
||||
*
|
||||
* @access public
|
||||
* @param string &$mailbox The string to check.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function validateMailbox(&$mailbox)
|
||||
{
|
||||
// A couple of defaults.
|
||||
$phrase = '';
|
||||
$comment = '';
|
||||
|
||||
// Catch any RFC822 comments and store them separately
|
||||
$_mailbox = $mailbox;
|
||||
while (strlen(trim($_mailbox)) > 0) {
|
||||
$parts = explode('(', $_mailbox);
|
||||
$before_comment = $this->_splitCheck($parts, '(');
|
||||
if ($before_comment != $_mailbox) {
|
||||
// First char should be a (
|
||||
$comment = substr(str_replace($before_comment, '', $_mailbox), 1);
|
||||
$parts = explode(')', $comment);
|
||||
$comment = $this->_splitCheck($parts, ')');
|
||||
$comments[] = $comment;
|
||||
|
||||
// +1 is for the trailing )
|
||||
$_mailbox = substr($_mailbox, strpos($_mailbox, $comment)+strlen($comment)+1);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for($i=0; $i<count(@$comments); $i++){
|
||||
$mailbox = str_replace('('.$comments[$i].')', '', $mailbox);
|
||||
}
|
||||
$mailbox = trim($mailbox);
|
||||
|
||||
// Check for name + route-addr
|
||||
if (substr($mailbox, -1) == '>' && substr($mailbox, 0, 1) != '<') {
|
||||
$parts = explode('<', $mailbox);
|
||||
$name = $this->_splitCheck($parts, '<');
|
||||
|
||||
$phrase = trim($name);
|
||||
$route_addr = trim(substr($mailbox, strlen($name.'<'), -1));
|
||||
|
||||
if ($this->_validatePhrase($phrase) === false || ($route_addr = $this->_validateRouteAddr($route_addr)) === false)
|
||||
return false;
|
||||
|
||||
// Only got addr-spec
|
||||
} else {
|
||||
// First snip angle brackets if present.
|
||||
if (substr($mailbox,0,1) == '<' && substr($mailbox,-1) == '>')
|
||||
$addr_spec = substr($mailbox,1,-1);
|
||||
else
|
||||
$addr_spec = $mailbox;
|
||||
|
||||
if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Construct the object that will be returned.
|
||||
$mbox = new stdClass();
|
||||
|
||||
// Add the phrase (even if empty) and comments
|
||||
$mbox->personal = $phrase;
|
||||
$mbox->comment = isset($comments) ? $comments : array();
|
||||
|
||||
if (isset($route_addr)) {
|
||||
$mbox->mailbox = $route_addr['local_part'];
|
||||
$mbox->host = $route_addr['domain'];
|
||||
$route_addr['adl'] !== '' ? $mbox->adl = $route_addr['adl'] : '';
|
||||
} else {
|
||||
$mbox->mailbox = $addr_spec['local_part'];
|
||||
$mbox->host = $addr_spec['domain'];
|
||||
}
|
||||
|
||||
$mailbox = $mbox;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function validates a route-addr which is:
|
||||
* route-addr = "<" [route] addr-spec ">"
|
||||
*
|
||||
* Angle brackets have already been removed at the point of
|
||||
* getting to this function.
|
||||
*
|
||||
* @access private
|
||||
* @param string $route_addr The string to check.
|
||||
* @return mixed False on failure, or an array containing validated address/route information on success.
|
||||
*/
|
||||
function _validateRouteAddr($route_addr)
|
||||
{
|
||||
// Check for colon.
|
||||
if (strpos($route_addr, ':') !== false) {
|
||||
$parts = explode(':', $route_addr);
|
||||
$route = $this->_splitCheck($parts, ':');
|
||||
} else {
|
||||
$route = $route_addr;
|
||||
}
|
||||
|
||||
// If $route is same as $route_addr then the colon was in
|
||||
// quotes or brackets or, of course, non existent.
|
||||
if ($route === $route_addr){
|
||||
unset($route);
|
||||
$addr_spec = $route_addr;
|
||||
if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Validate route part.
|
||||
if (($route = $this->_validateRoute($route)) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$addr_spec = substr($route_addr, strlen($route . ':'));
|
||||
|
||||
// Validate addr-spec part.
|
||||
if (($addr_spec = $this->_validateAddrSpec($addr_spec)) === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($route)) {
|
||||
$return['adl'] = $route;
|
||||
} else {
|
||||
$return['adl'] = '';
|
||||
}
|
||||
|
||||
$return = array_merge($return, $addr_spec);
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a route, which is:
|
||||
* route = 1#("@" domain) ":"
|
||||
*
|
||||
* @access private
|
||||
* @param string $route The string to check.
|
||||
* @return mixed False on failure, or the validated $route on success.
|
||||
*/
|
||||
function _validateRoute($route)
|
||||
{
|
||||
// Split on comma.
|
||||
$domains = explode(',', trim($route));
|
||||
|
||||
for ($i = 0; $i < count($domains); $i++) {
|
||||
$domains[$i] = str_replace('@', '', trim($domains[$i]));
|
||||
if (!$this->_validateDomain($domains[$i])) return false;
|
||||
}
|
||||
|
||||
return $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a domain, though this is not quite what
|
||||
* you expect of a strict internet domain.
|
||||
*
|
||||
* domain = sub-domain *("." sub-domain)
|
||||
*
|
||||
* @access private
|
||||
* @param string $domain The string to check.
|
||||
* @return mixed False on failure, or the validated domain on success.
|
||||
*/
|
||||
function _validateDomain($domain)
|
||||
{
|
||||
// Note the different use of $subdomains and $sub_domains
|
||||
$subdomains = explode('.', $domain);
|
||||
|
||||
while (count($subdomains) > 0) {
|
||||
$sub_domains[] = $this->_splitCheck($subdomains, '.');
|
||||
for ($i = 0; $i < $this->index + 1; $i++)
|
||||
array_shift($subdomains);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($sub_domains); $i++) {
|
||||
if (!$this->_validateSubdomain(trim($sub_domains[$i])))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Managed to get here, so return input.
|
||||
return $domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a subdomain:
|
||||
* subdomain = domain-ref / domain-literal
|
||||
*
|
||||
* @access private
|
||||
* @param string $subdomain The string to check.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _validateSubdomain($subdomain)
|
||||
{
|
||||
if (preg_match('|^\[(.*)]$|', $subdomain, $arr)){
|
||||
if (!$this->_validateDliteral($arr[1])) return false;
|
||||
} else {
|
||||
if (!$this->_validateAtom($subdomain)) return false;
|
||||
}
|
||||
|
||||
// Got here, so return successful.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate a domain literal:
|
||||
* domain-literal = "[" *(dtext / quoted-pair) "]"
|
||||
*
|
||||
* @access private
|
||||
* @param string $dliteral The string to check.
|
||||
* @return boolean Success or failure.
|
||||
*/
|
||||
function _validateDliteral($dliteral)
|
||||
{
|
||||
return !preg_match('/(.)[][\x0D\\\\]/', $dliteral, $matches) && $matches[1] != '\\';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate an addr-spec.
|
||||
*
|
||||
* addr-spec = local-part "@" domain
|
||||
*
|
||||
* @access private
|
||||
* @param string $addr_spec The string to check.
|
||||
* @return mixed False on failure, or the validated addr-spec on success.
|
||||
*/
|
||||
function _validateAddrSpec($addr_spec)
|
||||
{
|
||||
$addr_spec = trim($addr_spec);
|
||||
|
||||
// Split on @ sign if there is one.
|
||||
if (strpos($addr_spec, '@') !== false) {
|
||||
$parts = explode('@', $addr_spec);
|
||||
$local_part = $this->_splitCheck($parts, '@');
|
||||
$domain = substr($addr_spec, strlen($local_part . '@'));
|
||||
|
||||
// No @ sign so assume the default domain.
|
||||
} else {
|
||||
$local_part = $addr_spec;
|
||||
$domain = $this->default_domain;
|
||||
}
|
||||
|
||||
if (($local_part = $this->_validateLocalPart($local_part)) === false) return false;
|
||||
if (($domain = $this->_validateDomain($domain)) === false) return false;
|
||||
|
||||
// Got here so return successful.
|
||||
return array('local_part' => $local_part, 'domain' => $domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to validate the local part of an address:
|
||||
* local-part = word *("." word)
|
||||
*
|
||||
* @access private
|
||||
* @param string $local_part
|
||||
* @return mixed False on failure, or the validated local part on success.
|
||||
*/
|
||||
function _validateLocalPart($local_part)
|
||||
{
|
||||
$parts = explode('.', $local_part);
|
||||
|
||||
// Split the local_part into words.
|
||||
while (count($parts) > 0){
|
||||
$words[] = $this->_splitCheck($parts, '.');
|
||||
for ($i = 0; $i < $this->index + 1; $i++) {
|
||||
array_shift($parts);
|
||||
}
|
||||
}
|
||||
|
||||
// Validate each word.
|
||||
for ($i = 0; $i < count($words); $i++) {
|
||||
if ($this->_validatePhrase(trim($words[$i])) === false) return false;
|
||||
}
|
||||
|
||||
// Managed to get here, so return the input.
|
||||
return $local_part;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an approximate count of how many addresses are
|
||||
* in the given string. This is APPROXIMATE as it only splits
|
||||
* based on a comma which has no preceding backslash. Could be
|
||||
* useful as large amounts of addresses will end up producing
|
||||
* *large* structures when used with parseAddressList().
|
||||
*
|
||||
* @param string $data Addresses to count
|
||||
* @return int Approximate count
|
||||
*/
|
||||
function approximateCount($data)
|
||||
{
|
||||
return count(preg_split('/(?<!\\\\),/', $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a email validating function seperate to the rest
|
||||
* of the class. It simply validates whether an email is of
|
||||
* the common internet form: <user>@<domain>. This can be
|
||||
* sufficient for most people. Optional stricter mode can
|
||||
* be utilised which restricts mailbox characters allowed
|
||||
* to alphanumeric, full stop, hyphen and underscore.
|
||||
*
|
||||
* @param string $data Address to check
|
||||
* @param boolean $strict Optional stricter mode
|
||||
* @return mixed False if it fails, an indexed array
|
||||
* username/domain if it matches
|
||||
*/
|
||||
function isValidInetAddress($data, $strict = false)
|
||||
{
|
||||
$regex = $strict ? '/^([.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';
|
||||
if (preg_match($regex, trim($data), $matches)) {
|
||||
return array($matches[1], $matches[2]);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,777 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Filename.......: class.html.mime.mail.inc
|
||||
* Project........: HTML Mime mail class
|
||||
* Last Modified..: $Date: 2007/06/19 15:29:18 $
|
||||
* CVS Revision...: $Revision: 1.1 $
|
||||
* Copyright......: 2001, 2002 Richard Heyes
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__) . '/mimePart.php');
|
||||
|
||||
class htmlMimeMail
|
||||
{
|
||||
/**
|
||||
* The html part of the message
|
||||
* @var string
|
||||
*/
|
||||
var $html;
|
||||
|
||||
/**
|
||||
* The text part of the message(only used in TEXT only messages)
|
||||
* @var string
|
||||
*/
|
||||
var $text;
|
||||
|
||||
/**
|
||||
* The main body of the message after building
|
||||
* @var string
|
||||
*/
|
||||
var $output;
|
||||
|
||||
/**
|
||||
* The alternative text to the HTML part (only used in HTML messages)
|
||||
* @var string
|
||||
*/
|
||||
var $html_text;
|
||||
|
||||
/**
|
||||
* An array of embedded images/objects
|
||||
* @var array
|
||||
*/
|
||||
var $html_images;
|
||||
|
||||
/**
|
||||
* An array of recognised image types for the findHtmlImages() method
|
||||
* @var array
|
||||
*/
|
||||
var $image_types;
|
||||
|
||||
/**
|
||||
* Parameters that affect the build process
|
||||
* @var array
|
||||
*/
|
||||
var $build_params;
|
||||
|
||||
/**
|
||||
* Array of attachments
|
||||
* @var array
|
||||
*/
|
||||
var $attachments;
|
||||
|
||||
/**
|
||||
* The main message headers
|
||||
* @var array
|
||||
*/
|
||||
var $headers;
|
||||
|
||||
/**
|
||||
* Whether the message has been built or not
|
||||
* @var boolean
|
||||
*/
|
||||
var $is_built;
|
||||
|
||||
/**
|
||||
* The return path address. If not set the From:
|
||||
* address is used instead
|
||||
* @var string
|
||||
*/
|
||||
var $return_path;
|
||||
|
||||
/**
|
||||
* Array of information needed for smtp sending
|
||||
* @var array
|
||||
*/
|
||||
var $smtp_params;
|
||||
|
||||
/**
|
||||
* Constructor function. Sets the headers
|
||||
* if supplied.
|
||||
*/
|
||||
|
||||
function htmlMimeMail()
|
||||
{
|
||||
/**
|
||||
* Initialise some variables.
|
||||
*/
|
||||
$this->html_images = array();
|
||||
$this->headers = array();
|
||||
$this->is_built = false;
|
||||
|
||||
/**
|
||||
* If you want the auto load functionality
|
||||
* to find other image/file types, add the
|
||||
* extension and content type here.
|
||||
*/
|
||||
$this->image_types = array(
|
||||
'gif' => 'image/gif',
|
||||
'jpg' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'jpe' => 'image/jpeg',
|
||||
'bmp' => 'image/bmp',
|
||||
'png' => 'image/png',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'swf' => 'application/x-shockwave-flash'
|
||||
);
|
||||
|
||||
/**
|
||||
* Set these up
|
||||
*/
|
||||
$this->build_params['html_encoding'] = 'quoted-printable';
|
||||
$this->build_params['text_encoding'] = '7bit';
|
||||
$this->build_params['html_charset'] = 'UTF-8';
|
||||
$this->build_params['text_charset'] = 'UTF-8';
|
||||
//$this->build_params['head_charset'] = 'ISO-8859-1';
|
||||
$this->build_params['head_charset'] = 'UTF-8';
|
||||
$this->build_params['text_wrap'] = 998;
|
||||
|
||||
/**
|
||||
* Defaults for smtp sending
|
||||
*/
|
||||
if (!empty($GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'])) {
|
||||
$helo = $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'];
|
||||
} elseif (!empty($GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'])) {
|
||||
$helo = $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'];
|
||||
} else {
|
||||
$helo = 'localhost';
|
||||
}
|
||||
|
||||
$this->smtp_params['host'] = 'localhost';
|
||||
$this->smtp_params['port'] = 25;
|
||||
$this->smtp_params['helo'] = $helo;
|
||||
$this->smtp_params['auth'] = false;
|
||||
$this->smtp_params['user'] = '';
|
||||
$this->smtp_params['pass'] = '';
|
||||
|
||||
/**
|
||||
* Make sure the MIME version header is first.
|
||||
*/
|
||||
$this->headers['MIME-Version'] = '1.0';
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will read a file in
|
||||
* from a supplied filename and return
|
||||
* it. This can then be given as the first
|
||||
* argument of the the functions
|
||||
* add_html_image() or add_attachment().
|
||||
*/
|
||||
function getFile($filename)
|
||||
{
|
||||
$return = '';
|
||||
if ($fp = fopen($filename, 'rb')) {
|
||||
while (!feof($fp)) {
|
||||
$return .= fread($fp, 1024);
|
||||
}
|
||||
fclose($fp);
|
||||
return $return;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to set the CRLF style
|
||||
*/
|
||||
function setCrlf($crlf = "\n")
|
||||
{
|
||||
if (!defined('CRLF')) {
|
||||
define('CRLF', $crlf, true);
|
||||
}
|
||||
|
||||
if (!defined('MAIL_MIMEPART_CRLF')) {
|
||||
define('MAIL_MIMEPART_CRLF', $crlf, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to set the SMTP parameters
|
||||
*/
|
||||
function setSMTPParams($host = null, $port = null, $helo = null, $auth = null, $user = null, $pass = null)
|
||||
{
|
||||
if (!is_null($host)) $this->smtp_params['host'] = $host;
|
||||
if (!is_null($port)) $this->smtp_params['port'] = $port;
|
||||
if (!is_null($helo)) $this->smtp_params['helo'] = $helo;
|
||||
if (!is_null($auth)) $this->smtp_params['auth'] = $auth;
|
||||
if (!is_null($user)) $this->smtp_params['user'] = $user;
|
||||
if (!is_null($pass)) $this->smtp_params['pass'] = $pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the text encoding
|
||||
*/
|
||||
function setTextEncoding($encoding = '7bit')
|
||||
{
|
||||
$this->build_params['text_encoding'] = $encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the HTML encoding
|
||||
*/
|
||||
function setHtmlEncoding($encoding = 'quoted-printable')
|
||||
{
|
||||
$this->build_params['html_encoding'] = $encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the text charset
|
||||
*/
|
||||
function setTextCharset($charset = 'ISO-8859-1')
|
||||
{
|
||||
$this->build_params['text_charset'] = $charset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the HTML charset
|
||||
*/
|
||||
function setHtmlCharset($charset = 'ISO-8859-1')
|
||||
{
|
||||
$this->build_params['html_charset'] = $charset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the header encoding charset
|
||||
*/
|
||||
function setHeadCharset($charset = 'ISO-8859-1')
|
||||
{
|
||||
$this->build_params['head_charset'] = $charset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor function to set the text wrap count
|
||||
*/
|
||||
function setTextWrap($count = 998)
|
||||
{
|
||||
$this->build_params['text_wrap'] = $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to set a header
|
||||
*/
|
||||
function setHeader($name, $value)
|
||||
{
|
||||
$this->headers[$name] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to add a Subject: header
|
||||
*/
|
||||
function setSubject($subject)
|
||||
{
|
||||
$this->headers['Subject'] = $subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to add a From: header
|
||||
*/
|
||||
function setFrom($from)
|
||||
{
|
||||
$this->headers['From'] = $from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to set the return path
|
||||
*/
|
||||
function setReturnPath($return_path)
|
||||
{
|
||||
$this->return_path = $return_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to add a Cc: header
|
||||
*/
|
||||
function setCc($cc)
|
||||
{
|
||||
$this->headers['Cc'] = $cc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to add a Bcc: header
|
||||
*/
|
||||
function setBcc($bcc)
|
||||
{
|
||||
$this->headers['Bcc'] = $bcc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds plain text. Use this function
|
||||
* when NOT sending html email
|
||||
*/
|
||||
function setText($text = '')
|
||||
{
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a html part to the mail.
|
||||
* Also replaces image names with
|
||||
* content-id's.
|
||||
*/
|
||||
function setHtml($html, $text = null, $images_dir = null)
|
||||
{
|
||||
$this->html = $html;
|
||||
$this->html_text = $text;
|
||||
|
||||
if (isset($images_dir)) {
|
||||
$this->_findHtmlImages($images_dir);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for extracting images from
|
||||
* html source. This function will look
|
||||
* through the html code supplied by add_html()
|
||||
* and find any file that ends in one of the
|
||||
* extensions defined in $obj->image_types.
|
||||
* If the file exists it will read it in and
|
||||
* embed it, (not an attachment).
|
||||
*
|
||||
* @author Dan Allen
|
||||
*/
|
||||
function _findHtmlImages($images_dir)
|
||||
{
|
||||
// Build the list of image extensions
|
||||
while (list($key,) = each($this->image_types)) {
|
||||
$extensions[] = $key;
|
||||
}
|
||||
|
||||
preg_match_all('/(?:"|\')([^"\']+\.('.implode('|', $extensions).'))(?:"|\')/Ui', $this->html, $images);
|
||||
|
||||
for ($i=0; $i<count($images[1]); $i++) {
|
||||
if (file_exists($images_dir . $images[1][$i])) {
|
||||
$html_images[] = $images[1][$i];
|
||||
$this->html = str_replace($images[1][$i], basename($images[1][$i]), $this->html);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($html_images)) {
|
||||
|
||||
// If duplicate images are embedded, they may show up as attachments, so remove them.
|
||||
$html_images = array_unique($html_images);
|
||||
sort($html_images);
|
||||
|
||||
for ($i=0; $i<count($html_images); $i++) {
|
||||
if ($image = $this->getFile($images_dir.$html_images[$i])) {
|
||||
$ext = substr($html_images[$i], strrpos($html_images[$i], '.') + 1);
|
||||
$content_type = $this->image_types[strtolower($ext)];
|
||||
$this->addHtmlImage($image, basename($html_images[$i]), $content_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an image to the list of embedded
|
||||
* images.
|
||||
*/
|
||||
function addHtmlImage($file, $name = '', $c_type='application/octet-stream')
|
||||
{
|
||||
$this->html_images[] = array(
|
||||
'body' => $file,
|
||||
'name' => $name,
|
||||
'c_type' => $c_type,
|
||||
'cid' => md5(uniqid(time()))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a file to the list of attachments.
|
||||
*/
|
||||
function addAttachment($file, $name = '', $c_type='application/octet-stream', $encoding = 'base64')
|
||||
{
|
||||
$this->attachments[] = array(
|
||||
'body' => $file,
|
||||
'name' => $name,
|
||||
'c_type' => $c_type,
|
||||
'encoding' => $encoding
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a text subpart to a mime_part object
|
||||
*/
|
||||
function &_addTextPart(&$obj, $text)
|
||||
{
|
||||
$params['content_type'] = 'text/plain';
|
||||
$params['encoding'] = $this->build_params['text_encoding'];
|
||||
$params['charset'] = $this->build_params['text_charset'];
|
||||
if (is_object($obj)) {
|
||||
return $obj->addSubpart($text, $params);
|
||||
} else {
|
||||
return new Mail_mimePart($text, $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a html subpart to a mime_part object
|
||||
*/
|
||||
function &_addHtmlPart(&$obj)
|
||||
{
|
||||
$params['content_type'] = 'text/html';
|
||||
$params['encoding'] = $this->build_params['html_encoding'];
|
||||
$params['charset'] = $this->build_params['html_charset'];
|
||||
if (is_object($obj)) {
|
||||
return $obj->addSubpart($this->html, $params);
|
||||
} else {
|
||||
return new Mail_mimePart($this->html, $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts a message with a mixed part
|
||||
*/
|
||||
function &_addMixedPart()
|
||||
{
|
||||
$params['content_type'] = 'multipart/mixed';
|
||||
return new Mail_mimePart('', $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an alternative part to a mime_part object
|
||||
*/
|
||||
function &_addAlternativePart(&$obj)
|
||||
{
|
||||
$params['content_type'] = 'multipart/alternative';
|
||||
if (is_object($obj)) {
|
||||
return $obj->addSubpart('', $params);
|
||||
} else {
|
||||
return new Mail_mimePart('', $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a html subpart to a mime_part object
|
||||
*/
|
||||
function &_addRelatedPart(&$obj)
|
||||
{
|
||||
$params['content_type'] = 'multipart/related';
|
||||
if (is_object($obj)) {
|
||||
return $obj->addSubpart('', $params);
|
||||
} else {
|
||||
return new Mail_mimePart('', $params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an html image subpart to a mime_part object
|
||||
*/
|
||||
function &_addHtmlImagePart(&$obj, $value)
|
||||
{
|
||||
$params['content_type'] = $value['c_type'];
|
||||
$params['encoding'] = 'base64';
|
||||
$params['disposition'] = 'inline';
|
||||
$params['dfilename'] = $value['name'];
|
||||
$params['cid'] = $value['cid'];
|
||||
$obj->addSubpart($value['body'], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attachment subpart to a mime_part object
|
||||
*/
|
||||
function &_addAttachmentPart(&$obj, $value)
|
||||
{
|
||||
$params['content_type'] = $value['c_type'];
|
||||
$params['encoding'] = $value['encoding'];
|
||||
$params['disposition'] = 'attachment';
|
||||
$params['dfilename'] = $value['name'];
|
||||
$obj->addSubpart($value['body'], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the multipart message from the
|
||||
* list ($this->_parts). $params is an
|
||||
* array of parameters that shape the building
|
||||
* of the message. Currently supported are:
|
||||
*
|
||||
* $params['html_encoding'] - The type of encoding to use on html. Valid options are
|
||||
* "7bit", "quoted-printable" or "base64" (all without quotes).
|
||||
* 7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable
|
||||
* $params['text_encoding'] - The type of encoding to use on plain text Valid options are
|
||||
* "7bit", "quoted-printable" or "base64" (all without quotes).
|
||||
* Default is 7bit
|
||||
* $params['text_wrap'] - The character count at which to wrap 7bit encoded data.
|
||||
* Default this is 998.
|
||||
* $params['html_charset'] - The character set to use for a html section.
|
||||
* Default is ISO-8859-1
|
||||
* $params['text_charset'] - The character set to use for a text section.
|
||||
* - Default is ISO-8859-1
|
||||
* $params['head_charset'] - The character set to use for header encoding should it be needed.
|
||||
* - Default is ISO-8859-1
|
||||
*/
|
||||
function buildMessage($params = array())
|
||||
{
|
||||
if (!empty($params)) {
|
||||
while (list($key, $value) = each($params)) {
|
||||
$this->build_params[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->html_images)) {
|
||||
foreach ($this->html_images as $value) {
|
||||
$this->html = str_replace($value['name'], 'cid:'.$value['cid'], $this->html);
|
||||
}
|
||||
}
|
||||
|
||||
$null = null;
|
||||
$attachments = !empty($this->attachments) ? true : false;
|
||||
$html_images = !empty($this->html_images) ? true : false;
|
||||
$html = !empty($this->html) ? true : false;
|
||||
$text = isset($this->text) ? true : false;
|
||||
|
||||
switch (true) {
|
||||
case $text AND !$attachments:
|
||||
$message = &$this->_addTextPart($null, $this->text);
|
||||
break;
|
||||
|
||||
case !$text AND $attachments AND !$html:
|
||||
$message = &$this->_addMixedPart();
|
||||
|
||||
for ($i=0; $i<count($this->attachments); $i++) {
|
||||
$this->_addAttachmentPart($message, $this->attachments[$i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case $text AND $attachments:
|
||||
$message = &$this->_addMixedPart();
|
||||
$this->_addTextPart($message, $this->text);
|
||||
|
||||
for ($i=0; $i<count($this->attachments); $i++) {
|
||||
$this->_addAttachmentPart($message, $this->attachments[$i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case $html AND !$attachments AND !$html_images:
|
||||
if (!is_null($this->html_text)) {
|
||||
$message = &$this->_addAlternativePart($null);
|
||||
$this->_addTextPart($message, $this->html_text);
|
||||
$this->_addHtmlPart($message);
|
||||
} else {
|
||||
$message = &$this->_addHtmlPart($null);
|
||||
}
|
||||
break;
|
||||
|
||||
case $html AND !$attachments AND $html_images:
|
||||
if (!is_null($this->html_text)) {
|
||||
$message = &$this->_addAlternativePart($null);
|
||||
$this->_addTextPart($message, $this->html_text);
|
||||
$related = &$this->_addRelatedPart($message);
|
||||
} else {
|
||||
$message = &$this->_addRelatedPart($null);
|
||||
$related = &$message;
|
||||
}
|
||||
$this->_addHtmlPart($related);
|
||||
for ($i=0; $i<count($this->html_images); $i++) {
|
||||
$this->_addHtmlImagePart($related, $this->html_images[$i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case $html AND $attachments AND !$html_images:
|
||||
$message = &$this->_addMixedPart();
|
||||
if (!is_null($this->html_text)) {
|
||||
$alt = &$this->_addAlternativePart($message);
|
||||
$this->_addTextPart($alt, $this->html_text);
|
||||
$this->_addHtmlPart($alt);
|
||||
} else {
|
||||
$this->_addHtmlPart($message);
|
||||
}
|
||||
for ($i=0; $i<count($this->attachments); $i++) {
|
||||
$this->_addAttachmentPart($message, $this->attachments[$i]);
|
||||
}
|
||||
break;
|
||||
|
||||
case $html AND $attachments AND $html_images:
|
||||
$message = &$this->_addMixedPart();
|
||||
if (!is_null($this->html_text)) {
|
||||
$alt = &$this->_addAlternativePart($message);
|
||||
$this->_addTextPart($alt, $this->html_text);
|
||||
$rel = &$this->_addRelatedPart($alt);
|
||||
} else {
|
||||
$rel = &$this->_addRelatedPart($message);
|
||||
}
|
||||
$this->_addHtmlPart($rel);
|
||||
for ($i=0; $i<count($this->html_images); $i++) {
|
||||
$this->_addHtmlImagePart($rel, $this->html_images[$i]);
|
||||
}
|
||||
for ($i=0; $i<count($this->attachments); $i++) {
|
||||
$this->_addAttachmentPart($message, $this->attachments[$i]);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (isset($message)) {
|
||||
$output = $message->encode();
|
||||
$this->output = $output['body'];
|
||||
$this->headers = array_merge($this->headers, $output['headers']);
|
||||
|
||||
// Add message ID header
|
||||
srand((double)microtime()*10000000);
|
||||
//$message_id = sprintf('<%s.%s@%s>', base_convert(time(), 10, 36), base_convert(rand(), 10, 36), !empty($GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST']) ? $GLOBALS['HTTP_SERVER_VARS']['HTTP_HOST'] : $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']);
|
||||
// *** don't want to show atrium.ryzom.com in headers, so forcing to www.ryzom.com
|
||||
$message_id = sprintf('<%s.%s@%s>', base_convert(time(), 10, 36), base_convert(rand(), 10, 36), 'www.ryzom.com');
|
||||
$this->headers['Message-ID'] = $message_id;
|
||||
|
||||
$this->is_built = true;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to encode a header if necessary
|
||||
* according to RFC2047
|
||||
*/
|
||||
function _encodeHeader($input, $charset = 'ISO-8859-1')
|
||||
{
|
||||
preg_match_all('/(\w*[\x80-\xFF]+\w*)/', $input, $matches);
|
||||
foreach ($matches[1] as $value) {
|
||||
$replacement = preg_replace('/([\x80-\xFF])/e', '"=" . strtoupper(dechex(ord("\1")))', $value);
|
||||
$input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input);
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the mail.
|
||||
*
|
||||
* @param array $recipients
|
||||
* @param string $type OPTIONAL
|
||||
* @return mixed
|
||||
*/
|
||||
function send($recipients, $type = 'mail')
|
||||
{
|
||||
if (!defined('CRLF')) {
|
||||
$this->setCrlf($type == 'mail' ? "\n" : "\r\n");
|
||||
}
|
||||
|
||||
if (!$this->is_built) {
|
||||
$this->buildMessage();
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'mail':
|
||||
$subject = '';
|
||||
if (!empty($this->headers['Subject'])) {
|
||||
$subject = $this->_encodeHeader($this->headers['Subject'], $this->build_params['head_charset']);
|
||||
unset($this->headers['Subject']);
|
||||
}
|
||||
|
||||
// Get flat representation of headers
|
||||
foreach ($this->headers as $name => $value) {
|
||||
$headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
|
||||
}
|
||||
|
||||
$to = $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
|
||||
|
||||
if (!empty($this->return_path)) {
|
||||
$result = mail($to, $subject, $this->output, implode(CRLF, $headers), '-f' . $this->return_path);
|
||||
} else {
|
||||
$result = mail($to, $subject, $this->output, implode(CRLF, $headers));
|
||||
}
|
||||
|
||||
// Reset the subject in case mail is resent
|
||||
if ($subject !== '') {
|
||||
$this->headers['Subject'] = $subject;
|
||||
}
|
||||
|
||||
// Return
|
||||
return $result;
|
||||
break;
|
||||
|
||||
case 'smtp':
|
||||
require_once(dirname(__FILE__) . '/smtp.php');
|
||||
require_once(dirname(__FILE__) . '/RFC822.php');
|
||||
$smtp = &smtp::connect($this->smtp_params);
|
||||
|
||||
// Parse recipients argument for internet addresses
|
||||
foreach ($recipients as $recipient) {
|
||||
$addresses = Mail_RFC822::parseAddressList($recipient, $this->smtp_params['helo'], null, false);
|
||||
foreach ($addresses as $address) {
|
||||
$smtp_recipients[] = sprintf('%s@%s', $address->mailbox, $address->host);
|
||||
}
|
||||
}
|
||||
unset($addresses); // These are reused
|
||||
unset($address); // These are reused
|
||||
|
||||
// Get flat representation of headers, parsing
|
||||
// Cc and Bcc as we go
|
||||
foreach ($this->headers as $name => $value) {
|
||||
if ($name == 'Cc' OR $name == 'Bcc') {
|
||||
$addresses = Mail_RFC822::parseAddressList($value, $this->smtp_params['helo'], null, false);
|
||||
foreach ($addresses as $address) {
|
||||
$smtp_recipients[] = sprintf('%s@%s', $address->mailbox, $address->host);
|
||||
}
|
||||
}
|
||||
if ($name == 'Bcc') {
|
||||
continue;
|
||||
}
|
||||
$headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
|
||||
}
|
||||
// Add To header based on $recipients argument
|
||||
$headers[] = 'To: ' . $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
|
||||
|
||||
// Add headers to send_params
|
||||
$send_params['headers'] = $headers;
|
||||
$send_params['recipients'] = array_values(array_unique($smtp_recipients));
|
||||
$send_params['body'] = $this->output;
|
||||
|
||||
// Setup return path
|
||||
if (isset($this->return_path)) {
|
||||
$send_params['from'] = $this->return_path;
|
||||
} elseif (!empty($this->headers['From'])) {
|
||||
$from = Mail_RFC822::parseAddressList($this->headers['From']);
|
||||
$send_params['from'] = sprintf('%s@%s', $from[0]->mailbox, $from[0]->host);
|
||||
} else {
|
||||
$send_params['from'] = 'postmaster@' . $this->smtp_params['helo'];
|
||||
}
|
||||
|
||||
// Send it
|
||||
if (!$smtp->send($send_params)) {
|
||||
$this->errors = $smtp->errors;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to return the email
|
||||
* in message/rfc822 format. Useful for
|
||||
* adding an email to another email as
|
||||
* an attachment. there's a commented
|
||||
* out example in example.php.
|
||||
*/
|
||||
function getRFC822($recipients)
|
||||
{
|
||||
// Make up the date header as according to RFC822
|
||||
$this->setHeader('Date', date('D, d M y H:i:s O'));
|
||||
|
||||
if (!defined('CRLF')) {
|
||||
$this->setCrlf($type == 'mail' ? "\n" : "\r\n");
|
||||
}
|
||||
|
||||
if (!$this->is_built) {
|
||||
$this->buildMessage();
|
||||
}
|
||||
|
||||
// Return path ?
|
||||
if (isset($this->return_path)) {
|
||||
$headers[] = 'Return-Path: ' . $this->return_path;
|
||||
}
|
||||
|
||||
// Get flat representation of headers
|
||||
foreach ($this->headers as $name => $value) {
|
||||
$headers[] = $name . ': ' . $value;
|
||||
}
|
||||
$headers[] = 'To: ' . implode(', ', $recipients);
|
||||
|
||||
return implode(CRLF, $headers) . CRLF . CRLF . $this->output;
|
||||
}
|
||||
} // End of class.
|
||||
?>
|
@ -1,333 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2002 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available at through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Richard Heyes <richard@phpguru.org> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
/**
|
||||
*
|
||||
* Raw mime encoding class
|
||||
*
|
||||
* What is it?
|
||||
* This class enables you to manipulate and build
|
||||
* a mime email from the ground up.
|
||||
*
|
||||
* Why use this instead of mime.php?
|
||||
* mime.php is a userfriendly api to this class for
|
||||
* people who aren't interested in the internals of
|
||||
* mime mail. This class however allows full control
|
||||
* over the email.
|
||||
*
|
||||
* Eg.
|
||||
*
|
||||
* // Since multipart/mixed has no real body, (the body is
|
||||
* // the subpart), we set the body argument to blank.
|
||||
*
|
||||
* $params['content_type'] = 'multipart/mixed';
|
||||
* $email = new Mail_mimePart('', $params);
|
||||
*
|
||||
* // Here we add a text part to the multipart we have
|
||||
* // already. Assume $body contains plain text.
|
||||
*
|
||||
* $params['content_type'] = 'text/plain';
|
||||
* $params['encoding'] = '7bit';
|
||||
* $text = $email->addSubPart($body, $params);
|
||||
*
|
||||
* // Now add an attachment. Assume $attach is
|
||||
* the contents of the attachment
|
||||
*
|
||||
* $params['content_type'] = 'application/zip';
|
||||
* $params['encoding'] = 'base64';
|
||||
* $params['disposition'] = 'attachment';
|
||||
* $params['dfilename'] = 'example.zip';
|
||||
* $attach =& $email->addSubPart($body, $params);
|
||||
*
|
||||
* // Now build the email. Note that the encode
|
||||
* // function returns an associative array containing two
|
||||
* // elements, body and headers. You will need to add extra
|
||||
* // headers, (eg. Mime-Version) before sending.
|
||||
*
|
||||
* $email = $message->encode();
|
||||
* $email['headers'][] = 'Mime-Version: 1.0';
|
||||
*
|
||||
*
|
||||
* Further examples are available at http://www.phpguru.org
|
||||
*
|
||||
* TODO:
|
||||
* - Set encode() to return the $obj->encoded if encode()
|
||||
* has already been run. Unless a flag is passed to specifically
|
||||
* re-build the message.
|
||||
*
|
||||
* @author Richard Heyes <richard@phpguru.org>
|
||||
* @version $Revision: 1.1 $
|
||||
* @package Mail
|
||||
*/
|
||||
|
||||
class Mail_mimePart {
|
||||
|
||||
/**
|
||||
* The encoding type of this part
|
||||
* @var string
|
||||
*/
|
||||
var $_encoding;
|
||||
|
||||
/**
|
||||
* An array of subparts
|
||||
* @var array
|
||||
*/
|
||||
var $_subparts;
|
||||
|
||||
/**
|
||||
* The output of this part after being built
|
||||
* @var string
|
||||
*/
|
||||
var $_encoded;
|
||||
|
||||
/**
|
||||
* Headers for this part
|
||||
* @var array
|
||||
*/
|
||||
var $_headers;
|
||||
|
||||
/**
|
||||
* The body of this part (not encoded)
|
||||
* @var string
|
||||
*/
|
||||
var $_body;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* Sets up the object.
|
||||
*
|
||||
* @param $body - The body of the mime part if any.
|
||||
* @param $params - An associative array of parameters:
|
||||
* content_type - The content type for this part eg multipart/mixed
|
||||
* encoding - The encoding to use, 7bit, 8bit, base64, or quoted-printable
|
||||
* cid - Content ID to apply
|
||||
* disposition - Content disposition, inline or attachment
|
||||
* dfilename - Optional filename parameter for content disposition
|
||||
* description - Content description
|
||||
* charset - Character set to use
|
||||
* @access public
|
||||
*/
|
||||
function Mail_mimePart($body = '', $params = array())
|
||||
{
|
||||
if (!defined('MAIL_MIMEPART_CRLF')) {
|
||||
define('MAIL_MIMEPART_CRLF', defined('MAIL_MIME_CRLF') ? MAIL_MIME_CRLF : "\r\n", TRUE);
|
||||
}
|
||||
|
||||
foreach ($params as $key => $value) {
|
||||
switch ($key) {
|
||||
case 'content_type':
|
||||
$headers['Content-Type'] = $value . (isset($charset) ? '; charset="' . $charset . '"' : '');
|
||||
break;
|
||||
|
||||
case 'encoding':
|
||||
$this->_encoding = $value;
|
||||
$headers['Content-Transfer-Encoding'] = $value;
|
||||
break;
|
||||
|
||||
case 'cid':
|
||||
$headers['Content-ID'] = '<' . $value . '>';
|
||||
break;
|
||||
|
||||
case 'disposition':
|
||||
$headers['Content-Disposition'] = $value . (isset($dfilename) ? '; filename="' . $dfilename . '"' : '');
|
||||
break;
|
||||
|
||||
case 'dfilename':
|
||||
if (isset($headers['Content-Disposition'])) {
|
||||
$headers['Content-Disposition'] .= '; filename="' . $value . '"';
|
||||
} else {
|
||||
$dfilename = $value;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'description':
|
||||
$headers['Content-Description'] = $value;
|
||||
break;
|
||||
|
||||
case 'charset':
|
||||
if (isset($headers['Content-Type'])) {
|
||||
$headers['Content-Type'] .= '; charset="' . $value . '"';
|
||||
} else {
|
||||
$charset = $value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Default content-type
|
||||
if (!isset($headers['Content-Type'])) {
|
||||
$headers['Content-Type'] = 'text/plain';
|
||||
}
|
||||
|
||||
//Default encoding
|
||||
if (!isset($this->_encoding)) {
|
||||
$this->_encoding = '7bit';
|
||||
}
|
||||
|
||||
// Assign stuff to member variables
|
||||
$this->_encoded = array();
|
||||
$this->_headers = $headers;
|
||||
$this->_body = $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* encode()
|
||||
*
|
||||
* Encodes and returns the email. Also stores
|
||||
* it in the encoded member variable
|
||||
*
|
||||
* @return An associative array containing two elements,
|
||||
* body and headers. The headers element is itself
|
||||
* an indexed array.
|
||||
* @access public
|
||||
*/
|
||||
function encode()
|
||||
{
|
||||
$encoded =& $this->_encoded;
|
||||
|
||||
if (!empty($this->_subparts)) {
|
||||
srand((double)microtime()*1000000);
|
||||
$boundary = '=_' . md5(uniqid(rand()) . microtime());
|
||||
$this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"';
|
||||
|
||||
// Add body parts to $subparts
|
||||
for ($i = 0; $i < count($this->_subparts); $i++) {
|
||||
$headers = array();
|
||||
$tmp = $this->_subparts[$i]->encode();
|
||||
foreach ($tmp['headers'] as $key => $value) {
|
||||
$headers[] = $key . ': ' . $value;
|
||||
}
|
||||
$subparts[] = implode(MAIL_MIMEPART_CRLF, $headers) . MAIL_MIMEPART_CRLF . MAIL_MIMEPART_CRLF . $tmp['body'];
|
||||
}
|
||||
|
||||
$encoded['body'] = '--' . $boundary . MAIL_MIMEPART_CRLF .
|
||||
implode('--' . $boundary . MAIL_MIMEPART_CRLF, $subparts) .
|
||||
'--' . $boundary.'--' . MAIL_MIMEPART_CRLF;
|
||||
|
||||
} else {
|
||||
$encoded['body'] = $this->_getEncodedData($this->_body, $this->_encoding) . MAIL_MIMEPART_CRLF;
|
||||
}
|
||||
|
||||
// Add headers to $encoded
|
||||
$encoded['headers'] =& $this->_headers;
|
||||
|
||||
return $encoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* &addSubPart()
|
||||
*
|
||||
* Adds a subpart to current mime part and returns
|
||||
* a reference to it
|
||||
*
|
||||
* @param $body The body of the subpart, if any.
|
||||
* @param $params The parameters for the subpart, same
|
||||
* as the $params argument for constructor.
|
||||
* @return A reference to the part you just added. It is
|
||||
* crucial if using multipart/* in your subparts that
|
||||
* you use =& in your script when calling this function,
|
||||
* otherwise you will not be able to add further subparts.
|
||||
* @access public
|
||||
*/
|
||||
function &addSubPart($body, $params)
|
||||
{
|
||||
$this->_subparts[] = new Mail_mimePart($body, $params);
|
||||
return $this->_subparts[count($this->_subparts) - 1];
|
||||
}
|
||||
|
||||
/**
|
||||
* _getEncodedData()
|
||||
*
|
||||
* Returns encoded data based upon encoding passed to it
|
||||
*
|
||||
* @param $data The data to encode.
|
||||
* @param $encoding The encoding type to use, 7bit, base64,
|
||||
* or quoted-printable.
|
||||
* @access private
|
||||
*/
|
||||
function _getEncodedData($data, $encoding)
|
||||
{
|
||||
switch ($encoding) {
|
||||
case '8bit':
|
||||
case '7bit':
|
||||
return $data;
|
||||
break;
|
||||
|
||||
case 'quoted-printable':
|
||||
return $this->_quotedPrintableEncode($data);
|
||||
break;
|
||||
|
||||
case 'base64':
|
||||
return rtrim(chunk_split(base64_encode($data), 76, MAIL_MIMEPART_CRLF));
|
||||
break;
|
||||
|
||||
default:
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* quoteadPrintableEncode()
|
||||
*
|
||||
* Encodes data to quoted-printable standard.
|
||||
*
|
||||
* @param $input The data to encode
|
||||
* @param $line_max Optional max line length. Should
|
||||
* not be more than 76 chars
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _quotedPrintableEncode($input , $line_max = 76)
|
||||
{
|
||||
$lines = preg_split("/\r?\n/", $input);
|
||||
$eol = MAIL_MIMEPART_CRLF;
|
||||
$escape = '=';
|
||||
$output = '';
|
||||
|
||||
while(list(, $line) = each($lines)){
|
||||
|
||||
$linlen = strlen($line);
|
||||
$newline = '';
|
||||
|
||||
for ($i = 0; $i < $linlen; $i++) {
|
||||
$char = substr($line, $i, 1);
|
||||
$dec = ord($char);
|
||||
|
||||
if (($dec == 32) AND ($i == ($linlen - 1))){ // convert space at eol only
|
||||
$char = '=20';
|
||||
|
||||
} elseif($dec == 9) {
|
||||
; // Do nothing if a tab.
|
||||
} elseif(($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) {
|
||||
$char = $escape . strtoupper(sprintf('%02s', dechex($dec)));
|
||||
}
|
||||
|
||||
if ((strlen($newline) + strlen($char)) >= $line_max) { // MAIL_MIMEPART_CRLF is not counted
|
||||
$output .= $newline . $escape . $eol; // soft line break; " =\r\n" is okay
|
||||
$newline = '';
|
||||
}
|
||||
$newline .= $char;
|
||||
} // end of for
|
||||
$output .= $newline . $eol;
|
||||
}
|
||||
$output = substr($output, 0, -1 * strlen($eol)); // Don't want last crlf
|
||||
return $output;
|
||||
}
|
||||
} // End of class
|
||||
?>
|
@ -1,359 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Filename.......: class.smtp.inc
|
||||
* Project........: SMTP Class
|
||||
* Version........: 1.0.5
|
||||
* Last Modified..: 21 December 2001
|
||||
*/
|
||||
|
||||
define('SMTP_STATUS_NOT_CONNECTED', 1, TRUE);
|
||||
define('SMTP_STATUS_CONNECTED', 2, TRUE);
|
||||
|
||||
class smtp{
|
||||
|
||||
var $authenticated;
|
||||
var $connection;
|
||||
var $recipients;
|
||||
var $headers;
|
||||
var $timeout;
|
||||
var $errors;
|
||||
var $status;
|
||||
var $body;
|
||||
var $from;
|
||||
var $host;
|
||||
var $port;
|
||||
var $helo;
|
||||
var $auth;
|
||||
var $user;
|
||||
var $pass;
|
||||
|
||||
/**
|
||||
* Constructor function. Arguments:
|
||||
* $params - An assoc array of parameters:
|
||||
*
|
||||
* host - The hostname of the smtp server Default: localhost
|
||||
* port - The port the smtp server runs on Default: 25
|
||||
* helo - What to send as the HELO command Default: localhost
|
||||
* (typically the hostname of the
|
||||
* machine this script runs on)
|
||||
* auth - Whether to use basic authentication Default: FALSE
|
||||
* user - Username for authentication Default: <blank>
|
||||
* pass - Password for authentication Default: <blank>
|
||||
* timeout - The timeout in seconds for the call Default: 5
|
||||
* to fsockopen()
|
||||
*/
|
||||
|
||||
function smtp($params = array()){
|
||||
|
||||
if(!defined('CRLF'))
|
||||
define('CRLF', "\r\n", TRUE);
|
||||
|
||||
$this->authenticated = FALSE;
|
||||
$this->timeout = 5;
|
||||
$this->status = SMTP_STATUS_NOT_CONNECTED;
|
||||
$this->host = 'localhost';
|
||||
$this->port = 25;
|
||||
$this->helo = 'localhost';
|
||||
$this->auth = FALSE;
|
||||
$this->user = '';
|
||||
$this->pass = '';
|
||||
$this->errors = array();
|
||||
|
||||
foreach($params as $key => $value){
|
||||
$this->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect function. This will, when called
|
||||
* statically, create a new smtp object,
|
||||
* call the connect function (ie this function)
|
||||
* and return it. When not called statically,
|
||||
* it will connect to the server and send
|
||||
* the HELO command.
|
||||
*/
|
||||
|
||||
function &connect($params = array()){
|
||||
|
||||
if(!isset($this->status)){
|
||||
$obj = new smtp($params);
|
||||
if($obj->connect()){
|
||||
$obj->status = SMTP_STATUS_CONNECTED;
|
||||
}
|
||||
|
||||
return $obj;
|
||||
|
||||
}else{
|
||||
$this->connection = fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
|
||||
if(function_exists('socket_set_timeout')){
|
||||
@socket_set_timeout($this->connection, 5, 0);
|
||||
}
|
||||
|
||||
$greeting = $this->get_data();
|
||||
if(is_resource($this->connection)){
|
||||
return $this->auth ? $this->ehlo() : $this->helo();
|
||||
}else{
|
||||
$this->errors[] = 'Failed to connect to server: '.$errstr;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function which handles sending the mail.
|
||||
* Arguments:
|
||||
* $params - Optional assoc array of parameters.
|
||||
* Can contain:
|
||||
* recipients - Indexed array of recipients
|
||||
* from - The from address. (used in MAIL FROM:),
|
||||
* this will be the return path
|
||||
* headers - Indexed array of headers, one header per array entry
|
||||
* body - The body of the email
|
||||
* It can also contain any of the parameters from the connect()
|
||||
* function
|
||||
*/
|
||||
|
||||
function send($params = array()){
|
||||
|
||||
foreach($params as $key => $value){
|
||||
$this->set($key, $value);
|
||||
}
|
||||
|
||||
if($this->is_connected()){
|
||||
|
||||
// Do we auth or not? Note the distinction between the auth variable and auth() function
|
||||
if($this->auth AND !$this->authenticated){
|
||||
if(!$this->auth())
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$this->mail($this->from);
|
||||
if(is_array($this->recipients))
|
||||
foreach($this->recipients as $value)
|
||||
$this->rcpt($value);
|
||||
else
|
||||
$this->rcpt($this->recipients);
|
||||
|
||||
if(!$this->data())
|
||||
return FALSE;
|
||||
|
||||
// Transparency
|
||||
$headers = str_replace(CRLF.'.', CRLF.'..', trim(implode(CRLF, $this->headers)));
|
||||
$body = str_replace(CRLF.'.', CRLF.'..', $this->body);
|
||||
$body = $body[0] == '.' ? '.'.$body : $body;
|
||||
|
||||
$this->send_data($headers);
|
||||
$this->send_data('');
|
||||
$this->send_data($body);
|
||||
$this->send_data('.');
|
||||
|
||||
$result = (substr(trim($this->get_data()), 0, 3) === '250');
|
||||
//$this->rset();
|
||||
return $result;
|
||||
}else{
|
||||
$this->errors[] = 'Not connected!';
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to implement HELO cmd
|
||||
*/
|
||||
|
||||
function helo(){
|
||||
if(is_resource($this->connection)
|
||||
AND $this->send_data('HELO '.$this->helo)
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = 'HELO command failed, output: ' . trim(substr(trim($error),3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to implement EHLO cmd
|
||||
*/
|
||||
|
||||
function ehlo(){
|
||||
if(is_resource($this->connection)
|
||||
AND $this->send_data('EHLO '.$this->helo)
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = 'EHLO command failed, output: ' . trim(substr(trim($error),3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to implement RSET cmd
|
||||
*/
|
||||
|
||||
function rset(){
|
||||
if(is_resource($this->connection)
|
||||
AND $this->send_data('RSET')
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '250' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = 'RSET command failed, output: ' . trim(substr(trim($error),3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to implement QUIT cmd
|
||||
*/
|
||||
|
||||
function quit(){
|
||||
if(is_resource($this->connection)
|
||||
AND $this->send_data('QUIT')
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '221' ){
|
||||
|
||||
fclose($this->connection);
|
||||
$this->status = SMTP_STATUS_NOT_CONNECTED;
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = 'QUIT command failed, output: ' . trim(substr(trim($error),3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to implement AUTH cmd
|
||||
*/
|
||||
|
||||
function auth(){
|
||||
if(is_resource($this->connection)
|
||||
AND $this->send_data('AUTH LOGIN')
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '334'
|
||||
AND $this->send_data(base64_encode($this->user)) // Send username
|
||||
AND substr(trim($error = $this->get_data()),0,3) === '334'
|
||||
AND $this->send_data(base64_encode($this->pass)) // Send password
|
||||
AND substr(trim($error = $this->get_data()),0,3) === '235' ){
|
||||
|
||||
$this->authenticated = TRUE;
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = 'AUTH command failed: ' . trim(substr(trim($error),3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that handles the MAIL FROM: cmd
|
||||
*/
|
||||
|
||||
function mail($from){
|
||||
|
||||
if($this->is_connected()
|
||||
AND $this->send_data('MAIL FROM:<'.$from.'>')
|
||||
AND substr(trim($this->get_data()), 0, 2) === '250' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that handles the RCPT TO: cmd
|
||||
*/
|
||||
|
||||
function rcpt($to){
|
||||
|
||||
if($this->is_connected()
|
||||
AND $this->send_data('RCPT TO:<'.$to.'>')
|
||||
AND substr(trim($error = $this->get_data()), 0, 2) === '25' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = trim(substr(trim($error), 3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that sends the DATA cmd
|
||||
*/
|
||||
|
||||
function data(){
|
||||
|
||||
if($this->is_connected()
|
||||
AND $this->send_data('DATA')
|
||||
AND substr(trim($error = $this->get_data()), 0, 3) === '354' ){
|
||||
|
||||
return TRUE;
|
||||
|
||||
}else{
|
||||
$this->errors[] = trim(substr(trim($error), 3));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to determine if this object
|
||||
* is connected to the server or not.
|
||||
*/
|
||||
|
||||
function is_connected(){
|
||||
|
||||
return (is_resource($this->connection) AND ($this->status === SMTP_STATUS_CONNECTED));
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to send a bit of data
|
||||
*/
|
||||
|
||||
function send_data($data){
|
||||
|
||||
if(is_resource($this->connection)){
|
||||
return fwrite($this->connection, $data.CRLF, strlen($data)+2);
|
||||
|
||||
}else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to get data.
|
||||
*/
|
||||
|
||||
function &get_data(){
|
||||
|
||||
$return = '';
|
||||
$line = '';
|
||||
$loops = 0;
|
||||
|
||||
if(is_resource($this->connection)){
|
||||
while((strpos($return, CRLF) === FALSE OR substr($line,3,1) !== ' ') AND $loops < 100){
|
||||
$line = fgets($this->connection, 512);
|
||||
$return .= $line;
|
||||
$loops++;
|
||||
}
|
||||
return $return;
|
||||
|
||||
}else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a variable
|
||||
*/
|
||||
|
||||
function set($var, $value){
|
||||
|
||||
$this->$var = $value;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
} // End of class
|
||||
?>
|
@ -1,108 +0,0 @@
|
||||
<?php
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// WARNING : this is a generated file, don't change it !
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
require_once('../tools/nel_message.php');
|
||||
|
||||
class CLoginServiceWeb extends CCallbackClient
|
||||
{
|
||||
|
||||
function login($userId, $ipAddress, $domainId)
|
||||
{
|
||||
$msg = new CMessage;
|
||||
$msg->setName("LG");
|
||||
|
||||
|
||||
$msg->serialUint32($userId);
|
||||
$msg->serialString($ipAddress);
|
||||
$msg->serialUint32($domainId);
|
||||
|
||||
return parent::sendMessage($msg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function logout($userId)
|
||||
{
|
||||
$msg = new CMessage;
|
||||
$msg->setName("LO");
|
||||
|
||||
|
||||
$msg->serialUint32($userId);
|
||||
|
||||
return parent::sendMessage($msg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function waitCallback()
|
||||
{
|
||||
$message = parent::waitMessage();
|
||||
|
||||
if ($message == false)
|
||||
return false;
|
||||
|
||||
switch($message->MsgName)
|
||||
{
|
||||
case "LGR":
|
||||
$this->loginResult_skel($message);
|
||||
break;
|
||||
case "LGOR":
|
||||
$this->logoutResult_skel($message);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function loginResult_skel(&$message)
|
||||
{
|
||||
$message->serialUint32($userId);
|
||||
$message->serialString($cookie);
|
||||
$message->serialUint32($resultCode);
|
||||
$message->serialString($errorString);
|
||||
|
||||
$this->loginResult($userId, $cookie, $resultCode, $errorString);
|
||||
}
|
||||
|
||||
function logoutResult_skel(&$message)
|
||||
{
|
||||
$message->serialUint32($errorCode);
|
||||
$message->serialString($reason);
|
||||
|
||||
$this->logoutResult($errorCode, $reason);
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Copy paste this part of code in your derived class
|
||||
// and implement code to ract to incoming message
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Return the cookie generated for this user session
|
||||
// Eventualy, return an empty string as cookie in case of error
|
||||
// resultCode : 0 - ok, login success
|
||||
// 1 - invalid user
|
||||
// 2 - user already online, must relog
|
||||
// errorString contain a stringified description in case of error
|
||||
|
||||
function loginResult($userId, $cookie, $resultCode, $errorString)
|
||||
{
|
||||
}
|
||||
|
||||
// Return an error code for the logout attemp
|
||||
// If return is not 0, then reason contains a debug string
|
||||
// Return values : 0 - ok
|
||||
// 1 - invalid user
|
||||
// 2 - user already offline
|
||||
|
||||
function logoutResult($errorCode, $reason)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -1,345 +0,0 @@
|
||||
<?
|
||||
|
||||
/*
|
||||
* Message tables.
|
||||
* Each msg can contain %0..%n arguments (see also errorMsg()).
|
||||
* %0 contains the error code passed to errorMsg(), even if the text is factorized in another message linked with 'lnk'.
|
||||
*/
|
||||
|
||||
$ErrMsgs = array();
|
||||
|
||||
// Generic error message
|
||||
define('GENERIC_ERROR_NUM', 1000);
|
||||
$ErrMsgs[1000]['dbg'] = 'Generic login error';
|
||||
$ErrMsgs[1000]['en'] = 'Error';
|
||||
$ErrMsgs[1000]['fr'] = 'Erreur';
|
||||
$ErrMsgs[1000]['de'] = 'Error';
|
||||
|
||||
// Common public error messages
|
||||
$msgMisconfiguredClient['en'] = 'Your client might be misconfigured, please contact support';
|
||||
$msgMisconfiguredClient['fr'] = 'Il se peut que votre client soit mal configuré, merci de contacter le service client';
|
||||
$msgMisconfiguredClient['de'] = 'Dein Client ist möglicherweise falsch konfiguriert, bitte kontaktiere den Support';
|
||||
$msgOutOfDateClient['en'] = 'This client software is out of date, please visit www.ryzom.com to download a new client';
|
||||
$msgOutOfDateClient['fr'] = 'Ce logiciel client est trop ancien, merci de télécharger un nouveau client sur www.ryzom.com';
|
||||
$msgOutOfDateClient['de'] = 'Die Software ist nicht mehr aktuell bitte geh auf www.ryzom.com und lade dir den neuen Client herunter';
|
||||
$msgLSInMaintenance['en'] = 'The log-in server is in maintenance, please try later';
|
||||
$msgLSInMaintenance['fr'] = 'Le serveur de connexion est en maintenance, merci de réessayer plus tard';
|
||||
$msgLSInMaintenance['de'] = 'Der Login-Server ist wegen Wartungsarbeiten offline, bitte versuch es später nochmal';
|
||||
$msgDBInMaintenance['en'] = 'The database server is in maintenance, please try later';
|
||||
$msgDBInMaintenance['fr'] = 'Le serveur de base de données est en maintenance, merci de réessayer plus tard';
|
||||
$msgDBInMaintenance['de'] = 'Der Datenbank-Server ist wegen Wartungsarbeiten offline, bitte versuch es später nochmal';
|
||||
$msgGameServersClosed['en'] = 'Game servers are currently closed or restricted, please retry later';
|
||||
$msgGameServersClosed['fr'] = 'Les serveurs de jeu sont actuellement fermés ou à accès restreint, merci de réessayer plus tard';
|
||||
$msgGameServersClosed['de'] = 'Die Spiel-Server sind momentan geschlossen oder gesperrt, bitte versuch es später nochmal';
|
||||
|
||||
/*
|
||||
* Main account error messages:
|
||||
*/
|
||||
$ErrMsgs[2001]['dbg'] = '(in %2)';
|
||||
$ErrMsgs[2001]['en'] = 'Invalid account: %1'; // ex 52 and 64
|
||||
$ErrMsgs[2001]['fr'] = 'Compte erroné : %1';
|
||||
$ErrMsgs[2001]['de'] = 'Ungültiger Account: %1';
|
||||
$ErrMsgs[2001]['log'] = false;
|
||||
|
||||
$ErrMsgs[2002]['en'] = "Your account must be activated first. Please read the email sent to %1.";
|
||||
$ErrMsgs[2002]['fr'] = "Votre compte doit d'abord être activé. Merci de lire l'e-mail envoyé à %1.";
|
||||
$ErrMsgs[2002]['de'] = "Dein Account muss noch aktiviert werden. Bitte befolge die Anweisungen, die wir per Mail an %1 geschickt haben.";
|
||||
$ErrMsgs[2002]['log'] = false;
|
||||
|
||||
$ErrMsgs[2003]['en'] = "Your account must be activated first. Please read the email that has been sent to you.";
|
||||
$ErrMsgs[2003]['fr'] = "Votre compte doit d'abord être activé. Merci de lire l'e-mail que nous vous avons envoyé.";
|
||||
$ErrMsgs[2003]['de'] = "Dein Account muss noch aktiviert werden. Bitte befolge die Anweisungen, die wir per Mail an Dich geschickt haben.";
|
||||
$ErrMsgs[2003]['log'] = false;
|
||||
|
||||
$ErrMsgs[2004]['dbg'] = '(in %2)'; // user => ex 56; signup_data => ex 56B
|
||||
$ErrMsgs[2004]['en'] = "Invalid password";
|
||||
$ErrMsgs[2004]['fr'] = "Mot de passe erroné";
|
||||
$ErrMsgs[2004]['de'] = "Falsches Passwort";
|
||||
$ErrMsgs[2004]['log'] = false;
|
||||
|
||||
// Translated Login Service error messages
|
||||
define('BASE_TRANSLATED_LS_ERROR_NUM', 2100);
|
||||
|
||||
$ErrMsgs[2101]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2101]['en'] = 'Invalid account'; // ex 1?: 'invalid user'
|
||||
$ErrMsgs[2101]['fr'] = 'Compte erroné';
|
||||
$ErrMsgs[2101]['de'] = 'Ungültiger Account';
|
||||
|
||||
$ErrMsgs[2102]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2102]['en'] = 'Your account is already in online state, please retry in a few seconds'; // ex 2: 'User already online, please relog'
|
||||
$ErrMsgs[2102]['fr'] = "Votre compte est encore dans l'état en ligne, merci de réessayer dans quelques secondes";
|
||||
$ErrMsgs[2102]['de'] = 'Dein Account ist schon als online gekennzeichnet, bitte versuche es in ein paar Sekunden nochmals';
|
||||
$ErrMsgs[2102]['log'] = false;
|
||||
|
||||
$ErrMsgs[2103]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2103]['en'] = 'Dual logging with a Privileged account is not permitted; this action has been logged and Gameforge CS has been notified';
|
||||
$ErrMsgs[2103]['fr'] = 'TODO';
|
||||
$ErrMsgs[2103]['de'] = 'TODO';
|
||||
$ErrMsgs[2103]['mail'] = array('duallog@ryzom.com', "Dual Logging with GM account detected",
|
||||
"UserId %3 attempted to log-in while related account (linked through GMId) was in online state (error code %0).\n".
|
||||
"Message from server: %2\n".
|
||||
"This could be a false positive if the user just disconnected without waiting for 30 s, and tried to log-in with their other account.");
|
||||
|
||||
$ErrMsgs[2104]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2104]['lnk'] = $ErrMsgs[2103];
|
||||
|
||||
$ErrMsgs[2105]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2105]['lnk'] = $ErrMsgs[2101];
|
||||
|
||||
$ErrMsgs[2106]['dbg'] = '(LS error %1: %2 for userId %3)';
|
||||
$ErrMsgs[2106]['lnk'] = $msgDBInMaintenance;
|
||||
|
||||
|
||||
/*
|
||||
* Technical error messages:
|
||||
* "visible" error messages (server down, etc.) are localized,
|
||||
* unlike errors that should never occur (ex: bad parameters from client)
|
||||
*/
|
||||
define('BASE_TECHNICAL_ERROR_NUM', 3000);
|
||||
|
||||
$ErrMsgs[3001]['dbg'] = 'Failed to find a ring domain record for domainId: %1';
|
||||
|
||||
$ErrMsgs[3002]['dbg'] = 'Missing cmd';
|
||||
|
||||
$ErrMsgs[3003]['dbg'] = 'No response from Shard Unifier';
|
||||
$ErrMsgs[3003]['lnk'] = $msgLSInMaintenance;
|
||||
|
||||
$ErrMsgs[3004]['dbg'] = "Can't connect to the %1 db server host:%2 user:%3";
|
||||
$ErrMsgs[3004]['lnk'] = $msgDBInMaintenance;
|
||||
|
||||
$ErrMsgs[3005]['dbg'] = "Can't access the %1 database db:%2 host:%3 user:%4 (check privileges)";
|
||||
$ErrMsgs[3005]['lnk'] = $msgDBInMaintenance;
|
||||
|
||||
$ErrMsgs[3006]['dbg'] = "Can't execute query '%1' on the %2 database db:%3 host:%4 user:%5 error:%6";
|
||||
$ErrMsgs[3006]['lnk'] = $msgDBInMaintenance;
|
||||
|
||||
$ErrMsgs[3007]['dbg'] = "Can't find domain: %1"; // ex 'x'
|
||||
$ErrMsgs[3007]['lnk'] = $msgMisconfiguredClient;
|
||||
$ErrMsgs[3007]['add'] = 'dbg';
|
||||
|
||||
$ErrMsgs[3008]['dbg'] = "Login '%1' was created because it was not found in database"; // ex 50
|
||||
|
||||
$ErrMsgs[3009]['dbg'] = "Can't fetch login '%1' after insertion"; // ex 51
|
||||
|
||||
$ErrMsgs[3010]['dbg'] = "No permission found, but I need to accept Unknown user, so permission created, please RELOG";
|
||||
|
||||
$ErrMsgs[3011]['dbg'] = "(client application: %1 domain: %2)"; // ex 53
|
||||
$ErrMsgs[3011]['en'] = "Your account needs a proper subscription to connect";
|
||||
$ErrMsgs[3011]['fr'] = "Votre compte doit avoir un abonnement actif pour se connecter";
|
||||
$ErrMsgs[3011]['de'] = 'Du kannst dich nicht ohne abgeschlossenes Abonemment in deinen Account einloggen';
|
||||
$ErrMsgs[3011]['add'] = 'dbg';
|
||||
$ErrMsgs[3011]['log'] = false;
|
||||
|
||||
$ErrMsgs[3012]['dbg'] = "No access privilege found for %1, but I need to accept Unknown user, so permission created, RELOG";
|
||||
|
||||
$ErrMsgs[3013]['dbg'] = "(client application: %1 domain: %2 reqPriv: %3)";
|
||||
$ErrMsgs[3013]['en'] = "You don't have sufficient privilege to connect now, please try later";
|
||||
$ErrMsgs[3013]['fr'] = "Vous n'avez pas les privilèges nécessaires pour vous connecter maintenant, veuillez essayer plus tard";
|
||||
$ErrMsgs[3013]['de'] = 'Du hast nicht die nötigen Rechte um dich jetzt zu verbinden, bitte versuch es später nochmal';
|
||||
$ErrMsgs[3013]['log'] = false;
|
||||
|
||||
// Translated Ring Session Manager (joinSession) error messages
|
||||
define('BASE_TRANSLATED_RSM_ERROR_NUM', 4000);
|
||||
|
||||
$ErrMsgs[4001]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4002]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4003]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4004]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
|
||||
$ErrMsgs[4005]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||
$ErrMsgs[4005]['lnk'] = $msgGameServersClosed;
|
||||
|
||||
$ErrMsgs[4006]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4007]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4008]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4009]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
|
||||
$ErrMsgs[4010]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||
$ErrMsgs[4010]['lnk'] = $msgGameServersClosed;
|
||||
|
||||
$ErrMsgs[4011]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4012]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4013]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
|
||||
$ErrMsgs[4014]['dbg'] = '(joinSession error %1: %2 for userId %3)';
|
||||
$ErrMsgs[4014]['lnk'] = $msgGameServersClosed;
|
||||
|
||||
$ErrMsgs[4015]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4016]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4017]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4018]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4019]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
$ErrMsgs[4020]['dbg'] = 'joinSession error %1: %2 for userId %3';
|
||||
|
||||
|
||||
$MsgLanguages = array('en');
|
||||
$DisplayDbg = false;
|
||||
|
||||
/**
|
||||
* Whenever a language information is known, use this method to refine the language used for error messages.
|
||||
* Accepted values:
|
||||
* 'en', 'fr', 'de', array of this values, or 'all' ('all' will display all versions)
|
||||
*/
|
||||
function setMsgLanguage($languages='en')
|
||||
{
|
||||
global $MsgLanguages;
|
||||
if ($languages == 'all')
|
||||
{
|
||||
$MsgLanguages = $languages;
|
||||
return;
|
||||
}
|
||||
if (!is_array($languages))
|
||||
$languages = array($languages);
|
||||
foreach ($languages as $index => $lg)
|
||||
{
|
||||
switch ($lg)
|
||||
{
|
||||
case 'fr':
|
||||
case 'de':;
|
||||
break;
|
||||
default:
|
||||
$languages[$index] = 'en';
|
||||
}
|
||||
}
|
||||
$MsgLanguages = $languages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the specified error message, and return the first found with the following precedence:
|
||||
* 1. Current language(s) set by setMsgLangage()
|
||||
* 2. English message
|
||||
* 3. Debug message
|
||||
* 4. Generic error
|
||||
* Each language can be found through ['lnk'] if needed
|
||||
* Tags (%1..%n) in the message are replaced by mixed arguments specified after $errNum.
|
||||
* Ex: errorMsg(55, $domainName)
|
||||
* if 'dbg' is found in ['add'] or $DisplayDbg is true, the 'dbg' version is appended to the found version.
|
||||
*/
|
||||
function errorMsg($errNum=GENERIC_ERROR_NUM) // $mixedArgs
|
||||
{
|
||||
// Find specified message using precedence rules
|
||||
global $MsgLanguages;
|
||||
$precedence = array(
|
||||
array($errNum, ($MsgLanguages == 'all') ? array('en', 'fr', 'de') : $MsgLanguages),
|
||||
array($errNum, array('en')),
|
||||
array($errNum, array('dbg')),
|
||||
array(GENERIC_ERROR_NUM, $MsgLanguages),
|
||||
array(GENERIC_ERROR_NUM, array('en')));
|
||||
global $ErrMsgs;
|
||||
$args = func_get_args();
|
||||
$msg = '';
|
||||
foreach ($precedence as $rule)
|
||||
{
|
||||
// Find message
|
||||
list($actualErrNum, $languages) = $rule;
|
||||
foreach ($languages as $lg)
|
||||
{
|
||||
if (isset($ErrMsgs[$actualErrNum][$lg]) && ($ErrMsgs[$actualErrNum][$lg] != 'TODO'))
|
||||
appendToMsg($msg, $errNum, $ErrMsgs[$actualErrNum][$lg], $args);
|
||||
else if (isset($ErrMsgs[$actualErrNum]['lnk']) && isset($ErrMsgs[$actualErrNum]['lnk'][$lg]) && ($ErrMsgs[$actualErrNum]['lnk'][$lg] != 'TODO'))
|
||||
appendToMsg($msg, $errNum, $ErrMsgs[$actualErrNum]['lnk'][$lg], $args);
|
||||
}
|
||||
|
||||
// Try next rule only if not found
|
||||
if (!empty($msg))
|
||||
break;
|
||||
}
|
||||
|
||||
// Add debug version if needed
|
||||
global $DisplayDbg;
|
||||
$msgHasDebug = in_array('dbg', $languages);
|
||||
$logExtMsg = '';
|
||||
if ((!$msgHasDebug) && isset($ErrMsgs[$actualErrNum]['dbg']))
|
||||
{
|
||||
if ($DisplayDbg || (isset($ErrMsgs[$actualErrNum]['add']) && ($ErrMsgs[$actualErrNum]['add'] == 'dbg')))
|
||||
$msg .= '['.$ErrMsgs[$actualErrNum]['dbg']."]\n"; // to result/screen message
|
||||
else
|
||||
$logExtMsg .= '['.$ErrMsgs[$actualErrNum]['dbg'].']'; // to log message
|
||||
}
|
||||
|
||||
// Get mail data if specified
|
||||
$mailData = (isset($ErrMsgs[$actualErrNum]['mail']) ? $ErrMsgs[$actualErrNum]['mail'] :
|
||||
(isset($ErrMsgs[$actualErrNum]['lnk']['mail']) ? $ErrMsgs[$actualErrNum]['lnk']['mail'] :
|
||||
array()));
|
||||
|
||||
// Apply params if applicable
|
||||
$numArgs = func_num_args();
|
||||
if ($numArgs > 1)
|
||||
{
|
||||
for ($i=0; $i!=$numArgs; ++$i) // include $errNum (%0)
|
||||
{
|
||||
$msg = str_replace("%$i", $args[$i], $msg);
|
||||
$logExtMsg = str_replace("%$i", $args[$i], $logExtMsg);
|
||||
$mIdx = 0;
|
||||
foreach ($mailData as $field)
|
||||
{
|
||||
$mailData[$mIdx] = str_replace("%$i", $args[$i], $field);
|
||||
++$mIdx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Log technical errors if possible
|
||||
$logMode = (isset($ErrMsgs[$actualErrNum]['log']) ? $ErrMsgs[$actualErrNum]['log'] :
|
||||
(isset($ErrMsgs[$actualErrNum]['lnk']['log']) ? $ErrMsgs[$actualErrNum]['lnk']['log'] :
|
||||
true));
|
||||
if ($logMode && class_exists('CWwwLog'))
|
||||
{
|
||||
$logFile = new CWwwLog();
|
||||
$logFile->logStr(/*$msg.*/$logExtMsg); // message is already logged by ob_callback_r2login()
|
||||
}
|
||||
|
||||
// Send email if specified
|
||||
if (!empty($mailData) && (count($mailData) >= 3))
|
||||
{
|
||||
include_once('email/htmlMimeMail.php');
|
||||
$mail = new htmlMimeMail();
|
||||
$mail->setFrom('noreply@ryzom.com');
|
||||
$mail->setSubject($mailData[1]);
|
||||
$mail->setText('Application: '.$_GET['clientApplication'].' - Login: '.$_GET['login']."\n". // display as much info as possible
|
||||
$mailData[2]);
|
||||
$result = $mail->send(array($mailData[0]));
|
||||
}
|
||||
|
||||
return $msg;
|
||||
}
|
||||
|
||||
// Helper for errorMsg()
|
||||
function appendToMsg(&$msg, $errNum, $str, &$args)
|
||||
{
|
||||
$msg .= "$str ($errNum)";
|
||||
if (($errNum == GENERIC_ERROR_NUM) && !empty($args))
|
||||
{
|
||||
foreach ($args as $arg)
|
||||
{
|
||||
$msg .= " [$arg]"; // display all passed args if returning the default generic error
|
||||
}
|
||||
}
|
||||
$msg .= "\n";
|
||||
}
|
||||
|
||||
/*
|
||||
if (isset($_GET['export']))
|
||||
exportErrMsgsToTSV();
|
||||
// Utility
|
||||
function exportErrMsgsToTSV()
|
||||
{
|
||||
global $ErrMsgs;
|
||||
echo "Num\ten\tfr\tde\tdbg\t\n";
|
||||
foreach ($ErrMsgs as $num => $txtArray)
|
||||
{
|
||||
echo $num."\t";
|
||||
foreach (array('en','fr','de','dbg') as $lg)
|
||||
{
|
||||
if (isset($txtArray[$lg]))
|
||||
echo $txtArray[$lg];
|
||||
else if (isset($txtArray['lnk'][$lg]))
|
||||
echo $txtArray['lnk'][$lg];
|
||||
echo "\t";
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
@ -1,532 +0,0 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
set_error_handler('err_callback');
|
||||
|
||||
// For error handling, buffer all output
|
||||
ob_start('ob_callback_r2login');
|
||||
|
||||
include_once('config.php');
|
||||
include_once('login_translations.php');
|
||||
include_once('../tools/nel_message.php');
|
||||
include_once('../tools/domain_info.php');
|
||||
include_once('login_service_itf.php');
|
||||
include_once('../ring/join_shard.php');
|
||||
|
||||
|
||||
// see errorMsg
|
||||
function errorMsgBlock($errNum=GENERIC_ERROR_NUM) // $mixedArgs
|
||||
{
|
||||
$args = func_get_args();
|
||||
return '0:'.call_user_func_array('errorMsg', $args);
|
||||
}
|
||||
|
||||
class LoginCb extends CLoginServiceWeb
|
||||
{
|
||||
// receive the login result sent back by the LS
|
||||
function loginResult($userId, $cookie, $resultCode, $errorString)
|
||||
{
|
||||
global $RingWebHost, $RingWebHostPHP;
|
||||
global $domainId;
|
||||
|
||||
if ($resultCode == 0 && $cookie != "")
|
||||
{
|
||||
// gather the domain informations (server version, patch urls and backup patch url
|
||||
global $DBHost, $DBUserName, $DBPassword, $DBName, $AutoInsertInRing;
|
||||
|
||||
$link = mysql_connect($DBHost, $DBUserName, $DBPassword) or die (errorMsgBlock(3004, 'main', $DBHost, $DBUserName));
|
||||
mysql_select_db ($DBName) or die (errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
|
||||
$query = "SELECT * FROM domain WHERE domain_id=$domainId";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if( mysql_num_rows($result) != 1)
|
||||
{
|
||||
die(errorMsgBlock(3001, $domainId));
|
||||
}
|
||||
$row = mysql_fetch_array($result);
|
||||
|
||||
// set the cookie
|
||||
setcookie ( "ryzomId" , $cookie, 0, "/");
|
||||
$_COOKIE["ryzomId"] = $cookie; // make it available immediately
|
||||
|
||||
// Auto-join an available mainland shard
|
||||
global $FSHostLuaMode, $FSHostResultStr;
|
||||
$FSHostLuaMode = false;
|
||||
$res = joinMainland($userId, $domainId, $row["domain_name"]);
|
||||
|
||||
if ($res)
|
||||
{
|
||||
// return the cookie to the user, il will then be used as an auth to browse the site and to connect to the shard
|
||||
//echo "1#".$cookie."#http://".$RingWebHost."/ring/web_start.php\n";
|
||||
echo "1#".$cookie."#".$FSHostResultStr."#http://".$RingWebHost."/ring/web_start.php#http://".$RingWebHostPHP."/ring/\n";
|
||||
// return the ring domain information
|
||||
echo $row["patch_version"]."#".$row["backup_patch_url"]."#".$row["patch_urls"];
|
||||
}
|
||||
else
|
||||
{
|
||||
global $JoinSessionResultCode, $JoinSessionResultMsg;
|
||||
echo errorMsgBlock(BASE_TRANSLATED_RSM_ERROR_NUM + $JoinSessionResultCode, $JoinSessionResultCode, $JoinSessionResultMsg, $userId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// empty cookie, this mean the user id can't be validated by the LS
|
||||
echo errorMsgBlock(BASE_TRANSLATED_LS_ERROR_NUM + $resultCode, $resultCode, $errorString, $userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class CWwwLog
|
||||
{
|
||||
//function CWwwLog() {}
|
||||
|
||||
/*
|
||||
* Return the log directory. Create it if it does not exist, or return false if creation failed.
|
||||
*/
|
||||
function getSafeLogDir()
|
||||
{
|
||||
// Examples:
|
||||
// __FILE__ = r:\code\ryzom\www\login\config.php
|
||||
// $_SERVER['PATH_TRANSLATED'] = 'r:/code/ryzom/www/login//r2_login.php'
|
||||
// $_SERVER['SCRIPT_FILENAME'] = 'r:/code/ryzom/www/login//r2_login.php'
|
||||
global $LogRelativePath;
|
||||
$pathInfo = pathinfo(__FILE__);
|
||||
$logPath = $pathInfo['dirname'].$LogRelativePath;
|
||||
if (!is_dir($logPath))
|
||||
{
|
||||
$res = mkdir($LogPath, 0700);
|
||||
return $res ? $logPath : false;
|
||||
}
|
||||
return $logPath;
|
||||
}
|
||||
|
||||
function logStr($str)
|
||||
{
|
||||
$logPath = $this->getSafeLogDir();
|
||||
if ($logPath !== false)
|
||||
{
|
||||
$fp = fopen($logPath.'/r2_login_'.date('Y-m-d').'.log', 'a');
|
||||
fwrite($fp, date('Y-m-d H:i:s').' ('.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REQUEST_URI']."): $str\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Callback called on end of output buffering
|
||||
function ob_callback_r2login($buffer)
|
||||
{
|
||||
// Log only in case of error or malformed result string
|
||||
$blockHd = substr($buffer, 0, 2);
|
||||
if ($blockHd != '1:')
|
||||
{
|
||||
$logFile = new CWwwLog();
|
||||
$logFile->logStr(str_replace("\n",'\n',$buffer));
|
||||
}
|
||||
return $buffer; // sent to output
|
||||
}
|
||||
|
||||
// Callback called on error
|
||||
function err_callback($errno, $errmsg, $filename, $linenum, $vars)
|
||||
{
|
||||
$logFile = new CWwwLog();
|
||||
$logFile->logStr("PHP ERROR/$errno $errmsg ($filename:$linenum)");
|
||||
// Never die after an error
|
||||
}
|
||||
|
||||
if (!isset($_GET['cmd']))
|
||||
{
|
||||
die (errorMsgBlock(3002));
|
||||
}
|
||||
|
||||
// check for 'clear password' tag
|
||||
if (!isset($_GET['cp']))
|
||||
{
|
||||
$cp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cp = $_GET['cp'];
|
||||
}
|
||||
|
||||
$submittedLang = isset($_GET['lg']) ? $_GET['lg'] : 'unknown';
|
||||
if (isset($_GET['dbg']) && ($_GET['dbg'] == 1))
|
||||
$DisplayDbg = true;
|
||||
|
||||
switch($_GET['cmd'])
|
||||
{
|
||||
case 'ask':
|
||||
// client ask for a login salt
|
||||
askSalt($_GET['login'], $submittedLang);
|
||||
die();
|
||||
case 'login':
|
||||
$domainId = -1;
|
||||
// client sent is login info
|
||||
if (!checkUserValidity($_GET['login'], $_GET['password'], $_GET['clientApplication'], $cp, $id, $reason, $priv, $extended, $domainId, $submittedLang))
|
||||
{
|
||||
echo '0:'.$reason;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// retreive the domain info
|
||||
$domainInfo = getDomainInfo($domainId);
|
||||
|
||||
// if we need to create missing ring info
|
||||
if ($AutoCreateRingInfo)
|
||||
{
|
||||
////////////// Temporary code alpha 0 only /////////////////////////////////////
|
||||
// check if the ring user exist, and create it if not
|
||||
$ringDb = mysql_connect($DBHost, $RingDBUserName, $RingDBPassword) or die(errorMsgBlock(3004, 'Ring', $DBHost, $RingDBUserName));
|
||||
mysql_select_db ($domainInfo['ring_db_name'], $ringDb) or die(errorMsgBlock(3005, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName));
|
||||
$query = "SELECT user_id FROM ring_users where user_id = '".$id."'";
|
||||
$result = mysql_query ($query) or die(errorMsgBlock(3006, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows($result) == 0)
|
||||
{
|
||||
// no ring user record, build one
|
||||
$query = "INSERT INTO ring_users SET user_id = '".$id."', user_name = '".$_GET["login"]."', user_type='ut_pioneer'";
|
||||
$result = mysql_query ($query) or die(errorMsgBlock(3006, $query, 'Ring', $domainInfo['ring_db_name'], $DBHost, $RingDBUserName, mysql_error()));
|
||||
}
|
||||
|
||||
// // check that there is a character record (deprecated)
|
||||
// $query = "SELECT user_id FROM characters where user_id = '".$id."'";
|
||||
// $result = mysql_query ($query) or die("Query ".$query." failed");
|
||||
// if (mysql_num_rows($result) == 0)
|
||||
// {
|
||||
// // no characters record, build a default one
|
||||
// $charId = ($id * 16);
|
||||
// $query = "INSERT INTO characters SET char_id='".$charId."', char_name='".$_GET["login"]."_default', user_id = '".$id."'";
|
||||
// $result = mysql_query ($query) or die("Query ".$query." failed");
|
||||
// }
|
||||
}
|
||||
|
||||
// // check domain status
|
||||
// if ($domainInfo['status'] == "ds_close")
|
||||
// {
|
||||
// // the domain is closed
|
||||
// echo "0:Server is currently closed";
|
||||
// die;
|
||||
// }
|
||||
// else if ($domainInfo['status'] == "ds_dev" && strstr($priv, ":DEV:") == false)
|
||||
// {
|
||||
// // the domain is open to dev only
|
||||
// echo "0:You are not allowed to connect now, retry later";
|
||||
// die;
|
||||
// }
|
||||
// else if ($domainInfo['status'] == "ds_restricted")
|
||||
// {
|
||||
// // check for one of the needed privilege
|
||||
// if ( strstr($priv, ":DEV:") == false
|
||||
// && strstr($priv, ":SGM:") == false
|
||||
// && strstr($priv, ":GM:") == false
|
||||
// && strstr($priv, ":EG:") == false)
|
||||
// {
|
||||
// // the domain is open to privileged user only
|
||||
// echo "0:You are not allowed to connect now, retry later";
|
||||
// die;
|
||||
// }
|
||||
// }
|
||||
|
||||
// store the web host for this domain
|
||||
global $RingWebHost, $RingWebHostPHP;
|
||||
$RingWebHost = $domainInfo['web_host'];
|
||||
$RingWebHostPHP = $domainInfo['web_host_php'];
|
||||
|
||||
$LSaddr = split(":", $domainInfo['login_address']);
|
||||
|
||||
// ask for a session cookie to the login service
|
||||
$login = new LoginCb;
|
||||
$res = "";
|
||||
$login->connect($LSaddr[0], $LSaddr[1], $res);
|
||||
// $lsProxy = new CLoginServiceWebProxy;
|
||||
$login->login($id, $_SERVER["REMOTE_ADDR"], $domainId);
|
||||
|
||||
// wait for the return message
|
||||
// $lsSkel = new CLoginServiceWebSkel;
|
||||
if (!$login->waitCallback())
|
||||
{
|
||||
die(errorMsgBlock(3003));
|
||||
}
|
||||
|
||||
//the rest of the process is done in the callback function
|
||||
}
|
||||
}
|
||||
|
||||
// no more to do (other global statement are old garbage)
|
||||
die();
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
// Functions
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
// $reason contains the reason why the check failed or success
|
||||
// return true if the check is ok
|
||||
function checkUserValidity ($login, $password, $clientApplication, $cp, &$id, &$reason, &$priv, &$extended, &$domainId, $lang)
|
||||
{
|
||||
global $DBHost, $DBUserName, $DBPassword, $DBName, $AcceptUnknownUser;
|
||||
|
||||
setMsgLanguage($lang);
|
||||
|
||||
// we map the client application to the domain name
|
||||
$domainName = $clientApplication;
|
||||
|
||||
$link = mysql_connect($DBHost, $DBUserName, $DBPassword) or die (errorMsgBlock(3004, 'main', $DBHost, $DBUserName));
|
||||
mysql_select_db ($DBName) or die (errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
|
||||
// retreive the domain id
|
||||
$query = "SELECT domain_id FROM domain WHERE domain_name='$domainName'";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows($result) == 0)
|
||||
{
|
||||
// unrecoverable error, we must giveup
|
||||
$reason = errorMsg(3007, $domainName);
|
||||
mysql_close($link);
|
||||
return false;
|
||||
}
|
||||
|
||||
$row = mysql_fetch_array($result);
|
||||
$domainId = $row[0];
|
||||
|
||||
// retreive the domain info
|
||||
$domainInfo = getDomainInfo($domainId);
|
||||
|
||||
// convert the domain status enum into the privilege access set
|
||||
$accessPriv = strtoupper(substr($domainInfo['status'], 3));
|
||||
|
||||
// now, retrieve the user infos
|
||||
$query = "SELECT * FROM user where Login='$login'";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows ($result) == 0)
|
||||
{
|
||||
if ($AcceptUnknownUser)
|
||||
{
|
||||
// login doesn't exist, create it
|
||||
$query = "INSERT INTO user (Login, Password) VALUES ('$login', '$password')";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
// get the user to have his UId
|
||||
$query = "SELECT * FROM user WHERE Login='$login'";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows ($result) == 1)
|
||||
{
|
||||
$reason = errorMsg(3008, $login);
|
||||
$row = mysql_fetch_array ($result);
|
||||
$id = $row["UId"];
|
||||
$priv = $row["Privilege"];
|
||||
$extended = $row["ExtendedPrivilege"];
|
||||
|
||||
// add the default permission
|
||||
$query = "INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES ('$id', 'r2', '$accessPriv')";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
$res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$reason = errorMsg(3009, $login);
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if this is not an unconfirmed account
|
||||
$query = "SELECT GamePassword, Email, Language FROM signup_data WHERE login='$login'";
|
||||
$result = mysql_query($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows($result) == 0)
|
||||
{
|
||||
$reason = errorMsg(2001, $login, 'checkUserValidity');
|
||||
$res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check password to avoid revealing email address to third-party
|
||||
$passwordMatchedRow = false;
|
||||
while ($row = mysql_fetch_array($result))
|
||||
{
|
||||
$salt = substr($row['GamePassword'],0,2);
|
||||
if (($cp && $row['GamePassword'] == $password) || (!$cp && $row['GamePassword'] == crypt($password, $salt)))
|
||||
{
|
||||
$passwordMatchedRow = $row;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($passwordMatchedRow !== false)
|
||||
{
|
||||
if ($lang == 'unknown')
|
||||
setMsgLanguage($passwordMatchedRow['Language']);
|
||||
$reason = errorMsg(2002, $passwordMatchedRow['Email']);
|
||||
}
|
||||
else
|
||||
$reason = errorMsg(2004, 'db signup_data');
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$row = mysql_fetch_array ($result);
|
||||
$salt = substr($row["Password"],0,2);
|
||||
if (($cp && $row["Password"] == $password) || (!$cp && $row["Password"] == crypt($password, $salt)))
|
||||
{
|
||||
// Store the real login (with correct case)
|
||||
$_GET['login'] = $row['Login'];
|
||||
// check if the user can use this application
|
||||
|
||||
$query = "SELECT * FROM permission WHERE UId='".$row["UId"]."' AND ClientApplication='$clientApplication'";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
if (mysql_num_rows ($result) == 0)
|
||||
{
|
||||
if ($AcceptUnknownUser)
|
||||
{
|
||||
// add default permission
|
||||
$query = "INSERT INTO permission (UId, ClientApplication, ShardId, AccessPrivilege) VALUES ('".$row["UId"]."', '$clientApplication', -1, '$domainStatus')";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
$reason = errorMsg(3010);
|
||||
$res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no permission
|
||||
$reason = errorMsg(3011, $clientApplication, $domainName);
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// check that the access privilege for the domain
|
||||
$permission = mysql_fetch_array($result);
|
||||
|
||||
if (!strstr($permission['AccessPrivilege'], $accessPriv))
|
||||
{
|
||||
// no right to connect
|
||||
if ($AcceptUnknownUser)
|
||||
{
|
||||
// set an additionnal privilege for this player
|
||||
$query = "UPDATE permission set AccessPrivilege='".$permission['AccessPrivilege'].",$accessPriv' WHERE prim=".$permission['prim'];
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
$reason = errorMsg(3012, $accessPriv);
|
||||
$res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// no permission
|
||||
$reason = errorMsg(3013, $clientApplication, $domainName, $accessPriv);
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// // check if the user not already online
|
||||
//
|
||||
// if ($row["State"] != "Offline")
|
||||
// {
|
||||
// $reason = "$login is already online and ";
|
||||
// // ask the LS to remove the client
|
||||
// if (disconnectClient ($row["ShardId"], $row["UId"], $tempres))
|
||||
// {
|
||||
// $reason = $reason."was just disconnected. Now you can retry the identification (error code 54)";
|
||||
//
|
||||
// $query = "update shard set NbPlayers=NbPlayers-1 where ShardId=".$row["ShardId"];
|
||||
// $result = mysql_query ($query) or die ("Can't execute the query: '$query' errno:".mysql_errno().": ".mysql_error());
|
||||
//
|
||||
// $query = "update user set ShardId=-1, State='Offline' where UId=".$row["UId"];
|
||||
// $result = mysql_query ($query) or die ("Can't execute the query: '$query' errno:".mysql_errno().": ".mysql_error());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $reason = $reason."can't be disconnected: $tempres (error code 55)";
|
||||
// }
|
||||
// $res = false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
$id = $row["UId"];
|
||||
$priv = $row["Privilege"];
|
||||
$extended = $row["ExtendedPrivilege"];
|
||||
$res = true;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$reason = errorMsg(2004, 'user');
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
mysql_close($link);
|
||||
return $res;
|
||||
}
|
||||
|
||||
function askSalt($login, $lang)
|
||||
{
|
||||
global $PHP_SELF;
|
||||
global $DBHost, $DBUserName, $DBPassword, $DBName;
|
||||
global $AcceptUnknownUser;
|
||||
|
||||
setMsgLanguage($lang);
|
||||
|
||||
$link = mysql_connect($DBHost, $DBUserName, $DBPassword) or die (errorMsgBlock(3004, 'main', $DBHost, $DBUserName));
|
||||
mysql_select_db ($DBName) or die (errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
|
||||
|
||||
$query = "SELECT Password FROM user WHERE Login='$login'";
|
||||
$result = mysql_query ($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows ($result) != 1)
|
||||
{
|
||||
if ($AcceptUnknownUser)
|
||||
{
|
||||
// just accept the client and return a defautl salk
|
||||
echo "1:AA";
|
||||
die;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if this is not an unconfirmed account
|
||||
$query = "SELECT GamePassword, Language FROM signup_data WHERE login='$login'";
|
||||
$result = mysql_query($query) or die (errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysql_error()));
|
||||
|
||||
if (mysql_num_rows($result) == 0)
|
||||
{
|
||||
// no user record, reject it
|
||||
die (errorMsgBlock(2001, $login, 'askSalt'));
|
||||
}
|
||||
else if (mysql_num_rows($result) == 1)
|
||||
{
|
||||
// one unconfirmed record, let the client send the encrypted password to get the corresponding email address
|
||||
$row = mysql_fetch_array($result);
|
||||
$salt = substr($row['GamePassword'], 0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($lang == 'unknown')
|
||||
{
|
||||
// several matching records => display a multi-language message now
|
||||
$languages = array();
|
||||
while ($row = mysql_fetch_array($result))
|
||||
{
|
||||
$languages[$row['Language']] = true;
|
||||
}
|
||||
setMsgLanguage(array_keys($languages));
|
||||
}
|
||||
die (errorMsgBlock(2003));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$res_array = mysql_fetch_array($result);
|
||||
$salt = substr($res_array['Password'], 0, 2);
|
||||
}
|
||||
|
||||
echo "1:".$salt;
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
?>
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
include_once('utils.php');
|
||||
|
||||
unset($user);
|
||||
$user = $user_login;
|
||||
|
||||
importParam('msg');
|
||||
|
||||
$user_dir = get_user_dir($user, $shard);
|
||||
$fname = $user_dir."mail_$msg.html";
|
||||
if (!is_dir($user_dir) || !file_exists($fname))
|
||||
{
|
||||
include_once('mailbox.php');
|
||||
die();
|
||||
}
|
||||
|
||||
$f = fopen($fname, 'r');
|
||||
echo fread($f, filesize($fname));
|
||||
fclose($f);
|
||||
|
||||
/* display_time(); */
|
||||
?>
|
@ -1,161 +0,0 @@
|
||||
<?php
|
||||
|
||||
include_once('utils.php');
|
||||
|
||||
// -------------------------------------
|
||||
// add a new thread into user forum index
|
||||
// -------------------------------------
|
||||
function add_mail_to_index(&$from, &$to, &$subject, &$index)
|
||||
{
|
||||
global $shard;
|
||||
$to_dir = get_user_dir($to, $shard);
|
||||
$to_index = $to_dir.'mail.index';
|
||||
|
||||
use_index($to_index);
|
||||
|
||||
$f = fopen($to_index, 'r+');
|
||||
read_next_index($f, $index);
|
||||
append_to_index($f, trim($from).'%%'.strtr(trim($subject), "\n", " ").' %%'.displayable_date().'%%1%%'.$index);
|
||||
update_next_index($f, $index+1);
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
// remove mail
|
||||
// -------------------------------------
|
||||
function remove_mail($user, $mails)
|
||||
{
|
||||
global $shard;
|
||||
$mail_dir = get_user_dir($user, $shard);
|
||||
|
||||
read_index($mail_dir.'mail.index', $header, $array);
|
||||
|
||||
sort($mails);
|
||||
$remove_mail = 0;
|
||||
|
||||
for ($i=0; $i<count($array); ++$i)
|
||||
if ($remove_mail >= count($mails) || $array[$i][4] != $mails[$remove_mail])
|
||||
$newarray[] = $array[$i];
|
||||
else
|
||||
++$remove_mail;
|
||||
|
||||
write_index($mail_dir.'mail.index', $header, $newarray);
|
||||
|
||||
build_mail_page($user);
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
// create new mail file
|
||||
// -------------------------------------
|
||||
function create_mail(&$from, &$to, &$subject, &$content, &$cleancontent, &$index)
|
||||
{
|
||||
global $shard;
|
||||
$to_dir = get_user_dir($to, $shard);
|
||||
|
||||
read_template('mail.html', $mail);
|
||||
|
||||
$inst_mailbox = str_replace(array('%%FROM%%', '%%UCFROM%%', '%%DATE%%', '%%SUBJECT%%', '%%CONTENT%%', '%%CLEANCONTENT%%', '%%MAIL%%'),
|
||||
array($from, ucfirst($from), displayable_date(), ucfirst($subject), $content, $cleancontent, $index),
|
||||
$mail);
|
||||
|
||||
// build mail message
|
||||
$f = fopen($to_dir."mail_$index.html", 'w');
|
||||
fwrite($f, $inst_mailbox);
|
||||
fclose($f);
|
||||
|
||||
$f = fopen($to_dir.'new_mails', 'w');
|
||||
fwrite($f, '1');
|
||||
fclose($f);
|
||||
|
||||
srand((float) microtime()*1000000);
|
||||
$fname = md5(rand());
|
||||
global $USERS_DIR;
|
||||
if (!@is_dir($USERS_DIR.'/incoming'))
|
||||
@mkdir($USERS_DIR.'/incoming');
|
||||
$f = @fopen($USERS_DIR.'/incoming/'.$fname, "w");
|
||||
if ($f)
|
||||
{
|
||||
fwrite($f, "shard=$shard to=$to from=$from\n$$$$");
|
||||
fclose($f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
// rebuild user mail box pages
|
||||
// -------------------------------------
|
||||
function build_mail_page($user)
|
||||
{
|
||||
global $shard;
|
||||
|
||||
$user_dir = get_user_dir($user, $shard);
|
||||
$user_index = $user_dir."mail.index";
|
||||
|
||||
// open thread index
|
||||
read_index($user_index, $header, $mails);
|
||||
|
||||
$num_mails = count($mails);
|
||||
$num_per_page = 10;
|
||||
$num_pages = (int)(($num_mails+$num_per_page-1) / $num_per_page);
|
||||
|
||||
$mail = $num_mails-1;
|
||||
$page = 0;
|
||||
|
||||
$altern_color = array("#333333", "#666666");
|
||||
$altern_index = 0;
|
||||
|
||||
$links_str = '';
|
||||
|
||||
read_template('mailbox_main.html', $mailbox_main);
|
||||
read_template('mailbox_mail.html', $mailbox_mail);
|
||||
|
||||
read_template('browse_link.html', $browse_link);
|
||||
|
||||
do
|
||||
{
|
||||
$num_in_page = 0;
|
||||
$inst_mail = '';
|
||||
|
||||
while ($num_in_page < 10 && $mail >= 0)
|
||||
{
|
||||
$m = &$mails[$mail];
|
||||
|
||||
$subject = ucfirst(displayable_string($m[1]));
|
||||
|
||||
$inst_mail .= str_replace(array('%%FROM%%', '%%UCFROM%%', '%%SUBJECT%%', '%%DATE%%', '%%USER%%', '%%MAIL%%', '%%COLOR%%'),
|
||||
array($m[0], ucfirst($m[0]), $subject, $m[2], $user, $m[4], $altern_color[$altern_index]),
|
||||
$mailbox_mail);
|
||||
|
||||
// step to next message
|
||||
++$num_in_page;
|
||||
--$mail;
|
||||
$altern_index = 1-$altern_index;
|
||||
}
|
||||
|
||||
$links_str = '';
|
||||
$link_previous = ($page == 0 ? "mailbox.php?page=".$page : "mailbox.php?page=".($page-1));
|
||||
for ($i=0; $i<$num_pages; ++$i)
|
||||
{
|
||||
$link = ($i == $page ? $i+1 : "<a href='mailbox.php?page=$i'>".($i+1)."</a>");
|
||||
$links_str .= str_replace(array('%%LINK%%'),
|
||||
array($link),
|
||||
$browse_link);
|
||||
}
|
||||
$link_next = (($page == $num_pages-1 || $num_pages <= 1) ? "mailbox.php?page=".$page : "mailbox.php?page=".($page+1));
|
||||
|
||||
$inst_mailbox = str_replace(array('%%MAILS%%', '%%PREVIOUS%%', '%%LINKS%%', '%%NEXT%%'),
|
||||
array($inst_mail, $link_previous, $links_str, $link_next),
|
||||
$mailbox_main);
|
||||
|
||||
$pagename = $user_dir."mailbox".($page==0 ? '' : '_'.$page).'.html';
|
||||
|
||||
$f = fopen($pagename, 'w');
|
||||
fwrite($f, $inst_mailbox);
|
||||
fclose($f);
|
||||
|
||||
++$page;
|
||||
}
|
||||
while ($mail >= 0);
|
||||
}
|
||||
|
||||
?>
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
include_once('utils.php');
|
||||
|
||||
importParam('page');
|
||||
|
||||
unset($user);
|
||||
$user = $user_login;
|
||||
|
||||
$user_dir = build_user_dir($user, $shard);
|
||||
|
||||
$fname = $user_dir.'mailbox.html';
|
||||
if (!file_exists($fname))
|
||||
{
|
||||
include_once('mail_utils.php');
|
||||
build_mail_page($user);
|
||||
}
|
||||
|
||||
$fname = $user_dir.'mailbox'.(isset($page) && $page!="" && $page!="0" ? "_$page" : '').'.html';
|
||||
if (!file_exists($fname))
|
||||
die("INTERNAL ERROR 10");
|
||||
|
||||
$f = fopen($fname, 'r');
|
||||
echo fread($f, filesize($fname));
|
||||
fclose($f);
|
||||
|
||||
// remove new_mails file when user checks its mailbox
|
||||
$fname = $user_dir.'new_mails';
|
||||
if (file_exists($fname))
|
||||
unlink($fname);
|
||||
|
||||
/* display_time(); */
|
||||
?>
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
include_once('utils.php');
|
||||
|
||||
//
|
||||
// INPUT:
|
||||
//
|
||||
// $user_login login of the user that write the mail
|
||||
// $mail_to user to send mail to (optional)
|
||||
// $mail_subject subject of the mail (optional)
|
||||
// $mail_content content of the mail (optional)
|
||||
//
|
||||
|
||||
importParam('mail_to');
|
||||
importParam('mail_subject');
|
||||
importParam('mail_content');
|
||||
|
||||
read_template('new_mail.html', $new_mail);
|
||||
|
||||
$instance = str_replace(array('%%FROM%%', '%%UCFROM%%', '%%TO%%', '%%UCTO%%', '%%SUBJECT%%', '%%CONTENT%%'),
|
||||
array($user_login, ucfirst($user_login), $mail_to, ucfirst($mail_to), ucfirst(displayable_string($mail_subject)), displayable_content($mail_content)),
|
||||
$new_mail);
|
||||
|
||||
echo $instance;
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue