function intChangeCredit(&$smarty, $user_id, $credit, $credit_comment)
{
    $req = new ChangeUserCredit($user_id, $credit, $credit_comment);
    $resp = $req->sendAndRecv();
    if ($resp->isSuccessful()) {
        $smarty->assign("change_successfull", TRUE);
    } else {
        $resp->setErrorInSmarty($smarty);
        intSetErrors($smarty, $resp->getError());
    }
    intShowChangeCreditFace($smarty, $user_id);
}
<?php

require_once "change_credit_funcs.php";
needAuthType(ADMIN_AUTH_TYPE);
$smarty = new IBSSmarty();
if (isInRequest("user_id", "credit", "credit_comment")) {
    intChangeCredit($smarty, $_REQUEST["user_id"], $_REQUEST["credit"], $_REQUEST["credit_comment"]);
} else {
    if (isInRequest("user_id")) {
        intShowChangeCreditFace($smarty, $_REQUEST["user_id"]);
    } else {
        redirectToUserSearch("");
    }
}
function changeUserCredit(&$smarty, $user_ids)
{
    intShowChangeCreditFace($smarty, join(",", $user_ids));
}