summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/notary.inc.php74
-rw-r--r--pages/account/59.php20
2 files changed, 69 insertions, 25 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index da70820..236a124 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -1223,12 +1223,23 @@ function get_domains($userid, $deleted=0){
return mysql_query($query);
}
+function get_training_result($userid){
+ //should be entered in account/55.php
+ $userid = intval($userid);
+ $query = "SELECT `CP`.`pass_date`, `CT`.`type_text`, `CV`.`test_text` ".
+ " FROM `cats_passed` AS CP, `cats_variant` AS CV, `cats_type` AS CT ".
+ " WHERE `CP`.`variant_id`=`CV`.`id` AND `CV`.`type_id`=`CT`.`id` AND `CP`.`user_id` ='".$userid."'".
+ " ORDER BY `CP`.`pass_date`";
+ return mysql_query($query);
+}
+
+
function output_log_email_header(){
?>
- <tr
- <td><?= _("Email, primary bold") ?></td>
- <td><?= _("Created") ?></td>
- <td><?= _("Deleted") ?></td>
+ <tr>
+ <td class="DataTD bold"><?= _("Email, primary bold") ?></td>
+ <td class="DataTD bold"><?= _("Created") ?></td>
+ <td class="DataTD bold"><?= _("Deleted") ?></td>
</tr>
<?
@@ -1244,19 +1255,19 @@ function output_log_email($row,$primary){
}
?>
<tr>
- <td class="<? $bold . $italic ?>"><?=$row['email']?></td>
- <td class="<? $bold . $italic ?>"><?=$row['created']?></td>
- <td class="<? $bold . $italic ?>"><?=$row['deleted']?></td>
+ <td class="DataTD <? $bold . $italic ?>"><?=$row['email']?></td>
+ <td class="DataTD <? $bold . $italic ?>"><?=$row['created']?></td>
+ <td class="DataTD <? $bold . $italic ?>"><?=$row['deleted']?></td>
</tr>
<?
}
function output_log_domains_header(){
?>
- <tr
- <td><?= _("Domain") ?></td>
- <td><?= _("Created") ?></td>
- <td><?= _("Deleted") ?></td>
+ <tr>
+ <td class="DataTD bold"><?= _("Domain") ?></td>
+ <td class="DataTD bold"><?= _("Created") ?></td>
+ <td class="DataTD bold"><?= _("Deleted") ?></td>
</tr>
<?
@@ -1268,9 +1279,9 @@ function output_log_domains($row){
}
?>
<tr>
- <td class="<? $italic ?>"><?=$row['domain']?></td>
- <td class="<? $italic ?>"><?=$row['created']?></td>
- <td class="<? $italic ?>"><?=$row['deleted']?></td>
+ <td class="DataTD <? $italic ?>"><?=$row['domain']?></td>
+ <td class="DataTD <? $italic ?>"><?=$row['created']?></td>
+ <td class="DataTD <? $italic ?>"><?=$row['deleted']?></td>
</tr>
<?
}
@@ -1278,20 +1289,39 @@ function output_log_domains($row){
function output_log_agreement_header(){
?>
<tr
- <td><?= _("Agreement") ?></td>
- <td><?= _("Date") ?></td>
- <td><?= _("Method") ?></td>
- <td><?= _("Comment") ?></td>
+ <td class="DataTD bold"><?= _("Agreement") ?></td>
+ <td class="DataTD bold"><?= _("Date") ?></td>
+ <td class="DataTD bold"><?= _("Method") ?></td>
+ <td class="DataTD bold"><?= _("Comment") ?></td>
</tr>
<?
}
function output_log_agreement($row){
?>
<tr>
- <td class="<? $italic ?>"><?=$row['document']?></td>
- <td class="<? $italic ?>"><?=$row['date']?></td>
- <td class="<? $italic ?>"><?=$row['method']?></td>
- <td class="<? $italic ?>"><?= ($row['active']==0)? _('No'):_('Yes')?></td>
+ <td class="DataTD" ><?=$row['document']?></td>
+ <td class="DataTD" ><?=$row['date']?></td>
+ <td class="DataTD" ><?=$row['method']?></td>
+ <td class="DataTD"><?= ($row['active']==0)? _('No'):_('Yes')?></td>
+ </tr>
+ <?
+}
+
+function output_log_training_header(){
+ ?>
+ <tr>
+ <td class="DataTD bold"><?= _("Agreement") ?></td>
+ <td class="DataTD bold"><?= _("Test") ?></td>
+ <td class="DataTD bold"><?= _("Variant") ?></td>
+ </tr>
+ <?
+}
+function output_log_training($row){
+ ?>
+ <tr>
+ <td class="DataTD"><?=$row['pass_date']?></td>
+ <td class="DataTD"><?=$row['type_text']?></td>
+ <td class="DataTD"><?=$row['test_text']?></td>
</tr>
<?
} \ No newline at end of file
diff --git a/pages/account/59.php b/pages/account/59.php
index d499d35..fac884f 100644
--- a/pages/account/59.php
+++ b/pages/account/59.php
@@ -135,11 +135,25 @@ if(mysql_num_rows($dres) > 0) {
</table>
<br/>
-<table>
+<?
+$dres = get_training_result($userid);
+?>
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
- <td colspan="<? $colspandefault ?>" class="title"><?=_('CATS')?></td>
+ <td colspan="3" class="title"><?=_('Trainings')?></td>
</tr>
-
+<?
+if(mysql_num_rows($dres) > 0) {
+ output_log_training_header();
+ while($drow = mysql_fetch_assoc($dres))
+ {
+ output_log_training($drow);
+ }ELSE{
+ ?><td colspan="3" ><?=_('no entry avialable')?></td><?
+ }
+}?>
+</table>
+<br/>
<?
$dres = get_user_agreement($userid,'',1);
?>