| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?php include 'admin_header.php'; ?>
- <div class="content-wrapper">
- <section class="content-header">
- <h1>
- <?=lang::_('Events')?>
- <small><?=lang::_('Events')?></small>
- <button type="button" class="btn btn-success pull-right" onclick="window.location='/admin/events/show/'"><i class="fa fa-plus"></i> <?=lang::_('Add new Event')?></button>
- </h1>
- <ol class="breadcrumb">
- <li><a href="/admin"><i class="fa fa-gears"></i> <?=lang::_('Admin')?></a></li>
- <li class="active"><?=lang::_('Events manager')?></li>
- </ol>
- </section>
-
- <section class="content">
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title"><?=lang::_('List of Events')?></h3>
- </div>
- <div class="box-body">
- <div class="row"><div class="col-lg-12" style="overflow-x: auto;">
- <table class="table table-bordered table-hover dataTable table-striped data-list">
- <thead>
- <tr>
- <th><?=lang::_('Name')?></th>
- <th><?=lang::_('Date of create')?></th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($boxes as $page) : ?>
- <tr>
- <td><?=$page->box_title?></td>
- <td><?=$page->box_date?></td>
- <td>
- <button type="button" onclick="window.location='/admin/events/show/?id=<?=$page->box_id?>';" class="btn btn-flat btn-xs btn-warning"><i class="fa fa-pencil"></i></button>
- <button type="button" onclick="window.location='/admin/events/delete/?id=<?=$page->box_id?>';" class="btn btn-flat btn-xs btn-danger"><i class="fa fa-trash-o"></i></button>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- <tfoot>
- <tr>
- <th><?=lang::_('Name')?></th>
- <th><?=lang::_('Date of create')?></th>
- <th> </th>
- </tr>
- </tfoot>
- </table>
- </div></div>
- </div>
- </div>
-
- <div class="callout callout-success<?php if (!$error) echo ' message-hide';?>">
- <button type="button" class="close" onclick="javascript: $(this).parent('div').fadeOut('fast');">×</button>
- <h4><i class="fa fa-check"></i> <?=lang::_('Yep, successfully saved!')?></h4>
- <p><?=lang::_('The given informations stored in database')?></p>
- </div>
-
- <div id="editor"></div>
- <form role="form" id="slideEditor" action="/admin/events/save/" method="post" enctype="multipart/form-data">
- <input type="hidden" name="MAX_FILE_SIZE" value="9000000000" />
- <input type="hidden" name="box_id" value="<?=$active->box_id?>" />
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title"><?=lang::_('Event editor')?></h3>
- <div class="box-tools pull-right">
- <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
- </div>
- </div>
- <div class="box-body">
- <div class="row">
- <div class="col-lg-12">
- <div class="nav-tabs-custom">
- <ul class="nav nav-tabs">
- <li class="active"><a href="#eng" data-toggle="tab" onclick="javascript: $('.tab-pane').removeClass('active'); var hash = $(this).attr('href'); $(hash).addClass('active');">English</a></li>
- <!--<li><a href="#eng" data-toggle="tab" onclick="javascript: $('.tab-pane').removeClass('active'); var hash = $(this).attr('href'); $(hash).addClass('active');">English</a></li>-->
- <!-- <li><a href="#deu" data-toggle="tab">Deutsch</a></li>-->
- </ul>
- </div>
- <div class="tab-content">
- <div class="tab-pane active" id="hun">
- <div class="form-group">
- <label for="box_subtitle"><?=lang::_('Parent group')?>: </label>
- <select name="parent_service" id="parent_service" class="form-control" onchange="javascript: loadEvents($(this).val());">
- <option value="0"><?=lang::_('No parent group')?></option>
- <?php foreach ($services as $service) : ?>
- <option value="<?=$service['id']?>" <?php if ($active->parent_service == $service['id']) echo 'selected';?>><?=$service['label']?></option>
- <?php endforeach; ?>
- </select>
- </div>
- <div class="form-group">
- <label for="box_subtitle"><?=lang::_('Parent event')?>: </label>
- <select name="parent_event" id="parent_event" class="form-control" onchange="javascript: loadMenu($(this).val());">
- <option value="0"><?=lang::_('Fist select a group...')?></option>
- <?php foreach ($events as $event) : ?>
- <option value="<?=$event['key']?>" <?php if ($active->parent_event == $event['key']) echo 'selected';?>><?=$event['label']?></option>
- <?php endforeach; ?>
- </select>
- </div>
- <div class="form-group">
- <label for="box_title"><?=lang::_('Title')?>: </label>
- <input type="text" name="box_title" value="<?=$active->box_title?>" class="form-control" id="box_title" data-validate="true" />
- </div>
- <div class="form-group">
- <label for="box_title_en"><?=lang::_('Title (EN)')?>: </label>
- <input type="text" name="box_title_en" value="<?=$active->box_title_en?>" class="form-control" id="box_title_en" data-validate="true" />
- </div>
- <div class="form-group">
- <label for="box_price"><?=lang::_('Price')?>: </label>
- <input type="text" name="box_price" value="<?=$active->parent_price?>" class="form-control" id="box_price" data-validate="true" />
- </div>
- <div class="form-group">
- <label for="box_subtitle"><?=lang::_('Description')?>: </label>
- <textarea name="box_subtitle" class="form-control" id="box_subtitle"><?=$active->box_subtitle?></textarea>
- </div>
- <div class="form-group">
- <label for="box_subtitle_en"><?=lang::_('Description (EN)')?>: </label>
- <textarea name="box_subtitle_en" class="form-control" id="box_subtitle_en"><?=$active->box_subtitle_en?></textarea>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12">
- <button type="submit" class="btn btn-success"><?=lang::_('Save');?></button>
- </div>
- </div>
- </div>
- </div>
- </form>
- <?php if ($active->box_id != '') : ?>
- <form role="form" id="slideEditor" action="/admin/events/subpage/#newBlock" method="post" enctype="multipart/form-data">
- <input type="hidden" name="MAX_FILE_SIZE" value="9000000000" />
- <input type="hidden" name="id" value="<?=$active->box_id?>" />
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title"><?=lang::_('Galery editor')?></h3>
- <div class="box-tools pull-right">
- <button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
- </div>
- </div>
- <div class="box-body" id="newBlock">
- <div class="row">
- <div class="col-lg-12"><button type="button" class="btn btn-success" onclick="window.location.href='/admin/events/subpage/?id=<?=$active->box_id?>&newBlock=true#newBlock'" style="margin-bottom: 16px;">Add image</button></div>
- </div>
- <?php if ($_REQUEST['newBlock'] != '') : ?>
- <input type="hidden" name="block_action" value="addBlock" />
- <div class="row">
- <div class="col-lg-12">
- <div class="form-group">
- <label for="box_subtitle"><?=lang::_('Type')?>: </label>
- <select name="block_type" id="block_type" class="form-control" onchange="window.location.href='/admin/events/subpage/?id=<?=$active->box_id?>&newBlock=true&block_type='+this.value+'#newBlock';">
- <option value="5" <?php if ($_REQUEST['block_type'] == 5) echo 'selected'; ?>><?=lang::_('Image')?></option>
- </select>
- </div>
- </div>
- </div>
- <div class="row image-props">
- <div class="col-lg-12">
- <div class="form-group">
- <label for="image_content"><?=lang::_('Image')?>: </label>
- <input type="file" name="image_content" class="form-control" id="image_content" />
- </div>
- </div>
- </div>
- <div class="row" style="margin-bottom: 32px;">
- <div class="col-lg-12">
- <button type="submit" class="btn btn-success">Save image</button>
- </div>
- </div>
- <?php endif; ?>
- <?php if ($_REQUEST['block_id'] != '') : ?>
- <input type="hidden" name="block_action" value="updateBlock" />
- <input type="hidden" name="block_id" value="<?=$_REQUEST['block_id']?>" />
- <div class="row image-props">
- <div class="col-lg-12">
- <div class="form-group">
- <label for="image_content"><?=lang::_('Image')?>: </label>
- <input type="file" name="image_content" class="form-control" id="image_content" />
- </div>
- </div>
- </div>
- <div class="row" style="margin-bottom: 32px;">
- <div class="col-lg-12">
- <button type="submit" class="btn btn-success">Save image</button>
- </div>
- </div>
- <?php endif; ?>
- <div class="row">
- <?php foreach ($blocks as $block) : ?>
- <div class="col-lg-3">
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title"> </h3>
- <div class="box-tools pull-right">
- <div class="btn-group">
- <button type="button" class="btn btn-danger" onclick="window.location.href='/admin/events/subpage/?id=<?=$active->box_id?>&block_action=deleteBlock&block_id=<?=$block->block_id?>#newBlock'">
- <i class="fa fa-trash"></i>
- </button>
- </div>
- </div>
- </div>
- <div class="box-body">
- <?php if ($block->block_type == 1) : ?>
- <h1>
- <?=$block->h1_text?>
- </h1>
- <?php elseif ($block->block_type == 2) : ?>
- <h2>
- <?=$block->h2_text?>
- </h2>
- <?php elseif ($block->block_type == 3) : ?>
- <p>
- <?=nl2br($block->p_text)?>
- </p>
- <?php elseif ($block->block_type == 4) : ?>
- <div class="note">
- <?=nl2br($block->note_text)?>
- </div>
- <?php elseif ($block->block_type == 5) : ?>
- <img src="/<?=$block->image_content?>" alt="" style="max-width: 100%;height: auto;" />
- <?php elseif ($block->block_type == 6) : ?>
- <button type="button" class="btn btn-success">CTA buttons</button>
- <?php endif; ?>
- </div>
- </div>
- </div>
- <?php endforeach; ?>
- </div>
- </div>
- </div>
- </form>
- <?php endif; ?>
- </section>
- </div>
- <?php include 'admin_footer.php'; ?>
|