function showErrorPage() { get_header(); ?> <div class="row"> <div class="col-lg-12"> <div class="page-header"> <h1><?php echo __('Create building', 'idp-theme'); ?> <small><?php echo __('Step 3: Images', 'idp-theme'); ?> </small> </h1> </div> </div> </div> <?php idp_showAlertMessage('buildingNotFound'); ?> <?php get_footer(); exit; }
<small> <?php if (!$error && !$success) { echo Idp_Main::getBuildingAddress($buildingid); } ?> </small> </h1> </div> </div> </div> <?php if (!is_user_logged_in()) { idp_showAlertMessage('notLoggedIn'); } else { if ($error) { ?> <div class="alert alert-danger" role="alert"> <?php echo $message; ?> </div> <?php } else { if ($message) { ?> <div class="alert alert-success" role="alert"> <?php echo $message;
?> </small> </h1> </div> <?php if ($not_found) { idp_showAlertMessage('buildingNotFound'); } else { if (!is_user_logged_in()) { idp_showAlertMessage('notLoggedInEdit'); } else { if (!current_user_can('edit_buildings')) { idp_showAlertMessage('notEnoughRights'); } else { if ($building_id != '0' && get_current_user_id() != $building['creation_user'] && !current_user_can('manage_options')) { idp_showAlertMessage('onlyOwnBuildings'); } else { if ($updated === true) { ?> <div class="alert alert-success" role="alert"> <?php echo $message; ?> </div> <div class="well well-sm hidden-xs"> <a href="<?php echo get_page_link(40) . "?buildingid=" . $building_id; ?> "><?php echo __('Show building', 'idp-theme'); ?>
</div> </div> </div> <?php if (!is_user_logged_in()) { idp_showAlertMessage('notLoggedIn'); } else { if ($not_found === true) { idp_showAlertMessage('buildingNotFound'); } else { if ($building['status'] != "published" && $building['creation_user'] != get_current_user_id() && !current_user_can('manage_options')) { idp_showAlertMessage('notEnoughRightsShowDetails'); } else { if ($error) { ?> <div class="alert alert-danger" role="alert"> <?php echo $message; ?> </div> <?php } else { if ($message) { ?> <div class="alert alert-success" role="alert"> <?php echo $message;
</div> </div> <?php if (!is_user_logged_in()) { idp_showAlertMessage('notLoggedInList'); } else { if ($updated === true) { idp_showAlertMessage('submittedBuilding', 'success'); } else { if ($error === true) { idp_showAlertMessage('submittedError'); } } $buildings = Idp_Main::getStudentBuildings(); if (count($buildings) == 0) { idp_showAlertMessage('noBuildingsStudent', 'warning'); } ?> <div class="row"> <?php foreach ($buildings as $building) { $attachment = wp_get_attachment_image_src($building['main_image'], 'large-thumbnail'); if ($attachment === false) { $attachment[] = get_template_directory_uri() . "/images/spacer.png"; } ?> <div class="col-sm-6 col-lg-4"> <div class="thumbnail"> <img src="<?php echo $attachment[0]; ?>