Esempio n. 1
0
 public static function getThumbUrl($imgBaseUrl, $width, $height, $refreshCache = false)
 {
     FConfig::getThumbUrl($imgBaseUrl, $width, $height, $refreshCache);
 }
Esempio n. 2
0
     unlink($targetImageTemp);
     //error_get_last()
     if ($result) {
         //Get type sizes
         $width = FConfig::getValue($type . "_image_width");
         $height = FConfig::getValue($type . "_image_height");
         //Clear cache
         $cacheFileName = 'profiles_' . $folder_id . "_" . $type . ".jpg";
         $cacheImage = $cacheDir . $width . 'x' . $height . DS . $cacheFileName;
         //TODO revisar la carpeta cache de las imagenes y volar las que apliquen
         //$result = unlink($cacheImage);
         ImageHelper::clearImageCache($cacheDir, $cacheFileName);
         //TODO Clear temp images
         $response->status = "success";
         $response->message = "{$type} image changed";
         $response->img_url = FConfig::getThumbUrl($targetImageUrl, $width, $height, true);
     } else {
         $response->status = "error";
         $response->message = "{$type} image could not be changed";
     }
     //echo ()
     header('Content-type: application/json');
     echo json_encode($response);
     die;
 }
 /**
  * Handle upload to candidate image, ( the image to be cropped)
  */
 if ($action == 'uploadImage') {
     $response = new stdClass();
     //TODO validate user, if there is an error append to json response
Esempio n. 3
0
                ?>
                                    <div class="proBoxUserContFot">
                                        <div class="left">
                                            <div>
                                                <?php 
                $user_crea = getUserInfo($rs_proj->oferta_user_id);
                //
                //                                            if(is_null($user_crea['user_img'])){
                //                                                $img_profile = "images/img_profile_default.jpg";
                //                                            }else{
                //                                                $img_profile = "thumb.php?w=60&h=60&url=profiles/".sha1($user_crea['id'])."/".$user_crea['user_img'];
                //                                            }
                $reviewO = ratings($user_crea['id']);
                ?>
                                                <img alt="Imagen de usuario" src="<?php 
                echo FConfig::getThumbUrl($user_crea['profile_image_url'], 50, 50);
                ?>
" width="50" height="50" class="img-circle"/>
                                            </div>
                                        </div><!-- End left -->
                                        <div class="left proBoxUser">
                                            <div class="font12 fontW400">Adjudicado a:</div>
                                            <div>
                                                <a href="perfil?us=<?php 
                echo $user_crea['act_code'];
                ?>
" class="project-link fontW400"><?php 
                echo $user_crea['full_name'];
                ?>
</a>
                                            </div>
Esempio n. 4
0
if (!$current_user) {
    die('invalid user');
    //TODO handle this
} else {
    if ($current_user->id == $user_info['id']) {
        $same_user = true;
    }
}
//REVIEWS TAB
$review = ratings($user_info['id']);
$img_cover = $user_info['cover_image_url'];
$img_profile = $user_info['profile_image_url'];
$cover_url = FConfig::getThumbUrl($img_cover, FConfig::getValue('cover_image_width'), FConfig::getValue('cover_image_height'));
$profile_url = FConfig::getThumbUrl($img_profile, FConfig::getValue('profile_image_width'), FConfig::getValue('profile_image_height'));
$cover_edit_url = FConfig::getThumbUrl($img_cover, 400, 400);
$profile_edit_url = FConfig::getThumbUrl($img_profile, 400, 400);
$user_info['ciudad'] = ucfirst($user_info['ciudad']);
$user_info['descripcion'] = substr(ucfirst($user_info['descripcion']), 0, 140);
$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";
    }
}
Esempio n. 5
0
    </div>
    <div class="col-xs-12 list-container">
        <div class="list-content">
        <?php 
foreach ($comments as $rs_com) {
    ?>
            <div class="list-item">
                <div class="col-xs-1">
                    <a href="perfil?us=<?php 
    echo $rs_com->user['act_code'];
    ?>
"> <img alt="<?php 
    echo $rs_com->user['full_name'];
    ?>
" src="<?php 
    echo FConfig::getThumbUrl($rs_com->user['profile_image_url'], 60, 60);
    ?>
" width="60" height="60" border="0" class="img-circle"></a>
                </div>
                <div class="col-xs-2">
                    <p><a href="perfil?us=<?php 
    echo $rs_com->user['act_code'];
    ?>
" class=" fontW400"><?php 
    echo $rs_com->user['full_name'];
    ?>
</a>
                        <br><?php 
    echo $rs_com->reviewO['stars'];
    ?>
<!--                        <br><span class="font12">--><?php 
Esempio n. 6
0
$album_condition = "WHERE a_user_id = '" . $user_info['id'] . "' AND a_id = ad_a_id AND a_status = 'S' GROUP BY ad_a_id";
//if($same_user){
$album_condition = "WHERE a_user_id = '" . $user_info['id'] . "'";
//}
$album = listAll("albumes", $album_condition);
$albums = array();
while ($rs_album = mysql_fetch_object($album)) {
    $fotos = listAll("albumes_det", "WHERE ad_a_id = '{$rs_album->a_id}'AND ad_status = 'S' ORDER BY ad_is_principal, ad_id");
    $rs_album->fotos = array();
    $rs_album->base_url = 'profiles/' . sha1($user_info['id']) . "/" . sha1($rs_album->a_id) . "/";
    $rs_album->total_fotos = 0;
    while ($rs_foto = mysql_fetch_object($fotos)) {
        //Prepare urls
        $rs_foto->base_url = $rs_album->base_url . $rs_foto->ad_url;
        //TODO fix magic numbers here
        $rs_foto->full_size_url = FConfig::getThumbUrl($rs_foto->base_url, 1440, 900);
        $rs_foto->album_cover_thumb = UrlHelper::getAlbumThumbUrl($rs_foto->base_url, 440, 300, true);
        $rs_foto->album_thumb = UrlHelper::getAlbumThumbUrl($rs_foto->base_url, 223, 150, true);
        if ($rs_foto->ad_is_principal) {
            $rs_album->principal = $rs_foto;
        } else {
            $rs_album->fotos[] = $rs_foto;
        }
        $rs_album->total_fotos++;
    }
    //Si no hay principal , coloco a la primera
    if ($rs_album->principal == null) {
        $rs_album->principal = array_shift($rs_album->fotos);
    }
    $albums[] = $rs_album;
}
Esempio n. 7
0
                 <div class="current-offer-detail clearfix" id="oid_<?php 
    echo $rs_of->id;
    ?>
">
                     <div class="col-xs-2">
                         <?php 
    $reviewO = ratings($user_of['id']);
    ?>
                         <a href="perfil?us=<?php 
    echo $user_of['act_code'];
    ?>
"> <img alt="<?php 
    echo ucwords($user_of['name'] . " " . $user_of['lastname']);
    ?>
" src="<?php 
    echo FConfig::getThumbUrl($user_of['profile_image_url'], 60, 60);
    ?>
" border="0" class="img-circle"></a>
                            <br>
                            <?php 
    echo $reviewO['stars'];
    ?>
<br><a href="perfil?us=<?php 
    echo $user_of['act_code'];
    ?>
&act=reviews" class="txtAzul font12 fontW400">Comentarios <?php 
    echo $reviewO['comentarios'];
    ?>
</a>
                     </div>
                     <div class="col-xs-6">