Browse Source

bootstrap adaptations

pull/2/head
Mark (ilosuna) 12 years ago
parent
commit
13ad90bc26
16 changed files with 75 additions and 553 deletions
  1. +0
    -6
      cms/config/page_types.conf.php
  2. BIN
      cms/data/content.sqlite
  3. BIN
      cms/data/entries.sqlite
  4. BIN
      cms/data/userdata.sqlite
  5. +1
    -0
      cms/includes/page_types/commentable_page.php
  6. +0
    -336
      cms/includes/page_types/newsletter.php
  7. +1
    -32
      cms/lang/english.page.lang.php
  8. +1
    -1
      cms/templates/admin/subtemplates/admin_menu.inc.tpl
  9. +23
    -14
      cms/templates/admin/subtemplates/comments.inc.tpl
  10. +20
    -20
      cms/templates/admin/subtemplates/settings.inc.tpl
  11. +1
    -1
      cms/templates/subtemplates/comments.inc.tpl
  12. +26
    -13
      cms/templates/subtemplates/formmailer.inc.tpl
  13. +0
    -29
      cms/templates/subtemplates/formmailer.tpl.inc
  14. +0
    -99
      cms/templates/subtemplates/newsletter.inc.tpl
  15. +1
    -2
      static/css/style.css
  16. +1
    -0
      static/css/style_admin.css

+ 0
- 6
cms/config/page_types.conf.php View File

