#1470 initial test :)
BIN
code/web/app/app_achievements/favicon.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
function ach_render_date($lang,$date) {
|
||||||
|
switch($lang) {
|
||||||
|
case "en":
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
21
code/web/app/app_achievements/include/ach_render_ig.php
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
function ach_render_box_done($content) {
|
||||||
|
return "<table bgcolor='#FFFFFF' cellspacing='1' cellpadding='0'>
|
||||||
|
<tr>
|
||||||
|
<td><table cellspacing='2' cellpadding='0' bgcolor='#B4B4B4'>
|
||||||
|
<tr>
|
||||||
|
<td><table cellspacing='1' cellpadding='0' bgcolor='#FFFFFF'>
|
||||||
|
<tr>
|
||||||
|
<td><table cellspacing='1' cellpadding='0' bgcolor='#B4B4B4'>
|
||||||
|
<tr>
|
||||||
|
<td width='450px' height='50px' align='center' valign='middle'>".$content."</td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table>";
|
||||||
|
}
|
||||||
|
?>
|
93
code/web/app/app_achievements/include/ach_render_web.php
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
<?php
|
||||||
|
function ach_render_box_done($content) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return '<div style="display: block; margin-bottom: 5px;"><table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tbody><tr>
|
||||||
|
<td width="3px"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_ul.png"></td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_u.png);"></td>
|
||||||
|
<td width="3px"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_ur.png"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_l.png);"></td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_bg.png);">
|
||||||
|
<center><table>
|
||||||
|
<tbody><tr>
|
||||||
|
<td rowspan="2"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/icon/13.png"></td>
|
||||||
|
<td height="35px" width="430px"><center><h2 style="margin: 0px;color:#000000;">'.$content.'</h2></center></td>
|
||||||
|
<td rowspan="2" style="font-weight: bold; text-align: center; font-size: 14px;color:#000000;">
|
||||||
|
50<br><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ach_done_13">
|
||||||
|
<td><center><table width="350px"><tbody><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 50 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 100 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 150 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 200 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 250 jewels</center></td><td><b>03.01.2012</b></td></tr></tbody></table></center></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table></center>
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_r.png);"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_bl.png"></td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_b.png);"></td>
|
||||||
|
<td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_done_br.png"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_box_pending($name,$content) {
|
||||||
|
return '<div style="display: block; margin-bottom: 5px;"><table cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tbody><tr>
|
||||||
|
<td width="3px"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_ul.png"></td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_u.png);"></td>
|
||||||
|
<td width="3px"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_ur.png"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_l.png);"></td>
|
||||||
|
<td>
|
||||||
|
<center><table>
|
||||||
|
<tbody><tr>
|
||||||
|
<td rowspan="2"><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/icon/13.png"></td>
|
||||||
|
<td height="35px" width="430px"><center><h2 style="margin: 0px;color:#FFFFFF;">'.$name.'</h2></center></td>
|
||||||
|
<td rowspan="2" style="font-weight: bold; text-align: center; font-size: 14px;color:#FFFFFF;">
|
||||||
|
50<br><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ach_done_13">
|
||||||
|
<td><center><table width="350px"><tbody><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 50 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 100 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 150 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 200 jewels</center></td><td><b>03.01.2012</b></td></tr><tr><td><b>10</b></td><td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/yubo_done.png"></td><td width="100%"><center>Equip a full set of at least quality 250 jewels</center></td><td><b>03.01.2012</b></td></tr></tbody></table></center></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table></center>
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_r.png);"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_bl.png"></td>
|
||||||
|
<td style="background-image: url(http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_b.png);"></td>
|
||||||
|
<td><img src="http://www.3025-game.de/portal/ryzom/resource/pic/achievements/bar_pending_br.png"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_obj_list($list) {
|
||||||
|
//group
|
||||||
|
//columnize
|
||||||
|
//draw
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_obj_meta($obj) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_obj_simple($obj) {
|
||||||
|
return $obj->getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_obj_value($obj) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function ach_render_tiebar($cult = "neutral", $civ = "neutral") {
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
49
code/web/app/app_achievements/index.php
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
define('APP_NAME', 'app_achievements');
|
||||||
|
|
||||||
|
include_once('../config.php');
|
||||||
|
include_once('../lang.php');
|
||||||
|
include_once('lang.php');
|
||||||
|
|
||||||
|
// Ask to authenticate user (using ingame or session method) and fill $user with all information
|
||||||
|
ryzom_app_authenticate($user, true);
|
||||||
|
|
||||||
|
if($user['ig']) {
|
||||||
|
include_once("include/ach_render_ig.php");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
include_once("include/ach_render_web.php");
|
||||||
|
}
|
||||||
|
include_once("include/ach_render_common.php");
|
||||||
|
|
||||||
|
|
||||||
|
// Update user acces on Db
|
||||||
|
/*$db = ryDB::getInstance(APP_NAME);
|
||||||
|
$db->setDbDefs('test', array('id' => SQL_DEF_INT, 'num_access' => SQL_DEF_INT));
|
||||||
|
|
||||||
|
$num_access = $db->querySingleAssoc('test', array('id' => $user['id']));
|
||||||
|
if ($num_access)
|
||||||
|
$db->update('test', array('num_access' => ++$num_access['num_access']), array('id' => $user['id']));
|
||||||
|
else
|
||||||
|
$db->insert('test', array('num_access' => $num_access['num_access']=1, 'id' => $user['id']));
|
||||||
|
|
||||||
|
// Content
|
||||||
|
$c = _t('access', $num_access['num_access']).'<br/>';*/
|
||||||
|
|
||||||
|
$c = "<center><table>
|
||||||
|
<tr>
|
||||||
|
<td valign='top'>awesome menu</td>
|
||||||
|
<td width='645px'>";
|
||||||
|
|
||||||
|
for($i=0;$i<15;$i++) {
|
||||||
|
$c .= ach_render_box_done("Bejeweled");
|
||||||
|
}
|
||||||
|
|
||||||
|
$c .= "</td>
|
||||||
|
</tr>
|
||||||
|
</table></center>";
|
||||||
|
|
||||||
|
echo ryzom_app_render("achievements", $c, $user['ig']);
|
||||||
|
|
||||||
|
?>
|
15
code/web/app/app_achievements/lang.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php // %2011-09-28T08:12:16+02:00
|
||||||
|
$__texts = array (
|
||||||
|
'access' =>
|
||||||
|
array (
|
||||||
|
'en' => 'User access this page %s times',
|
||||||
|
'fr' => 'L\'utilisateur a accede a cette page %s fois',
|
||||||
|
'de' => '',
|
||||||
|
'ru' => '',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if(isset($ryzom_texts))
|
||||||
|
$ryzom_texts = array_merge ($__texts, $ryzom_texts);
|
||||||
|
else
|
||||||
|
$ryzom_texts = $__texts;
|
||||||
|
?>
|
BIN
code/web/app/app_achievements/pic/ach_news.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
code/web/app/app_achievements/pic/bar_done_b.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
code/web/app/app_achievements/pic/bar_done_bg.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
code/web/app/app_achievements/pic/bar_done_bl.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
code/web/app/app_achievements/pic/bar_done_br.png
Normal file
After Width: | Height: | Size: 176 B |
BIN
code/web/app/app_achievements/pic/bar_done_l.png
Normal file
After Width: | Height: | Size: 241 B |
BIN
code/web/app/app_achievements/pic/bar_done_r.png
Normal file
After Width: | Height: | Size: 237 B |
BIN
code/web/app/app_achievements/pic/bar_done_u.png
Normal file
After Width: | Height: | Size: 234 B |
BIN
code/web/app/app_achievements/pic/bar_done_ul.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
code/web/app/app_achievements/pic/bar_done_ur.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
code/web/app/app_achievements/pic/bar_pending_b.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
code/web/app/app_achievements/pic/bar_pending_bl.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
code/web/app/app_achievements/pic/bar_pending_br.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
code/web/app/app_achievements/pic/bar_pending_l.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
code/web/app/app_achievements/pic/bar_pending_r.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
code/web/app/app_achievements/pic/bar_pending_u.png
Normal file
After Width: | Height: | Size: 294 B |
BIN
code/web/app/app_achievements/pic/bar_pending_ul.png
Normal file
After Width: | Height: | Size: 173 B |
BIN
code/web/app/app_achievements/pic/bar_pending_ur.png
Normal file
After Width: | Height: | Size: 165 B |
BIN
code/web/app/app_achievements/pic/yubo_done.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
code/web/app/app_achievements/pic/yubo_pending.png
Normal file
After Width: | Height: | Size: 46 KiB |