Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/account/photos.php |
<?php if (isset($message)):?>
<div id="message-red" >
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="red-left">
<?php echo $message;?>
</td>
<td class="red-right"><a class="close-red"><?php echo HTML::image('static/images/table/icon_close_red.gif');?></a></td>
</tr>
</table>
</div>
<?php endif;?>
<?php echo Message::render(); ?>
<div class="container">
<?php echo aurora::partial('frontend_sider'); ?>
<div id="content">
<h2><?php echo __t('Zarządzanie <span>profilem</span>'); ?>
</h2>
<p><?php echo __t('Witaj w strefie dostępnej dla użytkowników systemu'); ?></p>
<br style="clear: both;"/><br style="clear: both;"/>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'artist' AND Request::current()->param('act') == '' ) echo 'button_gray_active'; ?>" href="account/artist">Twoi artyści</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'artist' AND Request::current()->param('act') == 'edit' ) echo 'button_gray_active'; ?>" href="account/artist/edit">Dodaj artystę</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'news' AND Request::current()->param('act') == '' ) echo 'button_gray_active'; ?>" href="account/news">Wydarzenia</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'news' AND Request::current()->param('act') == 'edit' ) echo 'button_gray_active'; ?>" href="account/news/edit">Dodaj wydarzenie</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'article' AND Request::current()->param('act') == '' ) echo 'button_gray_active'; ?>" href="account/article">Artykuły</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'article' AND Request::current()->param('act') == 'edit' ) echo 'button_gray_active'; ?>" href="account/article/edit">Dodaj artykuł</a>
<a class="button_gray <?php if( Request::current()->controller() == 'Account' AND Request::current()->action() == 'photos' ) echo 'button_gray_active'; ?>" href="account/photos">Zdjęcia</a>
<h2>Zdjęcia <span>galerii</span></h2>
<form method="post" action="" enctype="multipart/form-data">
<fieldset class="forms">
<div>
<label>Dodaj zdjęcia:</label><br style="clear: both;"/>
<input type="file" multiple name="photos[]"/><br style="clear: both;"/>
</div>
<br style="clear: both;"/>
<input type="submit" value="Zapisz"/>
</fieldset>
</form>
<h2>Dodane <span>zdjęcia</span></h2>
<div class="instagram">
<?php foreach( $galleryImages as $row ) : ?>
<div style="position: relative; float: left;">
<a class="example-image-link" data-lightbox="example-1" href="/<?php echo $row->galleryImage_image; ?>"><img src="/image.php/image-name.jpg?width=134&height=134&cropratio=1:1&image=/<?php echo $row->galleryImage_image; ?>" alt=""/></a>
<a href="account/photos?delete=<?php echo $row->galleryImage_id; ?>" style="position: absolute; top: 0px; right: 0px;"><img style="width: 12px; height: 12px;" src="html/images/action_delete.gif" alt=""/></a>
</div>
<?php endforeach; ?>
</div>
<br style="clear: both;"/>
</div>
</div>
</div>
<script>
$(window).ready( function() {
$('#fv').click( function() {
if( $('#fv:checked').length ) {
$('#fv_area').show();
} else {
$('#fv_area').hide();
}
});
});
function NIPIsValid(nip) {
var weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
nip = nip.replace(/[\s-]/g, '');
if (nip.length == 10 && parseInt(nip, 10) > 0) {
var sum = 0;
for(var i = 0; i < 9; i++){
sum += nip[i] * weights[i];
}
return (sum % 11) == nip[9];
}
return false;
}
function validateForm_Data() {
var error = 0;
var form = document.forms['form_edit_data'];
if( 1 == 1 ) {
f = "#firstname";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#lastname";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#billing_bank_account";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#billing_bank";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#company";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#street";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#postcode";
$(f).removeClass('input_error');
$('.input_error_text').remove();
$(f).removeClass('input_error');
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
} else {
if( $('#country_id').val() == 1 ) {
if (!$(f).val().match(/^[0-9]{2}[-][0-9]{3}$/)) {
$(f).addClass('input_error');
error++;
}
}
}
f = "#city";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $(f).val() == "" ) {
$(f).addClass('input_error');
error++;
}
f = "#nip";
$(f).removeClass('input_error');
$('.input_error_text').remove();
if( $('#country_id').val() == 1 ) {
if( !NIPIsValid( $(f).val() ) ) {
$(f).addClass('input_error');
error++;
}
}
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
</script>
<script>
function validateForm2() {
var error = 0;
var form = document.forms['form_edit2'];
field = "#_edit_password";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
}
field = "#_edit_oldpassword";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
}
field1 = "#_edit_password";
field = "#_edit_re-password";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" || ($(field1).val() != $(field).val() ) ) {
$(field).addClass('input_error');
error++;
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
function validateFormEmail() {
var error = 0;
var form = document.forms['form_edit_email'];
field = "#_edit_email";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() == "" ) {
$(field).addClass('input_error');
error++;
} else {
if (!$(field).val().match(/^[0-9a-z_.-]+@([0-9a-z-]+.)+[a-z]{2,6}$/)) {
$(field).addClass('input_error');
error++;
}
}
field0 = "#_edit_email";
field = "#_edit_email2";
$(field).removeClass('input_error');
$('.input_error_text').remove();
if( $(field).val() != $(field0).val() ) {
$(field).addClass('input_error');
error++;
}
if( error === 0 ) {
form.submit();
} else {
alert('<?php echo __t('Błędnie wypełniony formularz'); ?>');
}
}
</script>