function editplayer(&$smarty)
{
    $tournaments = new tournaments(trim($_REQUEST['id']));
    $arrList = $tournaments->getPlayer($_REQUEST['sid']);
    $smarty->assign('tour_id', $arrList[0]['tour_id']);
    $smarty->assign('player_id', $arrList[0]['player_id']);
    $smarty->assign('player_member', $arrList[0]['player_members_id']);
    $smarty->assign('player_name', $arrList[0]['player_name']);
    $smarty->assign('player_age', $arrList[0]['player_age']);
    $smarty->assign('birth_date', substr($arrList[0]['player_birthdate'], 0, 4) . "/" . substr($arrList[0]['player_birthdate'], 5, 2) . "/" . substr($arrList[0]['player_birthdate'], 8, 2));
    $smarty->assign('player_parents', $arrList[0]['player_parents_name']);
    $smarty->assign('player_contactno', $arrList[0]['player_contactno']);
    $smarty->assign('player_email', $arrList[0]['player_email']);
    $smarty->assign('player_home_address', $arrList[0]['player_home_address']);
    switch ($arrList[0]['player_group']) {
        case "A":
            $smarty->assign("g1", "selected");
            break;
        case "B":
            $smarty->assign("g2", "selected");
            break;
        case "C":
            $smarty->assign("g3", "selected");
            break;
        case "D":
            $smarty->assign("g4", "selected");
            break;
        case "E":
            $smarty->assign("g5", "selected");
            break;
    }
    $smarty->assign('addbtn', "Save Player");
}