コード例 #1
0
ファイル: perfilAction.php プロジェクト: narbelys/fototea
 }
 // New email confirmation
 if ($action == 'new_email_confirmation') {
     $actCode = $app->getRequest()->get('act_code');
     $newEmailCode = $app->getRequest()->get('new_email_code');
     $user = User::getUserToConfirmNewEmail($actCode, $newEmailCode);
     if (!$user) {
         $app->addError("Ha ocurrido un error intentando confirmar un cambio de correo electrónico.");
     } else {
         $user->user = $user->new_email;
         $user->new_email = null;
         $user->new_email_code = null;
         $user->save();
         $app->addMessage("Tu correo electrónico ha sido cambiado exitosamente. Tu nueva cuenta de correo electrónico es <b>" . $user->user . "</b>");
     }
     $app->redirect(UrlHelper::getUrl('editarPerfil'));
     return;
 }
 //marcar notificaciones como leidas
 if ($action == "notificationAct") {
     $id = intval($_REQUEST['id']);
     //Update nice version
     //        $notificacion = \ORM::for_table('notificaciones')->find_one($id);
     //        $notificacion->set('leido', 'S');
     //        $notificacion->save();
     //Update old version
     updateTable("notificaciones", "leido='S'", "id = {$id}");
     $redirectUrl = $_REQUEST['url'];
     //        $redirectUrl = FConfig::getUrl($redirectUrl);
     header('Location: ' . $redirectUrl);
     die;
コード例 #2
0
ファイル: cover.php プロジェクト: narbelys/fototea
}
?>
        </div>
        <!-- END TABS -->
    </div>

    <?php 
if ($same_user) {
    ?>
        <?php 
    if ($current_user->user_type == User::USER_TYPE_PHOTOGRAPHER) {
        ?>
            <div class="user-balance-options">
                <span class="arrow-left"></span>
                <a class="show-my-balance" href="<?php 
        echo UrlHelper::getUrl('perfil?act=finanzas');
        ?>
"><span class="balance-amount">$ <?php 
        echo number_format($user_balance, 2, ",", ".");
        ?>
</span> por cobrar</a>
            </div>
        <?php 
    }
    ?>

        <?php 
    if ($current_user->user_type == User::USER_TYPE_CLIENT) {
        ?>
            <div class="user-balance-options">
                <span class="arrow-left"></span>
コード例 #3
0
 public static function emailProjectOwner($offer, $winner, $project, $projectOwner)
 {
     // Enviar correo a cliente
     $asunto = "Has adjudicado un proyecto. ¡Buen Trabajo!";
     $params = array('site_url' => UrlHelper::getUrl(), 'logo_url' => UrlHelper::getUrl('images/logo_footer.png'), 'check_url' => UrlHelper::getUrl('images/check_green.gif'), 'client_name' => $projectOwner['full_name'], 'oferta_winner' => $offer->bid, 'proyecto_titulo' => $project->pro_tit, 'projecto_date' => DateHelper::getShortDate($project->pro_date), 'proyecto_url' => UrlHelper::getProjectUrl($project->pro_id), 'photograph_name' => $winner['full_name'], 'photograph_email' => $winner['email'], 'photograph_phone' => $winner['movil'], 'photograph_location' => $winner['ciudad'] . ', ' . $winner['direccion']);
     $mailer = new FMailer();
     $body = $mailer->replaceParameters($params, file_get_contents(UrlHelper::getBasePath() . '/views/emails/adjudicarProyectosClienteEmail.html'));
     $receivers = array(array('email' => $projectOwner['email']));
     $mailer->setReceivers($receivers);
     $mailer->setBCC(array(array('email' => FConfig::getValue('contacto_email'))));
     $mailer->sendEmail($asunto, $body);
 }
コード例 #4
0
ファイル: agregarProyecto.php プロジェクト: narbelys/fototea
    ?>
        <h2>Editar Proyecto</h2>
        <?php 
} else {
    ?>
        <h2>Publicar Proyecto</h2>
        <?php 
}
?>

        <blockquote>
            <p>Completa la informaci&oacute;n de tu proyecto en el siguiente formulario.</p>
        </blockquote>
        <div class="formError bold" id="formError"></div>
        <form action="<?php 
echo UrlHelper::getUrl('actions/proyectosAction.php');
?>
" method="post" id="project_form" enctype="multipart/form-data">

            <input name="pro_status" id="pro_status" type="hidden" value="B">

            <?php 
if ($isEdit) {
    ?>
                <input name="act" id="act" type="hidden" value="editarProyecto">
                <input name="pro_id" id="act" type="hidden" value="<?php 
    echo $id;
    ?>
">
            <?php 
} else {
コード例 #5
0
ファイル: misproyectos.php プロジェクト: narbelys/fototea
                                <?php 
            if ($rs_proj->pro_status == Project::PROJECT_STATUS_DRAFT) {
                ?>
                                    <a class="btn btn-primary" href="agregarProyecto?id=<?php 
                echo $rs_proj->pro_id;
                ?>
">Editar proyecto</a>
                                <?php 
            }
            ?>

                                <?php 
            if (Project::canBeQualified($rs_proj, $currentUser)) {
                ?>
                                    <a class="btn btn-primary" href="<?php 
                echo UrlHelper::getUrl("proyectoFinalizar?id=" . $rs_proj->pro_id);
                ?>
">Calificar proyecto</a>
                                <?php 
            }
            ?>
                            </div>
                        </div>
                    <?php 
        }
        ?>
                <?php 
    } else {
        ?>
                    <div class="list-item empty">
                        <h3>No se encontraron proyectos</h3>
コード例 #6
0
ファイル: editarPerfil.php プロジェクト: narbelys/fototea
<?php

use Fototea\Models\User;
use Fototea\Util\UrlHelper;
$session = validaSession();
if ($session == true) {
    $userInfo = getUserInfo($_COOKIE['id']);
    if ($userType == User::USER_TYPE_PHOTOGRAPHER) {
        include_once 'perfiles/editarFotografo.php';
    } elseif ($userType == User::USER_TYPE_CLIENT) {
        include_once 'perfiles/editarCliente.php';
    }
} else {
    $app->redirect(UrlHelper::getUrl('home'));
}
?>

<script type="text/javascript">
    function cancelNewEmail(userId){
        jQuery.ajax({
            type: 'get',
            dataType: 'json',
            url: 'actions/perfilAction.php',
            data: { user_id: userId ,act:"cancel_new_email"},
            success: function(response){
                if (response.status == 'success'){
                    jQuery('.new-email-alert').remove();
                }
            }
        });
    }