function createEmail($masv, $hoten) { $hoten = convert_vi_to_en($hoten); $email = ""; //cat 2 ky tu 2,3 trong masv de lay nam nhap hoc //sau do: + 2000 -1974=Khoa //tao email $nam = intval(substr($masv, 1, 2)); if ($nam >= 4 && $nam <= 90) { $khoa = $nam + 2000 - 1974; switch ($khoa) { case 38: case 39: $email = firstName($hoten) . $masv; break; case 36: case 37: $email = firstName($hoten) . substr($masv, -6); break; case 35: $email = firstName($hoten) . substr($masv, -3); break; case 31: case 32: case 33: case 34: $email = beginLastName($hoten) . firstName($hoten) . substr($masv, -2); break; case 30: $email = firstName($hoten) . '.' . $masv; break; default: break; } $email = $email . '@student.ctu.edu.vn'; return $email; } else { return ""; } }
/></a></center> </div> <div class="logo_box_bot"><img border="0" src="<?= ADMIN_BASE_URL ?>images/logobox_bottom.gif" alt="" /></div> </div> <div class="menu_box"> <div class="menu_box_top"><img border="0" src="<?= ADMIN_BASE_URL ?>images/menubox_top.gif" alt="" /></div> <div class="menu_box_padding"> <? if (!isLoggedIn()) { ?> <h2 style="font-size:1.6em;"><a href="<?= ADMIN_URL ?>/frontpage/login">Log In</a></h2> <hr /> <h2><a href="<?= ADMIN_URL ?>/users/signup">Signup</a></h2> <? } else { ?> <? echo '<p>Welcome, <a href="'.ADMIN_URL.'/users/show/'.userName().'">'.firstName().'</a>!</p><br />'; ?> <a href="<?= ADMIN_URL ?>/users/show/<?= userName() ?>" title="View your profile and past submissions"> <? if ( isAdmin() ) { ?> <img border="0" src="<?=ADMIN_BASE_URL ?>images/user_1337.gif" alt="" /> <? } elseif ($_SESSION[user]->controls_afeed() || $_SESSION[user]->controls_ascreen()) { ?> <img border="0" src="<?=ADMIN_BASE_URL ?>images/user_admin.gif" alt="" /> <? } else { ?> <img border="0" src="<?= ADMIN_BASE_URL ?>images/user_basic.gif" alt="" /> <? } //This closes the non admin or moderator stuff ?> <h4>View Account</h4></a> <br /> <h3><a href="<?= ADMIN_URL ?>/frontpage/logout" title="Log out of Concerto">Logout</a></h3> <? }
<tr> <td colspan="3"> </td> <td colspan="3" align="left"> <span style="color: gray;">Authors</span> (<a style="font-size: small" href="./colaborators.php?diagramId=<?php echo $myDiagram->id; ?> ">manage</a>) : <?php $collaborators = $delegate->usersGetAsCollaboratorNative($myDiagram->id); foreach ($collaborators as $collaborator) { //print substr($collaborator->email, 0, strpos($collaborator->email, '@')) . '-'; ?> <img src="./assets/images/collaborator.gif" style="vertical-align: bottom;" /> <?php print firstName($collaborator->email); } ?> </td> </tr> <?php if ($i < count($myDiagrams) - 1) { ?> <tr> <td colspan="6" style="border-top: 1px solid gray;"> </td> </tr> <?php } ?>