コード例 #1
0
ファイル: lib.php プロジェクト: lonelywoolf/hypervm
function notify_admin($action, $parent, $child)
{
    $cclass = $child->get__table();
    $cname = $child->nname;
    $pclass = $parent->getClass();
    $pname = $parent->nname;
    $not = new notification(null, null, 'client-admin');
    $not->get();
    if (!array_search_bool($cclass, $not->class_list)) {
        return;
    }
    $subject = "{$cclass} {$cname} was {$action} to {$pclass} {$pname} ";
    send_mail_to_admin($subject, $subject);
}