@ -52,12 +52,6 @@ $page_types['notes'] = array(
'requires_parameter' => true
);
$page_types['newsletter'] = array(
'page_type' => 'newsletter.php',
'page_type_label' => 'page_type_newsletter',
'requires_parameter' => false
);
$page_types['search'] = array(
'page_type' => 'search.php',
'page_type_label' => 'page_type_search',


BIN
cms/data/content.sqlite View File


BIN
cms/data/entries.sqlite View File


BIN
cms/data/userdata.sqlite View File


+ 1
- 0
cms/includes/page_types/commentable_page.php View File

@ -149,6 +149,7 @@ if(empty($template_done))
$pingbacks = $comment->get_pingbacks();
$template->assign('comments', $comments);
$template->assign('total_comments', $comment->total_comments);
$template->assign('pingbacks', $pingbacks);
$template->assign('pagination', pagination($comment->total_pages,$comment->current_page));
$template->assign('current_page', $comment->current_page);


+ 0
- 336
cms/includes/page_types/newsletter.php View File

@ -1,336 +0,0 @@
<?php
if(!defined('IN_INDEX')) exit;
// clean up:
$one_hour_ago = time()-3600;
$dbr = Database::$entries->prepare("DELETE FROM ".Database::$db_settings['newsletter_table']." WHERE time < :one_hour_ago AND confirmed = 0");
$dbr->bindParam(':one_hour_ago', $one_hour_ago, PDO::PARAM_INT);
$dbr->execute();
if(isset($_GET['get_1']) && $_GET['get_1']=='subscribe')
{
$no_cache = true;
if(empty($_GET['get_2']) || empty($_GET['get_3'])) $error = true;
if(empty($error))
{
if(trim($_GET['get_2'])=='' || trim($_GET['get_3'])=='') $error = true;
}
if(empty($error))
{
$dbr = Database::$entries->prepare("SELECT confirmation_code FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id LIMIT 1");
$dbr->bindParam(':id', $_GET['get_2'], PDO::PARAM_INT);
$dbr->execute();
$data = $dbr->fetch();
if(isset($data['confirmation_code']) && $_GET['get_3'] == $data['confirmation_code'])
{
$dbr = Database::$entries->prepare("UPDATE ".Database::$db_settings['newsletter_table']." SET confirmed=1, confirmation_code='' WHERE id=:id");
$dbr->bindParam(':id', $_GET['get_2'], PDO::PARAM_INT);
$dbr->execute();
$action = 'confirmation_ok';
}
else
{
$error = true;
}
}
if(isset($error)) $action = 'confirmation_failed';
}
if(isset($_GET['get_1']) && $_GET['get_1']=='unsubscribe')
{
$no_cache = true;
if(empty($_GET['get_2']) || empty($_GET['get_3'])) $error = true;
if(empty($error))
{
if(trim($_GET['get_2'])=='' || trim($_GET['get_3'])=='') $error = true;
}
if(empty($error))
{
$dbr = Database::$entries->prepare("SELECT confirmation_code FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id LIMIT 1");
$dbr->bindParam(':id', $_GET['get_2'], PDO::PARAM_INT);
$dbr->execute();
$data = $dbr->fetch();
if(isset($data['confirmation_code']) && $_GET['get_3'] == $data['confirmation_code'])
{
$dbr = Database::$entries->prepare("DELETE FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id");
$dbr->bindParam(':id', $_GET['get_2'], PDO::PARAM_INT);
$dbr->execute();
$action = 'delete_ok';
}
else $error = true;
}
if(isset($error)) $action = 'confirmation_failed';
}
if((isset($_POST['delete_checked']) || isset($_GET['get_1']) && $_GET['get_1']=='delete') && isset($_SESSION[$settings['session_prefix'].'user_id']))
{
if(isset($_POST['checked'])) $checked_emails = $_POST['checked'];
elseif(isset($_GET['get_2'])) $checked_emails[] = $_GET['get_2'];
if(isset($checked_emails) && is_array($checked_emails))
{
$dbr = Database::$entries->prepare("SELECT id, email FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id ORDER BY email ASC LIMIT 1");
$dbr->bindParam(':id', $checked, PDO::PARAM_INT);
$i=0;
#Database::$entries->beginTransaction();
foreach($checked_emails as $checked)
{
$dbr->execute();
$data = $dbr->fetch();
$emails2delete[$i]['id'] = $data['id'];
$emails2delete[$i]['email'] = htmlspecialchars($data['email']);
++$i;
}
#Database::$entries->commit();
if(isset($emails2delete))
{
$template->assign('emails2delete',$emails2delete);
$action = 'delete_checked';
}
}
}
if(isset($_POST['delete_confirm']))
{
if(isset($_POST['checked']) && is_array($_POST['checked']))
{
$dbr = Database::$entries->prepare("DELETE FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id");
$dbr->bindParam(':id', $delete_id, PDO::PARAM_INT);
Database::$entries->beginTransaction();
foreach($_POST['checked'] as $delete_id)
{
$dbr->execute();
}
Database::$entries->commit();
}
header('Location: '.BASE_URL.PAGE);
exit;
}
/*
if(isset($_POST['delete_email']) && isset($_SESSION[$settings['session_prefix'].'user_id']))
{
$dbr = Database::$entries->prepare("DELETE FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id");
$dbr->bindParam(':id', $_POST['email_id'], PDO::PARAM_INT);
$dbr->execute();
header('Location: '.BASE_URL.PAGE);
exit;
}
*/
if(isset($_POST['add_email']) && isset($_SESSION[$settings['session_prefix'].'user_id']))
{
$mail = new Mail();
$mail->set_charset(CHARSET);
if(!$mail->is_valid_email($_POST['add_email']))
#if(trim($_POST['add_email'])=='' || !preg_match("/^[^@]+@.+\.\D{2,5}$/", $_POST['add_email']))
{
$template->assign('email', htmlspecialchars($_POST['add_email']));
$errors[] = 'newsletter_error_invalid_email';
}
if(empty($errors))
{
$dbr = Database::$entries->prepare("SELECT email FROM ".Database::$db_settings['newsletter_table']." WHERE lower(email)=:email LIMIT 1");
$dbr->bindValue(':email', mb_strtolower(trim($_POST['add_email']),CHARSET), PDO::PARAM_STR);
$dbr->execute();
$data = $dbr->fetch();
if(isset($data['email']))
{
$errors[] = 'newsletter_error_email_exists';
}
}
if(empty($errors))
{
$dbr = Database::$entries->prepare("INSERT INTO ".Database::$db_settings['newsletter_table']." (newsletter_id, time, ip, email, confirmed, confirmation_code) VALUES (:newsletter_id, :time, :ip, :email, 1, '')");
$dbr->bindParam(':newsletter_id', $page_id, PDO::PARAM_INT);
$dbr->bindValue(':time', time(), PDO::PARAM_INT);
$dbr->bindParam(':ip', $_SERVER["REMOTE_ADDR"], PDO::PARAM_STR);
$dbr->bindParam(':email', $_POST['add_email'], PDO::PARAM_STR);
$dbr->execute();
header('Location: '.BASE_URL.PAGE);
exit;
}
}
if(isset($_POST['email']) && trim($_POST['email'])!='' && isset($_POST['subscribe']))
{
$mail = new Mail();
$mail->set_charset(CHARSET);
$mail->set_sender_name($settings['website_title']);
if($settings['mail_parameter']) $mail->set_mail_parameter($settings['mail_parameter']);
if($_POST['subscribe']=='subscribe')
{
if(!$mail->is_valid_email($_POST['email']))
#if(trim($_POST['email'])=='' || !preg_match("/^[^@]+@.+\.\D{2,5}$/", $_POST['email']))
{
$template->assign('email', htmlspecialchars($_POST['email']));
$errors[] = 'newsletter_error_invalid_email';
}
if(empty($errors))
{
$dbr = Database::$entries->prepare("SELECT email FROM ".Database::$db_settings['newsletter_table']." WHERE lower(email)=:email LIMIT 1");
$dbr->bindValue(':email', mb_strtolower(trim($_POST['email']),CHARSET), PDO::PARAM_STR);
$dbr->execute();
$data = $dbr->fetch();
if(isset($data['email']))
{
$template->assign('email', htmlspecialchars($_POST['email']));
$errors[] = 'newsletter_error_email_exists';
}
}
if(empty($errors))
{
$confirmation_code = md5(uniqid(rand()));
$dbr = Database::$entries->prepare("INSERT INTO ".Database::$db_settings['newsletter_table']." (newsletter_id, time, ip, email, confirmed, confirmation_code) VALUES (:newsletter_id, :time, :ip, :email, 0, :confirmation_code)");
$dbr->bindParam(':newsletter_id', $page_id, PDO::PARAM_INT);
$dbr->bindValue(':time', time(), PDO::PARAM_INT);
$dbr->bindParam(':ip', $_SERVER["REMOTE_ADDR"], PDO::PARAM_STR);
$dbr->bindParam(':email', $_POST['email'], PDO::PARAM_STR);
$dbr->bindParam(':confirmation_code', $confirmation_code, PDO::PARAM_STR);
$dbr->execute();
// get ID:
$dbr = Database::$entries->prepare("SELECT id FROM ".Database::$db_settings['newsletter_table']." WHERE email=:email LIMIT 1");
$dbr->bindParam(':email', $_POST['email'], PDO::PARAM_STR);
$dbr->execute();
$data = $dbr->fetch();
$confirm_link = BASE_URL.PAGE.',subscribe,'.$data['id'].','.$confirmation_code;
$email_text = str_replace("[link]",$confirm_link,Localization::$lang['newsletter_subscribe_text']);
if($mail->send($_POST['email'], $settings['email'], Localization::$lang['newsletter_subscribe_subj'], $email_text))
{
$action = 'confirm_mail_sent';
}
else
{
$dbr = Database::$entries->prepare("DELETE FROM ".Database::$db_settings['newsletter_table']." WHERE id=:id");
$dbr->bindParam(':id', $data['id'], PDO::PARAM_INT);
$dbr->execute();
$errors[] = 'newsletter_error_mail';
}
}
if(isset($errors)) $action = 'main';
}
elseif($_POST['subscribe']=='unsubscribe')
{
$dbr = Database::$entries->prepare("SELECT id, email FROM ".Database::$db_settings['newsletter_table']." WHERE lower(email)=:email");
$dbr->bindValue(':email', mb_strtolower(trim($_POST['email']),CHARSET), PDO::PARAM_STR);
$dbr->execute();
$data = $dbr->fetch();
if(empty($data['email']))
{
$errors[] = 'newsletter_error_email_not_exist';
}
if(empty($errors))
{
$confirmation_code = md5(uniqid(rand()));
$dbr = Database::$entries->prepare("UPDATE ".Database::$db_settings['newsletter_table']." SET confirmation_code=:confirmation_code WHERE id=:id");
$dbr->bindParam(':id', $data['id'], PDO::PARAM_INT);
$dbr->bindParam(':confirmation_code', $confirmation_code, PDO::PARAM_STR);
$dbr->execute();
$confirm_link = BASE_URL.PAGE.',unsubscribe,'.$data['id'].','.$confirmation_code;
$email_text = str_replace("[link]",$confirm_link,Localization::$lang['newsletter_unsubscribe_text']);
if($mail->send($_POST['email'], $settings['email'], Localization::$lang['newsletter_unsubscribe_subj'], $email_text))
{
$action = 'confirm_mail_sent';
}
else
{
$errors[] = 'newsletter_error_mail';
}
}
if(isset($errors)) $action = 'main';
}
}
if(isset($_SESSION[$settings['session_prefix'].'user_id'])) $action = 'admin';
if(empty($action)) $action = 'main';
switch($action)
{
case 'main':
$form['email'] = '';
#$template->assign('newsletterform', true);
$template->assign('form', $form);
break;
case 'confirm_mail_sent':
$template->assign('confirm_mail_sent', true);
break;
case 'confirmation_ok':
$template->assign('confirmation_ok', true);
break;
case 'delete_ok':
$template->assign('delete_ok', true);
break;
case 'confirmation_failed':
$template->assign('confirmation_failed', true);
break;
case 'admin':
$order = 'email ASC';
$order_qs = 'email-asc';
if(isset($_GET['get_1']))
{
switch($_GET['get_1'])
{
case 'email-asc':
$order = 'email ASC';
$order_qs = 'email-asc';
break;
case 'email-desc':
$order = 'email DESC';
$order_qs = 'email-desc';
break;
case 'time-asc':
$order = 'time ASC';
$order_qs = 'time-asc';
break;
case 'time-desc':
$order = 'time DESC';
$order_qs = 'time-desc';
break;
#default:
# $order = 'email ASC';
}
}
$dbr = Database::$entries->prepare("SELECT id, time, email FROM ".Database::$db_settings['newsletter_table']." WHERE newsletter_id=:page_id AND confirmed=1 ORDER BY ".$order);
$dbr->bindParam(':page_id', $page_id, PDO::PARAM_INT);
$dbr->execute();
$i=0;
while($data = $dbr->fetch())
{
$email_list[] = htmlspecialchars($data['email']);
$newsletter_data[$i]['id'] = $data['id'];
$newsletter_data[$i]['email'] = htmlspecialchars($data['email']);
$newsletter_data[$i]['domain'] = htmlspecialchars(mb_substr(mb_strstr($data['email'], '@'),1));
$localization->bindId('newsletter_subscribe_time_format', $data['id']);
$localization->replacePlaceholderBound('time', $data['time'], 'newsletter_subscribe_time_format', $data['id'], Localization::FORMAT_TIME);
++$i;
}
if(isset($newsletter_data))
{
sort($email_list);
$template->assign('order', $order_qs);
$template->assign('email_count', $i);
$template->assign('email_list', implode(', ',$email_list));
$template->assign('newsletter_data', $newsletter_data);
}
$template->assign('admin', true);
break;
}
if(isset($errors)) $template->assign('errors', $errors);
$template->assign('subtemplate', 'newsletter.inc.tpl');
if(isset($cache) && empty($no_cache))
{
$cache->cacheId = PAGE;
}
?>

+ 1
- 32
cms/lang/english.page.lang.php View File

@ -89,7 +89,7 @@ $lang['no_notes'] = 'No notes availble';
$lang['formmailer_label_email'] = 'E-mail:';
$lang['formmailer_label_subject'] = 'Subject:';
$lang['formmailer_label_message'] = 'Message:';
$lang['formmailer_button_send'] = 'OK - Send';
$lang['formmailer_button_send'] = 'Send message';
$lang['formmail_error_email_invalid'] = 'E-mail address invalid or empty';
$lang['formmail_error_no_message'] = 'No message entered';
$lang['formmail_error_text_too_long'] = 'The message is too long';
@ -132,37 +132,6 @@ $lang['error_news_time_invalid'] = 'invalid date/time format';
$lang['delete_news_title'] = 'Delete entry';
$lang['delete_news_confirm_submit'] = 'OK - Delete';
// Newsletter:
$lang['newsletter_subscr_email'] = 'E-mail address:';
$lang['newsletter_subscribe'] = 'subscribe';
$lang['newsletter_unsubscribe'] = 'unsubscribe';
$lang['newsletter_email'] = 'E-mail';
$lang['newsletter_subscribe_time'] = 'Subscribed';
$lang['newsletter_subscribe_time_format'] = '[time|%d.%m.%Y, %H:%M]';
$lang['newsletter_error_invalid_email'] = 'E-mail address invalid';
$lang['newsletter_error_email_exists'] = 'This e-mail address already exists';
$lang['newsletter_error_email_not_exist'] = 'The e-mail address doesn\'t exist';
$lang['newsletter_error_mail'] = 'Error while sending e-mail - please try again later';
$lang['newsletter_conf_ok'] = 'Thank you! Your e-mail address has been confirmed.';
$lang['newsletter_delete_ok'] = 'You have successfully unsubscribed from the newsletter!';
$lang['newsletter_conf_failed'] = '<b>Error:</b> Invalid confirmation link (e.g. time period expired)!';
$lang['newsletter_conf_mail_sent'] = 'An e-mail with a confirmation link has been sent to the specified e-mail address. Please confirm this link within one hour!';
$lang['newsletter_email_delete'] = 'delete';
$lang['newsletter_no_emails'] = 'No e-mail addresses available.';
$lang['newsletter_add_email'] = 'Add e-mail address:';
$lang['newsletter_email_list'] = 'E-mail list';
$lang['newsletter_edit_emails'] = 'Edit e-mail addresses';
$lang['newsletter_email_count'] = '[number] e-mail addresses';
$lang['newsletter_subscribe_subj'] = 'Subscribe to newsletter';
$lang['newsletter_subscribe_text'] = "Your e-mail address has been added to our mailing list. Please click the link below to confirm your request. If this e-mail has been sent in error (either by you or someone else) please ignore this e-mail.\n\nLink to confirm the subscription:\n[link]";
$lang['newsletter_unsubscribe_subj'] = 'Unsubscribe to newsletter';
$lang['newsletter_unsubscribe_text'] = "Please click the following link to unsubscribe to the newsletter:\n[link]";
$lang['newsletter_checkall'] = 'check all';
$lang['newsletter_uncheckall'] = 'uncheck all';
$lang['newsletter_delete_checked'] = 'Delete checked';
$lang['newsletter_delete_confirm'] = 'Delete e-mail(s)?';
$lang['newsletter_delete_confirm_submit'] = 'OK - Delete';
// Search:
$lang['search_submit'] = 'Search';
$lang['search_number_of_results'][0] = 'No pages found';


+ 1
- 1
cms/templates/admin/subtemplates/admin_menu.inc.tpl View File

@ -43,6 +43,6 @@
<li><a href="<?php echo BASE_URL; ?>cms/index.php?mode=logout"><span class="glyphicon glyphicon-off"></span> <?php echo $lang['admin_menu_logout']; ?></a></li>
</ul>
<?php endif; ?>
</div><!--/.nav-collapse -->
</div>
</div>
</div>

+ 23
- 14
cms/templates/admin/subtemplates/comments.inc.tpl View File

@ -59,17 +59,20 @@
<td><?php if(isset($comment['email_hp'])): ?><a href="<?php echo $comment['email_hp']; ?>"><?php echo $comment['name']; ?></a><?php else: ?><?php echo $comment['name']; ?><?php endif; ?></td>
<td><?php if($comment['comment']=='' && $type==0): ?><em><?php echo $lang['pingback']; ?></em><?php else: echo $comment['comment']; endif; ?></td>
<td><?php echo $comment['ip']; ?></td>
<td class="nowrap"><a class="btn btn-primary btn-xs" href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;edit=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>" title="<?php echo $lang['edit']; ?>"><span class="glyphicon glyphicon-pencil"></span></a>
<a class="btn btn-danger btn-xs" href="index.php?mode=comments&type=<?php echo $type; ?>&amp;delete=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>" title="<?php echo $lang['delete']; ?>" data-delete-confirm="<?php echo rawurlencode($lang['delete_this_comment_confirm']); ?>"><span class="glyphicon glyphicon-remove"></span></a></td>
<td class="options"><a class="btn btn-primary btn-xs" href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;edit=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>" title="<?php echo $lang['edit']; ?>"><span class="glyphicon glyphicon-pencil"></span></a>
<a class="btn btn-danger btn-xs" href="index.php?mode=comments&type=<?php echo $type; ?>&amp;delete=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>" title="<?php echo $lang['delete']; ?>" data-delete-confirm="<?php echo rawurlencode($lang['delete_this_comment_confirm']); ?>"><span class="glyphicon glyphicon-remove"></span></a>
<?php if($settings['akismet_key']!='' && $settings['akismet_entry_check']==1): ?>
<td class="<?php if($i%2==0): ?>a<?php else: ?>b<?php endif; ?>"><a href="index.php?mode=comments&type=<?php echo $type; ?>&amp;report_spam=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>"><img src="<?php echo BASE_URL; ?>templates/admin/images/exclamation.png" alt="<?php echo $lang['report_as_spam']; ?>" title="<?php echo $lang['report_as_spam']; ?>" width="16" height="16" /></a></td>
<?php endif ?>
<a class="btn btn-danger btn-xs" href="index.php?mode=comments&type=<?php echo $type; ?>&amp;report_spam=<?php echo $comment['id']; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $page; ?>" title="<?php echo $lang['report_as_spam']; ?>"><span class="glyphicon glyphicon-warning-sign"></span></a>
<?php endif ?></td>
</tr>
<?php $i++; endforeach; ?>
</tbody>
</table>
</div>
<div class="row">
<div class="col-md-8">
<button type="button" class="btn btn-default" data-toggle-checkboxes="commentcheckbox"><?php echo $lang['toggle_selection']; ?></button>
<input class="btn btn-danger" type="submit" name="delete_checked" value="<?php echo $lang['comments_del_checked']; ?>" />
<?php if($comment_id==0): ?>
@ -86,20 +89,26 @@
<?php endif; ?>
<input type="hidden" name="type" value="<?php echo $type; ?>" />
<input type="hidden" name="page" value="<?php echo $page; ?>" />
</div>
<div class="col-md-4">
<?php if($pagination): ?>
<ul class="pagination pull-right nomargin">
<?php if($pagination['previous']): ?><li><a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $pagination['previous']; ?>"><span class="glyphicon glyphicon-chevron-left"></span></a></li><?php endif; ?>
<?php foreach($pagination['items'] as $item): ?>
<?php if(empty($item)): ?><li><span>&hellip;</span></li><?php elseif($item==$pagination['current']): ?><li class="active"><span><?php echo $item; ?></span></li><?php else: ?><li><a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $item; ?>"><?php echo $item; ?></a></li><?php endif; ?>
<?php endforeach; ?>
<?php if($pagination['next']): ?><li><a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $pagination['next']; ?>"><span class="glyphicon glyphicon-chevron-right"></span></a></li><?php endif; ?>
</ul>
<?php endif; ?>
</div>
</div>
</div>
</form>
<div id="pagination">
<?php if($pagination): ?>
<?php if($pagination['previous']): ?> <a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $pagination['previous']; ?>">&laquo;</a> <?php endif; ?>
<?php foreach($pagination['items'] as $item): ?>
<?php if(empty($item)): ?> ..<?php elseif($item==$pagination['current']): ?> <span class="current"><?php echo $item; ?></span><?php else: ?> <a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $item; ?>"><?php echo $item; ?></a><?php endif; ?>
<?php endforeach; ?>
<?php if($pagination['next']): ?> <a href="index.php?mode=comments&amp;type=<?php echo $type; ?>&amp;comment_id=<?php echo $comment_id; ?>&amp;page=<?php echo $pagination['next']; ?>">&raquo;</a><?php endif; ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="alert alert-warning">


+ 20
- 20
cms/templates/admin/subtemplates/settings.inc.tpl View File

@ -12,43 +12,43 @@
<input type="hidden" name="settings_submitted" />
<div class="form-group">
<label for="website_title" class="col-lg-2 control-label"><?php echo $lang['settings_website_title']; ?></label>
<div class="col-lg-6">
<label for="website_title" class="col-md-2 control-label"><?php echo $lang['settings_website_title']; ?></label>
<div class="col-md-6">
<input type="text" class="form-control" id="website_title" name="website_title" value="<?php echo htmlspecialchars($settings['website_title']); ?>" size="35">
</div>
</div>
<div class="form-group">
<label for="website_subtitle" class="col-lg-2 control-label"><?php echo $lang['settings_website_subtitle']; ?></label>
<div class="col-lg-6">
<label for="website_subtitle" class="col-md-2 control-label"><?php echo $lang['settings_website_subtitle']; ?></label>
<div class="col-md-6">
<input type="text" class="form-control" id="website_subtitle" name="website_subtitle" value="<?php echo htmlspecialchars($settings['website_subtitle']); ?>" size="35">
</div>
</div>
<div class="form-group">
<label for="website_footnote_1" class="col-lg-2 control-label"><?php echo $lang['settings_website_footnote_1']; ?></label>
<div class="col-lg-6">
<label for="website_footnote_1" class="col-md-2 control-label"><?php echo $lang['settings_website_footnote_1']; ?></label>
<div class="col-md-6">
<input type="text" class="form-control" id="website_footnote_1" name="website_footnote_1" value="<?php echo htmlspecialchars($settings['website_footnote_1']); ?>" size="35">
</div>
</div>
<div class="form-group">
<label for="website_footnote_2" class="col-lg-2 control-label"><?php echo $lang['settings_website_footnote_2']; ?></label>
<div class="col-lg-6">
<label for="website_footnote_2" class="col-md-2 control-label"><?php echo $lang['settings_website_footnote_2']; ?></label>
<div class="col-md-6">
<input type="text" class="form-control" id="website_footnote_2" name="website_footnote_2" value="<?php echo htmlspecialchars($settings['website_footnote_2']); ?>" size="35">
</div>
</div>
<div class="form-group">
<label for="email" class="col-lg-2 control-label"><?php echo $lang['settings_email']; ?></label>
<div class="col-lg-6">
<label for="email" class="col-md-2 control-label"><?php echo $lang['settings_email']; ?></label>
<div class="col-md-6">
<input type="text" class="form-control" id="email" name="email" value="<?php echo htmlspecialchars($settings['email']); ?>" size="35">
</div>
</div>
<div class="form-group">
<label for="index_page" class="col-lg-2 control-label"><?php echo $lang['settings_index_page']; ?></label>
<div class="col-lg-6">
<label for="index_page" class="col-md-2 control-label"><?php echo $lang['settings_index_page']; ?></label>
<div class="col-md-6">
<select id="index_page" name="index_page" size="1" class="form-control">
<?php foreach($pages as $current_page): ?>
<option value="<?php echo $current_page['page']; ?>"<?php if($settings['index_page']==$current_page['page']): ?> selected="selected"<?php endif; ?>><?php echo $current_page['page']; ?></option>
@ -58,8 +58,8 @@
</div>
<div class="form-group">
<label for="error_page" class="col-lg-2 control-label"><?php echo $lang['settings_error_page']; ?></label>
<div class="col-lg-6">
<label for="error_page" class="col-md-2 control-label"><?php echo $lang['settings_error_page']; ?></label>
<div class="col-md-6">
<select id="error_page" name="error_page" size="1" class="form-control">
<?php foreach($pages as $current_page): ?>
<option value="<?php echo $current_page['page']; ?>"<?php if($settings['error_page']==$current_page['page']): ?> selected="selected"<?php endif; ?>><?php echo $current_page['page']; ?></option>
@ -68,8 +68,8 @@
</div>
<div class="form-group">
<label for="admin_language" class="col-lg-2 control-label"><?php echo $lang['admin_language']; ?></label>
<div class="col-lg-6">
<label for="admin_language" class="col-md-2 control-label"><?php echo $lang['admin_language']; ?></label>
<div class="col-md-6">
<select id="admin_language" name="admin_language" size="1" class="form-control">
<?php foreach($admin_languages as $admin_language): ?>
<option value="<?php echo $admin_language['identifier']; ?>"<?php if($settings['admin_language']==$admin_language['identifier']): ?> selected<?php endif ?>><?php echo $admin_language['name']; ?></option>
@ -79,8 +79,8 @@
</div>
<div class="form-group">
<label for="default_page_language" class="col-lg-2 control-label"><?php echo $lang['default_page_language']; ?></label>
<div class="col-lg-6">
<label for="default_page_language" class="col-md-2 control-label"><?php echo $lang['default_page_language']; ?></label>
<div class="col-md-6">
<select id="default_page_language" name="default_page_language" size="1" class="form-control">
<?php foreach($page_languages as $page_language): ?>
<option value="<?php echo $page_language['identifier']; ?>"<?php if($settings['default_page_language']==$page_language['identifier']): ?> selected<?php endif ?>><?php echo $page_language['name']; ?></option>
@ -90,7 +90,7 @@
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-6">
<div class="col-md-offset-2 col-md-6">
<div class="checkbox">
<?php if(isset($wysiwyg_editor_available)): ?>
<label for="wysiwyg_editor">
@ -117,7 +117,7 @@
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-6">
<div class="col-md-offset-2 col-md-6">
<button type="submit" class="btn btn-primary btn-strong" /><?php echo $lang['submit_button_ok']; ?></button>
<a class="btn btn-default" href="index.php?mode=settings&amp;action=advanced_settings"><?php echo $lang['advanced_settings']; ?></a>
</div>


+ 1
- 1
cms/templates/subtemplates/comments.inc.tpl View File

@ -1,5 +1,5 @@
<div id="comments" class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title"><?php echo $lang['comment_headline']; ?></h3></div>
<div class="panel-heading"><h3 class="panel-title"><?php echo $lang['comment_headline']; ?> (<?php echo $total_comments; ?>)</h3></div>
<div class="panel-body">
<?php if(isset($edit_data)): ?>


+ 26
- 13
cms/templates/subtemplates/formmailer.inc.tpl View File

@ -1,28 +1,41 @@
<?php if(isset($mail_sent)): ?>
<p class="ok"><?php echo $lang['formmailer_mail_sent']; ?></p>
<div class="alert alert-success"><span class="glyphicon glyphicon-ok"></span> <?php echo $lang['formmailer_mail_sent']; ?></div>
<?php else: ?>
<?php if(isset($errors)): ?>
<p id="errors" class="caution"><?php echo $lang['error_headline']; ?></p>
<div class="alert alert-danger">
<h3><span class="glyphicon glyphicon-warning-sign"></span> <?php echo $lang['error_headline']; ?></h3>
<ul>
<?php foreach($errors as $error): ?>
<li><?php if(isset($lang[$error])) echo $lang[$error]; else echo $error; ?></li>
<?php endforeach; ?>
<?php foreach($errors as $error): ?>
<li><?php if(isset($lang[$error])) echo $lang[$error]; else echo $error; ?></li>
<?php endforeach; ?>
</ul>
<script type="text/javascript">/* <![CDATA[ */ location.hash='errors'; /* ]]> */</script>
</div>
<?php endif; ?>
<form method="post" action="<?php echo BASE_URL.PAGE; ?>" accept-charset="<?php echo CHARSET; ?>">
<input type="hidden" name="send" value="true">
<div>
<p><label for="email"><?php echo $lang['formmailer_label_email']; ?></label><br />
<input id="email" type="text" name="email" value="<?php if(isset($email)) echo $email; ?>" size="35" /></p>
<p><label for="subject"><?php echo $lang['formmailer_label_subject']; ?></label><br />
<input id="subject" type="text" name="subject" value="<?php if(isset($subject)) echo $subject; ?>" size="35" /></p>
<p><label for="message"><?php echo $lang['formmailer_label_message']; ?></label><br />
<textarea id="message" name="message" cols="55" rows="12"><?php if(isset($message)) echo $message; ?></textarea></p>
<p><input type="submit" name="send" value="<?php echo $lang['formmailer_button_send']; ?>" /></p>
<div class="form-group">
<label for="email"><?php echo $lang['formmailer_label_email']; ?></label>
<input id="email" class="form-control" type="email" name="email">
</div>
<div class="form-group">
<label for="subject"><?php echo $lang['formmailer_label_subject']; ?></label>
<input id="subject" class="form-control" type="text" name="subject">
</div>
<div class="form-group">
<label for="message"><?php echo $lang['formmailer_label_message']; ?></label>
<textarea id="message" class="form-control" name="message" rows="12"><?php if(isset($message)) echo $message; ?></textarea>
</div>
<p><button class="btn btn-success btn-lg" type="submit"><span class="glyphicon glyphicon-envelope"></span> <?php echo $lang['formmailer_button_send']; ?></button></p>
</div>
</form>


+ 0
- 29
cms/templates/subtemplates/formmailer.tpl.inc View File

@ -1,29 +0,0 @@
<?php if(isset($mail_sent)): ?>
<p class="ok"><?php echo $lang['formmailer_mail_sent']; ?></p>
<?php else: ?>
<?php if(isset($errors)): ?>
<p id="errors" class="caution"><?php echo $lang['error_headline']; ?></p>
<ul>
<?php foreach($errors as $error): ?>
<li><?php if(isset($lang[$error])) echo $lang[$error]; else echo $error; ?></li>
<?php endforeach; ?>
</ul>
<script type="text/javascript">/* <![CDATA[ */ location.hash='errors'; /* ]]> */</script>
<?php endif; ?>
<form method="post" action="<?php echo BASE_URL.PAGE; ?>" accept-charset="<?php echo CHARSET; ?>">
<div>
<p><label for="email"><?php echo $lang['formmailer_label_email']; ?></label><br />
<input id="email" type="text" name="email" value="<?php if(isset($email)) echo $email; ?>" size="35" /></p>
<p><label for="subject"><?php echo $lang['formmailer_label_subject']; ?></label><br />
<input id="subject" type="text" name="subject" value="<?php if(isset($subject)) echo $subject; ?>" size="35" /></p>
<p><label for="message"><?php echo $lang['formmailer_label_message']; ?></label><br />
<textarea id="message" name="message" cols="55" rows="12"><?php if(isset($message)) echo $message; ?></textarea></p>
<p><input type="submit" name="send" value="<?php echo $lang['formmailer_button_send']; ?>" /></p>
</div>
</form>
<?php endif; ?>

+ 0
- 99
cms/templates/subtemplates/newsletter.inc.tpl View File

@ -1,99 +0,0 @@
<?php if(isset($errors)): ?>
<p id="errors" class="caution"><?php echo $lang['error_headline']; ?></p>
<ul>
<?php foreach($errors as $error): ?>
<li><?php if(isset($lang[$error])) echo $lang[$error]; else echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if($admin): ?>
<?php if(isset($emails2delete)): ?>
<p class="caution"><?php echo $lang['newsletter_delete_confirm']; ?></p>
<ul>
<?php foreach($emails2delete as $email2delete): ?>
<li><?php echo $email2delete['email']; ?></li>
<?php endforeach; ?>
</ul>
<form action="<?php echo BASE_URL.PAGE; ?>" method="post">
<div>
<?php foreach($emails2delete as $email2delete): ?>
<input type="hidden" name="checked[]" value="<?php echo $email2delete['id']; ?>" />
<?php endforeach; ?>
<input type="submit" name="delete_confirm" value="<?php echo $lang['newsletter_delete_confirm_submit']; ?>" />
</div>
</form>
<?php else: ?>
<?php if(isset($newsletter_data)): ?>
<h2><?php echo $lang['newsletter_email_list']; ?></h2>
<p><textarea onfocus="this.select()" readonly="readonly" cols="70" rows="7" style="width:100%;" /><?php echo $email_list; ?></textarea><br />
<span class="small"><?php echo str_replace('[number]', $email_count, $lang['newsletter_email_count']); ?></span></p>
<h2><?php echo $lang['newsletter_edit_emails']; ?></h2>
<form id="emailform" action="<?php echo BASE_URL.PAGE; ?>" method="post">
<table class="normaltab" cellspacing="1" cellpadding="5" border="0">
<tr>
<th>&nbsp;</th>
<th><a href="<?php echo BASE_URL.PAGE; ?>,<?php if($order=='email-asc'): ?>email-desc<?php else: ?>email-asc<?php endif; ?>"><?php echo $lang['newsletter_email']; ?></a></th>
<th><a href="<?php echo BASE_URL.PAGE; ?>,<?php if($order=='time-asc'): ?>time-desc<?php else: ?>time-asc<?php endif; ?>"><?php echo $lang['newsletter_subscribe_time']; ?></a></th>
<th>&nbsp;</th>
</tr>
<?php $i=0; foreach($newsletter_data as $item): ?>
<tr class="<?php if($i % 2 == 0) echo "odd"; else echo "even"; ?>">
<td><input type="checkbox" name="checked[]" value="<?php echo $item['id']; ?>" /></td>
<td><a href="mailto:<?php echo $item['email']; ?>"><?php echo $item['email']; ?></a> <small>(<a href="http://<?php echo $item['domain']; ?>"><?php echo $item['domain']; ?></a>)</small></td>
<td><?php echo $lang['newsletter_subscribe_time_format'][$item['id']]; ?></a></td>
<td><a href="<?php echo BASE_URL.PAGE; ?>,delete,<?php echo $item['id']; ?>"><img src="<?php echo BASE_URL; ?>templates/images/delete.png" alt="<?php echo $lang['delete']; ?>" title="<?php echo $lang['delete']; ?>" width="16" height="16" /></a>
<!--
<td><form action="<?php echo BASE_URL.PAGE; ?>" method="post"><input type="hidden" name="email_id" value="<?php echo $item['id']; ?>" /><input type="submit" name="delete_email" value="<?php echo $lang['newsletter_email_delete']; ?>"></form>
</td>-->
</tr>
<?php ++$i; endforeach; ?>
<tr class="<?php if($i % 2 == 0) echo "odd"; else echo "even"; ?>">
<td colspan="2"><small><img style="margin-left:7px;" src="<?php echo BASE_URL; ?>templates/images/checkall.png" alt="" width="24" height="20" /> <a href="#" onclick="checkall('emailform', true); return false;"><?php echo $lang['newsletter_checkall']; ?></a> / <a href="#" onclick="checkall('emailform', false); return false;"><?php echo $lang['newsletter_uncheckall']; ?></a></small></td>
<td colspan="2" style="text-align:right;"><input type="submit" name="delete_checked" value="<?php echo $lang['newsletter_delete_checked']; ?>" /></td>
</tr>
</table>
</form>
<?php else: ?>
<p><em><?php echo $lang['newsletter_no_emails']; ?></em></p>
<?php endif; ?>
<form action="<?php echo BASE_URL.PAGE; ?>" method="post">
<div style="margin-top:20px;">
<p><label for="add_email"><?php echo $lang['newsletter_add_email']; ?></label><br /><input id="add_email" type="text" name="add_email" value="" size="35" /> <input type="submit" name="" value="<?php echo $lang['submit_button_ok']; ?>" /></p>
</div>
</form>
<?php endif; ?>
<?php else: ?>
<?php if(isset($confirm_mail_sent)): ?>
<p><?php echo $lang['newsletter_conf_mail_sent']; ?></p>
<?php elseif(isset($confirmation_ok)): ?>
<p><?php echo $lang['newsletter_conf_ok']; ?></p>
<?php elseif(isset($delete_ok)): ?>
<p><?php echo $lang['newsletter_delete_ok']; ?></p>
<?php elseif(isset($confirmation_failed)): ?>
<p><?php echo $lang['newsletter_conf_failed']; ?></p>
<?php else: ?>
<form action="<?php echo BASE_URL.PAGE; ?>" method="post">
<p><label for="email"><?php echo $lang['newsletter_subscr_email']; ?></label><br />
<input id="email" type="text" name="email" value="<?php if(isset($email)) echo $email; ?>" size="25" maxlength="200" /> <input type="submit" name="" value="<?php echo $lang['submit_button_ok']; ?>" /></p>
<p class="small"><input id="subscribe" type="radio" name="subscribe" value="subscribe" checked="checked" /><label for="subscribe"><?php echo $lang['newsletter_subscribe']; ?></label><br />
<input id="unsubscribe" type="radio" name="subscribe" value="unsubscribe" /><label for="unsubscribe"><?php echo $lang['newsletter_unsubscribe']; ?></label></p>
</form>
<?php endif; ?>
<?php endif; ?>

+ 1
- 2
static/css/style.css View File

@ -28,8 +28,7 @@ a.thumbnail:hover { opacity:0.9; }
.news-teaser { margin-bottom:30px; }
.news-teaser:first-child { padding-top:20px; }
.news-teaser h2 { color:#016d2f; font-size:26px; margin:0; padding:0; }
.news-teaser h2 a { color:#016d2f; }
.news-teaser h2 { font-size:26px; margin:0; padding:0; }
.news-teaser p { margin:0; padding:0; }
.news-teaser .time { color:#808080; font-size:13px; margin:0 0 7px 0; padding:0; }


+ 1
- 0
static/css/style_admin.css View File

@ -23,6 +23,7 @@ body { padding-top:70px; padding-bottom:50px; }
textarea.html { font-family:monospace; }
.nowrap { white-space:nowrap; }
.nomargin { margin:0; }
.table th a { color:#000; text-decoration:none; white-space:nowrap; }
.table th a .glyphicon { font-size:11px; padding-left:3px; }


Loading…
Cancel
Save