示例#1
0
 public static function notifyLosers($project)
 {
     $deniedOffers = Offer::getOfferByProjectId($project->pro_id, Offer::STATUS_NOT_AWARDED);
     foreach ($deniedOffers as $denied) {
         $notifyData = new \stdClass();
         $notifyData->project_id = $project->pro_id;
         $notifyMsg = 'Tu oferta para el proyecto ' . $project->pro_tit . ' no fue seleccionada';
         $notifyData = json_encode($notifyData);
         $result = Notification::create($denied->user_id, $notifyMsg, Notification::TYPE_DENIED_OFFER, $notifyData);
         if (!$result) {
             //log here
         }
     }
 }
示例#2
0
    $notificationData->project_id = $rs_user_of->pro_id;
    //TODO sin comentarios!! email, notificaciones todo mezclado, los if $_cookie, rehacer todo piedad!!!
    if ($_COOKIE['id'] == $rs_user_of->user_id) {
        //SI es el cliente
        $completeName = $us_of['full_name'];
        $to = $us_pro['email'];
        $asunto = "Has recibido un comentario en una oferta";
        $mailCont = '</strong> ha comentado en su oferta, en el proyecto "<span style="color:#cc6600; font-weight:bold;">' . $rs_user_pro->pro_tit . '</span>". Para ver el comentario haz click <a href="' . FConfig::getUrl('proyecto') . '?id=' . $rs_user_pro->pro_id . '" target="_blank">aquí</a>.';
        $not_user = Notification::create($us_pro['id'], 'Has recibido un mensaje de ' . $completeName, Notification::TYPE_COMMENT, json_encode($notificationData));
    } else {
        if ($_COOKIE['id'] == $rs_user_pro->user_id) {
            $completeName = $us_pro['full_name'];
            $to = $us_of['email'];
            $asunto = "Has recibido un comentario en una de tus ofertas";
            $mailCont = '</strong> ha comentado en tu oferta, en el proyecto "<span style="color:#cc6600; font-weight:bold;">' . $rs_user_pro->pro_tit . '</span>". Para ver el comentario haz click <a href="' . FConfig::getUrl('proyecto') . '?id=' . $rs_user_pro->pro_id . '" target="_blank">aquí</a>.';
            $not_user = Notification::create($us_of['id'], 'Has recibido un mensaje de ' . $completeName, Notification::TYPE_COMMENT, json_encode($notificationData));
        }
    }
    //End notification
    $sender_us = getUserInfo($_COOKIE['id']);
    $params = array('site_url' => FConfig::getUrl('site_url'), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'user_name' => $completeName, 'comment_name' => $sender_us['name'] . ' ' . $sender_us['lastname'], 'content' => $mailCont);
    $body = FMailer::replaceParameters($params, file_get_contents('../views/emails/comentarioOfertaEmail.html'));
    $mailer = new FMailer();
    $receivers = array(array('email' => $to));
    $mailer->setReceivers($receivers);
    $mailer->sendEmail($asunto, $body);
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
if ($act == "validarPago") {
    $pro_id = $_REQUEST['pro_id'];
示例#3
0
if ($section_name == "signOut") {
    $salir = signOut();
}
$session = validaSession();
$currentUser = getCurrentUser();
$loggedUser = getUserInfo($user->id);
$defaultLogoLink = $currentUser ? 'perfil' : 'home';
$defaultLogoLink = FConfig::getUrl($defaultLogoLink);
$notList = array();
if ($currentUser) {
    //NOTIFICACIONES
    //    $not = listAll("notificaciones"," WHERE user_id = $currentUser->id  AND leido = 'N' ORDER BY cdate DESC");
    //    while($rs_not = mysql_fetch_object($not)){
    //        $notList[] = $rs_not;
    //    }
    $notList = Notification::getUserNotifications($currentUser->id);
}
//TODO:  eliminar esto algun dia FALLBACK OLD STYLES HERE
$skipLegacy = array('perfil', 'login', 'registro', 'agregarProyecto', 'contactanos', 'metodopago', 'pagoexito', 'pagoerror', 'bodas');
?>
<!DOCTYPE HTML>
<html lang="es">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
       <?php 
$seo = listAll("seo", "WHERE page='%{$_items['0']}'");
$rs_seo = mysql_fetch_object($seo);
if (empty($rs_seo->page)) {
    ?>
        <title>Fototea: Mercado de fot&oacute;grafos y editores independientes</title>
        <meta name="description" content="Fototea es la única plataforma en donde podrás contratar  Fotógrafos, Cineastas, Editores y Creativos audiovisuales para tus proyectos y eventos">