<label><?php 
    _e('Local de Residência', 'tnb');
    ?>
</label>
                <select id='evento_filtro_residencia_pais' name='evento_filtro_residencia_pais' <?php 
    if ($contrato_lock) {
        echo 'class="contrato_lock" ';
    }
    ?>
>
                    <option value=''><?php 
    _e('sem restrição', 'tnb');
    ?>
</option>
                <?php 
    foreach (get_paises() as $sigla => $pais) {
        ?>
                    <option value="<?php 
        echo $sigla;
        ?>
" <?php 
        if ($event_meta['evento_filtro_residencia_pais'] == $sigla) {
            echo 'selected="selected"';
        }
        ?>
><?php 
        echo $pais;
        ?>
</option>
                <?php 
    }
Exemplo n.º 2
0
            <?php 
_e('Telefone', 'tnb');
?>
: <?php 
echo $curauth->telefone;
?>
        </p>
    
        <p>
            <strong><?php 
_e('Origem', 'tnb');
?>
</strong>
            <br/>
            <?php 
$paises = get_paises();
?>
            <?php 
echo $curauth->origem_cidade;
?>
 - <?php 
echo $curauth->origem_estado;
?>
 (<?php 
echo $paises[$curauth->origem_pais];
?>
)
        </p>
    
        <p>
            <strong><?php 
    protected function __output()
    {
        $user = get_user_by('id', $this->user_id);
        ?>
        <?php 
        if ($this->property['exibir_nome']) {
            ?>
            <h2> <?php 
            echo $user->display_name;
            ?>
 </h2>
        <?php 
        }
        ?>
        
        <?php 
        if ($this->property['exibir_avatar']) {
            ?>
            <div>
                <?php 
            echo get_avatar($this->user_id);
            ?>
            </div>
        <?php 
        }
        ?>
         
        <?php 
        //if (current_user_can('select_artists')):
        ?>
            <p>
                <?php 
        if ($this->property['exibir_telefone'] && $user->telefone) {
            ?>
                    <strong><?php 
            _e('Telefone', 'tnb');
            ?>
</strong>:                     
                    <?php 
            echo $user->telefone;
            ?>
<br />
                <?php 
        }
        ?>
                                
                <?php 
        if ($this->property['exibir_email'] && $user->email_publico) {
            ?>
                    <strong><?php 
            _e('E-mail', 'tnb');
            ?>
</strong>: 
                    <?php 
            echo $user->email_publico;
            ?>
                <?php 
        }
        ?>
            </p>
        <?php 
        //endif; // user_can select_artists
        ?>
        
        <?php 
        if ($this->property['exibir_origem']) {
            ?>
            <p>
                <strong><?php 
            _e('Origem', 'tnb');
            ?>
</strong><br />
                <?php 
            $paises = get_paises();
            ?>
                <?php 
            echo $user->origem_cidade;
            ?>
 - <?php 
            echo $user->origem_estado;
            ?>
 (<?php 
            echo $paises[$user->origem_pais];
            ?>
)
            </p>
            
        <?php 
        }
        ?>
       
       <?php 
        if ($this->property['exibir_redes_sociais']) {
            ?>
            <?php 
            if ($user->facebook || $user->twitter || $user->orkut || $user->youtube || $user->vimeo) {
                ?>
                <p class="redes-sociais bottom">
                    <strong><?php 
                _e('Redes Sociais', 'tnb');
                ?>
 </strong><br />
                    <?php 
                if ($user->facebook) {
                    ?>
 <a href='<?php 
                    echo $user->facebook;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/facebook.png" alt="" /></a> <?php 
                }
                ?>
 
                    <?php 
                if ($user->twitter) {
                    ?>
 <a href='<?php 
                    echo $user->twitter;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/twitter.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($user->orkut) {
                    ?>
 <a href='<?php 
                    echo $user->orkut;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/orkut.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($user->youtube) {
                    ?>
 <a href='<?php 
                    echo $user->youtube;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/youtube.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($user->vimeo) {
                    ?>
 <a href='<?php 
                    echo $user->vimeo;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/vimeo.png" alt="" /></a> <?php 
                }
                ?>
                </p>
            <?php 
            }
            ?>
        <?php 
        }
        ?>
        <?php 
    }
    protected function __output()
    {
        $artista = get_user_by('id', $this->user_id);
        $galeriasId['rider'] = tnb_get_artista_galeria($profileuser->ID, 'rider');
        $galeriasId['mapa_palco'] = tnb_get_artista_galeria($profileuser->ID, 'mapa_palco');
        $mapa_palco = null;
        $rider = null;
        if ($this->property['exibir_mapa']) {
            $media_mp = get_posts("post_parent=" . $galeriasId['mapa_palco']->ID . "&post_type=attachment&meta_key=_media_index&meta_value=mapa_palco_1&author={$this->user_id}");
            if (isset($media_mp[0])) {
                $mapa_palco = $media_mp[0];
            }
        }
        if ($this->property['exibir_rider']) {
            $media_r = get_posts("post_parent=" . $galeriasId['rider']->ID . "&post_type=attachment&meta_key=_media_index&meta_value=rider_1&author={$this->user_id}");
            if (isset($media_r[0])) {
                $rider = $media_r[0];
            }
        }
        ?>
        <?php 
        if ($this->property['exibir_nome']) {
            ?>
            <h2> <?php 
            echo $artista->display_name;
            ?>
 </h2>
        <?php 
        }
        ?>
        
        
        <div>
            <?php 
        if ($this->property['exibir_avatar']) {
            ?>
                <?php 
            echo get_avatar($this->user_id);
            ?>
            <?php 
        }
        ?>
            
            <?php 
        if ($this->property['exibir_release']) {
            ?>
                <p class="bottom"><?php 
            echo nl2br(strip_tags($artista->description, '<p><a><img><blockquote><i><b><hr>'));
            ?>
</p>
            <?php 
        }
        ?>
            
            <?php 
        if ($this->property['exibir_integrantes']) {
            ?>
                <p class="bottom">
                    <strong><?php 
            _e('Integrantes', 'tnb');
            ?>
:</strong><br />
                    <?php 
            echo nl2br(strip_tags($artista->integrantes, '<p><a><img><blockquote><i><b><hr>'));
            ?>
                </p>
            <?php 
        }
        ?>
        </div>
        <?php 
        if ($mapa_palco || $rider) {
            ?>
        <p class="bottom">
            <strong><?php 
            _e('Downloads', 'tnb');
            ?>
:</strong>
            
            <?php 
            if ($mapa_palco) {
                ?>
            
                <a class="btn-download button" href="<?php 
                echo wp_get_attachment_url($mapa_palco->ID);
                ?>
"><?php 
                _e('Mapa do Palco', 'tnb');
                ?>
</a>
                
            <?php 
            }
            ?>
            
            <?php 
            if ($rider) {
                ?>
                
                <a class="btn-download button" href="<?php 
                echo wp_get_attachment_url($rider->ID);
                ?>
"><?php 
                _e('Rider', 'tnb');
                ?>
</a>
                
            <?php 
            }
            ?>

        </p>
        <?php 
        }
        ?>
        <?php 
        // INFORMAÇÔES RESTRITAS A PRODUTORES
        ?>
        
        <?php 
        //if (current_user_can('select_artists')):
        ?>
            <p class="bottom">
                
                <?php 
        if ($this->property['exibir_telefone'] && $artista->telefone) {
            ?>
                    <strong><?php 
            _e('Telefone', 'tnb');
            ?>
</strong>:                     
                   <?php 
            echo $artista->telefone;
            ?>
<br />
                <?php 
        }
        ?>
                                
                <?php 
        if ($this->property['exibir_email'] && $artista->email_publico) {
            ?>
                    <strong><?php 
            _e('E-mail', 'tnb');
            ?>
</strong>: 
                    <?php 
            echo $artista->email_publico;
            ?>
                <?php 
        }
        ?>
            </p>
        <?php 
        //endif; // user_can select_artists
        ?>
        
        <?php 
        if ($this->property['exibir_origem']) {
            ?>
                        
            <p class="bottom">
                <?php 
            $paises = get_paises();
            ?>
                <?php 
            if ($artista->origem_cidade || $artista->origem_estado) {
                ?>
                    <strong><?php 
                _e('Origem:', 'tnb');
                ?>
</strong>
                    <?php 
                echo $artista->origem_cidade;
                ?>
 - <?php 
                echo $artista->origem_estado;
                ?>
 (<?php 
                echo $paises[$artista->origem_pais];
                ?>
)
                <?php 
            } elseif ($this->editable()) {
                ?>
                    <strong><?php 
                _e('Origem:', 'tnb');
                ?>
</strong>
                    <a href="<?php 
                echo get_author_posts_url($this->user_id);
                ?>
/editar/banda"><?php 
                _e("adicionar esta informação.");
                ?>
</a>
                <?php 
            }
            ?>
            </p>
            
        <?php 
        }
        ?>
        
        <?php 
        if ($this->property['exibir_residencia']) {
            ?>
            <p class="bottom">
                <?php 
            if (!is_array($paises)) {
                $paises = get_paises();
            }
            ?>
                <?php 
            if ($artista->banda_cidade || $artista->banda_estado || $artista->banda_pais) {
                ?>
                    <strong><?php 
                _e('Residência:', 'tnb');
                ?>
</strong>
                    <?php 
                echo $artista->banda_cidade;
                ?>
 - <?php 
                echo $artista->banda_estado;
                ?>
 (<?php 
                echo $paises[$artista->banda_pais];
                ?>
)
                <?php 
            } elseif ($this->editable()) {
                ?>
                    <strong><?php 
                _e('Residência:', 'tnb');
                ?>
</strong>
                    <a href="<?php 
                echo get_author_posts_url($this->user_id);
                ?>
/editar/banda"><?php 
                _e("adicionar esta informação.");
                ?>
</a>
                <?php 
            }
            ?>
            </p>
        <?php 
        }
        ?>
        
        <?php 
        if ($this->property['exibir_estilo'] && $artista->estilo_musical_livre) {
            ?>
            <p class="bottom">
                <strong><?php 
            _e('Estilo', 'tnb');
            ?>
</strong><br />
                <?php 
            echo $artista->estilo_musical_livre;
            ?>
            </p>
        <?php 
        }
        ?>
        <?php 
        if ($this->property['exibir_redes_sociais']) {
            ?>
            <?php 
            if ($artista->facebook || $artista->twitter || $artista->orkut || $artista->youtube || $artista->vimeo) {
                ?>
                <p class="redes-sociais bottom">
                    <strong><?php 
                _e('Redes Sociais', 'tnb');
                ?>
 </strong><br />
                    <?php 
                if ($artista->facebook) {
                    ?>
 <a href='<?php 
                    echo $artista->facebook;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/facebook.png" alt="" /></a> <?php 
                }
                ?>
 
                    <?php 
                if ($artista->twitter) {
                    ?>
 <a href='<?php 
                    echo $artista->twitter;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/twitter.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($artista->orkut) {
                    ?>
 <a href='<?php 
                    echo $artista->orkut;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/orkut.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($artista->youtube) {
                    ?>
 <a href='<?php 
                    echo $artista->youtube;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/youtube.png" alt="" /></a> <?php 
                }
                ?>
                    <?php 
                if ($artista->vimeo) {
                    ?>
 <a href='<?php 
                    echo $artista->vimeo;
                    ?>
' target="blank"><img src="<?php 
                    bloginfo('stylesheet_directory');
                    ?>
/img/vimeo.png" alt="" /></a> <?php 
                }
                ?>
                </p>
            <?php 
            }
            ?>
        <?php 
        }
        ?>
        <?php 
    }
Exemplo n.º 5
0
function pagamento_substitui_substituicoes($texto, $evento_id, $valor = null, $porcentagem = null, $artista = null)
{
    $evento = get_post($evento_id);
    $edata = get_oportunidades_data($evento_id);
    $produtor = get_user_by('id', $evento->post_author);
    $paises = get_paises();
    $estados = get_estados();
    $edata = (object) $edata;
    if (is_null($valor) || is_null($porcentagem)) {
        $contrato = get_contrato_inscricao($evento_id);
        if (is_null($valor)) {
            $valor = $contrato['valor'];
        }
        if (is_null($porcentagem)) {
            $porcentagem = $contrato['porcentagem'];
        }
    }
    $substituicoes = array('{produtor-cadastro-id}' => $produtor->ID, '{produtor-cadastro-data}' => $produtor->user_registered, '{produtor-nome}' => $produtor->display_name, '{produtor-documento}' => $produtor->cnpj ? $produtor->cnpj : $produtor->cpf, '{produtor-email}' => $produtor->user_email, '{produtor-telefone}' => $produtor->telefone, '{produtor-pais}' => $paises[$produtor->origem_pais], '{produtor-estado}' => $produtor->origem_pais == 'BR' ? $estados[strtolower($produtor->origem_estado)] : $produtor->origem_estado, '{produtor-cidade}' => $produtor->origem_cidade, '{produtor-url}' => get_author_posts_url($evento->post_author), '{produtor-link}' => '<a href="' . get_author_posts_url($evento->post_author) . '">' . $produtor->display_name . '</a>', '{evento-nome}' => $evento->post_title, '{evento-descricao}' => $evento->post_content, '{evento-inicio}' => $edata->br_inicio, '{evento-fim}' => $edata->br_fim, '{evento-inscricao-inicio}' => $edata->br_insc_inicio, '{evento-inscricao-fim}' => $edata->br_insc_fim, '{evento-estabelecimento}' => $edata->local, '{evento-pais}' => $paises[$edata->sigla_pais], '{evento-estado}' => $edata->sigla_pais == 'BR' ? $estados[strtolower($edata->estado)] : $edata->estado, '{evento-cidade}' => $edata->cidade, '{evento-url}' => get_permalink($evento_id), '{evento-link}' => '<a href="' . get_permalink($evento_id) . '">' . $evento->post_title . '</a>', '{contrato-valor}' => get_valor_monetario($valor), '{contrato-porcentagem}' => $porcentagem . '%', '{contrato-porcentagem-produtor}' => 100 - $porcentagem . '%', '{contrato-valor-tnb}' => get_valor_monetario($valor * $porcentagem / 100));
    if ($artista) {
        $substituicoes += array('{artista-nome}' => $artista->display_name, '{artista-url}' => get_author_posts_url($artista->ID), '{artista-link}' => '<a href="' . get_author_posts_url($artista->ID) . '">' . $artista->display_name . '</a>');
    } else {
        $substituicoes += array('{artista-nome}' => '', '{artista-url}' => '', '{artista-link}' => '');
    }
    foreach ($substituicoes as $de => $para) {
        $texto = str_replace($de, $para, $texto);
    }
    return $texto;
}