示例#1
0
use Fototea\Models\User;
use Fototea\Models\Project;
use Fototea\Models\Project_View;
$session = validaSession();
$userType = securityValidation($_COOKIE['id']);
if ($session != true) {
    $app->redirect($app->getConfig()->getUrl('home'));
    return;
} else {
    if ($userType != User::USER_TYPE_PHOTOGRAPHER) {
        $app->redirect($app->getConfig()->getUrl('perfil'));
        return;
    }
}
$currentUser = getCurrentUser();
$projectsReceivable = Project_View::loadProjectsReceivableByUser($currentUser->id);
$total = 0;
?>

<div class="content-container">
    <div class="content" id="cuentaContainer">
        <h2>Proyectos por Cobrar</h2>
        <div class="list-container">
            <div class="list-header">
                <h3 class="col-xs-2">Fecha</h3>
                <h3 class="col-xs-6">Descripci&oacute;n del proyecto</h3>
                <h3 class="col-xs-2">Publicado por</h3>
                <h3 class="col-xs-2 text-center">Monto</h3>
            </div>
        </div>
示例#2
0
<?php

use Fototea\Models\User;
use Fototea\Models\Project_View;
use Fototea\Util\DateHelper;
use Fototea\Models\Project;
use Fototea\Models\Offer;
use Fototea\Util\UrlHelper;
?>

<?php 
if ($current_user->user_type != User::USER_TYPE_PHOTOGRAPHER) {
    die('invalid tab');
}
$projects = Project_View::loadProjectsByStatus(array(Project::PROJECT_STATUS_ACTIVE));
$offers = Offer::getUserOffers($current_user->id, array());
$result = array();
foreach ($offers as $offer) {
    if (isset($offer->pro_id)) {
        $result[$offer->pro_id] = $offer;
    }
}
$offers = $result;
//var_dump($offers);
?>

<div class="containerPerfil projects-tab-photograph">
    <div class="list-container">
        <div class="list-header">
            <div class="col-xs-2">Proyectos Nuevos</div>
            <div class="col-xs-6">Descripción del proyecto</div>
示例#3
0
$current_tab = $_GET['act'];
if (!$current_tab) {
    if ($same_user) {
        if ($user_info['user_type'] == User::USER_TYPE_PHOTOGRAPHER) {
            $current_tab = 'proyectos';
        } else {
            //cliente
            $current_tab = 'misproyectos';
        }
    } else {
        $current_tab = "info";
    }
}
$user_balance = null;
if ($same_user && $user_info['user_type'] == User::USER_TYPE_PHOTOGRAPHER) {
    $user_balance = Project_View::getTotalProjectReceivableByUser($current_user->id);
}
if ($same_user) {
    $user_new_messages = mensajesNuevos($current_user->id);
}
?>

<!-- CAJA DE IMAGEN (Cover, Foto de perfil y tabs) -->
<?php 
include 'views/common/cover.php';
?>
<!-- END CAJA DE IMAGEN -->

<!-- MENSAJES DE SISTEMA -->
<?php 
include_once 'views/common/messages.php';
示例#4
0
         break;
     case 'finalizados':
         $status[] = Project::PROJECT_STATUS_CLOSED_CLIENT;
         $status[] = Project::PROJECT_STATUS_CLOSED_FOTOTEA;
         $status[] = Project::PROJECT_STATUS_CANCELLED;
         break;
     default:
         //activos
         $status[] = Project::PROJECT_STATUS_ACTIVE;
         break;
 }
 if (empty($filter)) {
     $filter = 'activos';
     $status[] = Project::PROJECT_STATUS_ACTIVE;
 }
 $projects = Project_View::loadUserProjects($current_user->id, $status);
 $total_active = intval($totals[Project::PROJECT_STATUS_ACTIVE]);
 $total_draft = intval($totals[Project::PROJECT_STATUS_DRAFT]);
 $total_adjudicated = intval($totals[Project::PROJECT_STATUS_ADJUDICATED] + $totals[Project::PROJECT_STATUS_CLOSED_PHOTOGRAPHER]);
 $total_finished = intval($totals[Project::PROJECT_STATUS_CLOSED_CLIENT] + $totals[Project::PROJECT_STATUS_CLOSED_FOTOTEA] + $totals[Project::PROJECT_STATUS_CANCELLED]);
 foreach ($projects as $project) {
     $project->days_left = DateHelper::getHoursLeft($project->pro_date_end);
     if ($project->pro_status == Project::PROJECT_STATUS_DRAFT) {
         $project->advice = "Publica este proyecto ahora para recibir ofertas";
     }
     if ($project->pro_status == Project::PROJECT_STATUS_ACTIVE) {
         if ($project->total_ofertas > 0) {
             $project->advice = "No has adjudicado el proyecto, ¡hazlo ya!";
         }
     }
 }
示例#5
0
use Fototea\Util\DateHelper;
use Fototea\Config\FConfig;
use Fototea\Util\UrlHelper;
$current_user = getCurrentUser();
if ($current_user == false) {
    $app->redirect(UrlHelper::getLoginUrl());
    return;
}
?>

<div class="content-container">
    <div class="content">
	 <?php 
$id_pro = intval($_GET['id']);
//     $pro = listAll("proyectos","WHERE pro_id = '$id_pro'");
$rs_pro = Project_View::loadProjectById($id_pro);
$projectDeadline = $app->getHelper('DateHelper')->getShortDate($rs_pro->pro_deadline, 'd-m-Y');
$diasRestN = diffDate(date("Y-m-d H:i:s"), $rs_pro->pro_date_end);
$user_crea = getUserInfo($rs_pro->user_id);
$reviewCliente = ratings($rs_pro->user_id);
$cat = getCategory($rs_pro->pro_category);
//     $same_user = false;
//
//     if ($rs_pro->user_id == $current_user->id):
//         $same_user = true;
//     endif;
//valida que el usuario que visita no haya hecho una oferta antes al proyecto
$oferta_user = listAll("ofertas", "WHERE pro_id = '{$id_pro}' AND user_id = '{$current_user->id}'");
$rows_oferta = mysql_num_rows($oferta_user);
if ($rows_oferta > 0) {
    $ofertas = "S";