added rc script

This commit is contained in:
SJ
2012-02-14 20:16:05 +01:00
parent cfb7b80120
commit bc60990c22
17 changed files with 154 additions and 27 deletions

View File

@ -1,3 +1,4 @@
RewriteEngine On
RewriteRule ^search.php /index.php?route=search/search&type=simple [L]
RewriteRule ^advanced.php /index.php?route=search/search&type=advanced [L]
@ -6,4 +7,6 @@ RewriteRule ^search-helper.php /index.php?route=search/helper [L]
RewriteRule ^audit-helper.php /index.php?route=audit/helper [L]
RewriteRule ^message.php /index.php?route=message/view [L]
RewriteRule ^settings.php /index.php?route=user/settings [L]
RewriteRule ^login.php /index.php?route=login/login [L]
RewriteRule ^logout.php /index.php?route=login/logout [L]

View File

@ -29,13 +29,13 @@ class ControllerLoginLogin extends Controller {
LOGGER('logged in');
/*if(isset($_POST['relocation']) && $_POST['relocation']) {
header("Location: " . SITE_URL . "index.php?" . $_POST['relocation']);
if(isset($_POST['relocation']) && $_POST['relocation']) {
header("Location: " . SITE_URL . $_POST['relocation']);
} else {
header("Location: " . SITE_URL . "search.php");
}*/
}
header("Location: " . SITE_URL . "search.php");
//header("Location: " . SITE_URL . "search.php");
exit;
}

View File

@ -14,17 +14,21 @@ class ControllerSearchSearch extends Controller {
$this->load->model('search/search');
$this->document->title = $this->data['text_simple_search'];
$this->data['searchtype'] = 'simple';
if(isset($this->request->get['type'])) {
if($this->request->get['type'] == 'advanced') {
$this->template = "search/advanced.tpl";
$this->data['searchtype'] = 'advanced';
$this->document->title = $this->data['text_advanced_search'];
}
if($this->request->get['type'] == 'expert') {
$this->template = "search/expert.tpl";
$this->data['searchtype'] = 'expert';
$this->document->title = $this->data['text_expert_search'];
}
}

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Add new user";
$_['text_add_policy'] = "Add new policy";
$_['text_administration'] = "Administration";
$_['text_admin_user'] = "Admin user";
$_['text_advanced'] = "Advanced";
$_['text_advanced_search'] = "Advanced search";
$_['text_all'] = "all";
$_['text_any'] = "any";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "Existing policies";
$_['text_existing_rules'] = "Existing rules";
$_['text_existing_user'] = "Existing user";
$_['text_existing_users'] = "Existing users";
$_['text_expert'] = "Expert";
$_['text_expert_search'] = "Expert search";
$_['text_failed'] = "failed";
$_['text_failed_to_add'] = "Failed to add";
@ -231,6 +234,8 @@ $_['text_server_name'] = "Server name";
$_['text_server_operating_system'] = "Operating System";
$_['text_set'] = "Set";
$_['text_settings'] = "Settings";
$_['text_simple'] = "Simple";
$_['text_simple_search'] = "Simple search";
$_['text_size'] = "Size";
$_['text_smtp_status'] = "SMTP status";
$_['text_statistics'] = "Statistics";

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "
$_['text_add_policy'] = "<EFBFBD>j h<>zirend";
$_['text_administration'] = "Adminisztr<EFBFBD>ci<EFBFBD>";
$_['text_admin_user'] = "Admin felhaszn<7A>l<EFBFBD>";
$_['text_advanced'] = "<EFBFBD>sszetett";
$_['text_advanced_search'] = "<EFBFBD>sszetett keres<65>s";
$_['text_all'] = "<EFBFBD>sszes";
$_['text_any'] = "mindegy";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "L
$_['text_existing_rules'] = "L<EFBFBD>tez<EFBFBD> szab<61>lyok";
$_['text_existing_user'] = "L<EFBFBD>tez<EFBFBD> felhaszn<7A>l<EFBFBD>";
$_['text_existing_users'] = "L<EFBFBD>tez<EFBFBD> felhaszn<7A>l<EFBFBD>k";
$_['text_expert'] = "Halad<EFBFBD>";
$_['text_expert_search'] = "Halad<EFBFBD> keres<65>s";
$_['text_failed'] = "sikertelen";
$_['text_failed_to_add'] = "Hiba a hozz<7A>ad<61>s sor<6F>n";
@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver n
$_['text_server_operating_system'] = "Oper<EFBFBD>ci<EFBFBD>s rendszer";
$_['text_set'] = "Be<EFBFBD>ll<EFBFBD>t";
$_['text_settings'] = "Be<EFBFBD>ll<EFBFBD>t<EFBFBD>sok";
$_['text_simple'] = "Egyszer<EFBFBD>";
$_['text_simple_search'] = "Egyszer<EFBFBD> keres<65>s";
$_['text_size'] = "M<EFBFBD>ret";
$_['text_smtp_status'] = "SMTP st<73>tusz";
$_['text_statistics'] = "Statisztika";

View File

@ -12,6 +12,7 @@ $_['text_add_new_user_alias'] = "Új felhasználó";
$_['text_add_policy'] = "Új házirend";
$_['text_administration'] = "Adminisztráció";
$_['text_admin_user'] = "Admin felhasználó";
$_['text_advanced'] = "Összetett";
$_['text_advanced_search'] = "Összetett keresés";
$_['text_all'] = "összes";
$_['text_any'] = "mindegy";
@ -82,6 +83,8 @@ $_['text_existing_policies'] = "Létező házirendek";
$_['text_existing_rules'] = "Létező szabályok";
$_['text_existing_user'] = "Létező felhasználó";
$_['text_existing_users'] = "Létező felhasználók";
$_['text_expert'] = "Haladó";
$_['text_expert_search'] = "Haladó keresés";
$_['text_failed'] = "sikertelen";
$_['text_failed_to_add'] = "Hiba a hozzáadás során";
@ -232,6 +235,8 @@ $_['text_server_name'] = "Szerver név";
$_['text_server_operating_system'] = "Operációs rendszer";
$_['text_set'] = "Beállít";
$_['text_settings'] = "Beállítások";
$_['text_simple'] = "Egyszerű";
$_['text_simple_search'] = "Egyszerű keresés";
$_['text_size'] = "Méret";
$_['text_smtp_status'] = "SMTP státusz";
$_['text_statistics'] = "Statisztika";

View File

@ -132,7 +132,7 @@
input[type=button].secondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 24%;}
input[type=button].advsecondary { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 15%;}
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 16%;}
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 17%;}
input[type=button].short { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 50px;}
input[type=checkbox].attachmenttype { margin: 0; vertical-align: middle; }
@ -152,14 +152,18 @@
* dropdown menu
*/
.mcell { display: table-cell; font: normal 12px Arial, sans-serif; vertical-align: top; }
ul.dropdown { position: relative; }
ul.dropdown li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding-right: 40px; padding-left: 40px; border: 0px solid red; }
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; }
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding-right: 0; margin-left: 10px; }
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; padding-right: 5px; }
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding: 0; }
ul.dropdown li.admin { font-weight: bold; float: left; background: #ffffff; padding-right: 5px; padding-left: 2px; }
ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 80px; padding-left: 0px; padding-right: 5px; }
ul.dropdown li.first_li_admin { background: #ffffff; text-align: left; margin-left: 90px; padding-left: 0px; padding-right: 5px; }
ul.dropdown li.last_li_admin { background: #ffffff; text-align: right; padding: 0; }
ul.dropdown li.logout { font-weight: bold; float: right; background: #ffffff; width: 100px; text-align: right; }
@ -169,6 +173,7 @@
ul.dropdown li a { padding: 0; color: #222; border-bottom: none; }
ul.dropdown li.hover,
ul.dropdown li:hover { background: #F3D673; color: black; position: relative; }
ul.dropdown li.no_search_li:hover { background: #ffffff; color: black; position: relative; }
ul.dropdown li.hover a { color: black; }
ul.dropdown ul { width: 150px; text-align: left; visibility: hidden; position: absolute; top: 100%; left: 0; }

View File

@ -31,7 +31,7 @@
<div class="rightcell">
<div class="logout22">
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="index.php?route=login/logout"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="logout.php"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
</div>
</div>

View File

@ -3,16 +3,30 @@
<div class="row">
<div class="leftcell">
<ul class="dropdown">
<li class="first_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_search; ?></a></li>
<li class="center_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
<li class="last_li"><a href="settings.php"<?php if(strstr($_SERVER['REQUEST_URI'], "settings.php")){ ?> id="active"<?php } ?>><?php print $text_settings; ?></a></li>
</ul>
<div id="ss1">
<div class="row">
<div class="mcell" style="width: 80px;">
</div>
<div class="mcell" style="width: 315px;">
<ul class="dropdown">
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a></li>
<li class="search_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
</ul>
</div>
<div class="mcell" style="width: 95px;">
<ul class="dropdown">
<li class="last_li" style="text-align: right; float: right;"><a href="settings.php"<?php if(strstr($_SERVER['REQUEST_URI'], "settings.php")){ ?> id="active"<?php } ?>><?php print $text_settings; ?></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="rightcell">
<div class="logout22">
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="index.php?route=login/logout"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
<?php if(isset($_SESSION['realname'])) { print $text_realname; ?>: <?php print $_SESSION['realname']; ?>, <?php } ?> <a class="logout" href="logout.php"<?php if(strstr($_SERVER['QUERY_STRING'], "login/logout")){ ?> id="active"<?php } ?>><?php print $text_logout; ?></a>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php if(!isset($_SESSION['username'])){ ?>
<form name="login" action="index.php?route=login/login" method="post">
<input type="hidden" name="relocation" value="<?php if(isset($_GET['route']) && !preg_match("/^login/", $_GET['route']) ) { print $_SERVER['QUERY_STRING']; } ?>" />
<form name="login" action="login.php" method="post">
<input type="hidden" name="relocation" value="<?php if(isset($_GET['route']) && !preg_match("/^login/", $_GET['route']) ) { if(isset($_SERVER['REDIRECT_URL'])) { print $_SERVER['REDIRECT_URL']; } else { print $_SERVER['QUERY_STRING']; } } ?>" />
<div id="search">

View File

@ -1,5 +1,5 @@
<p>
<?php print $text_logged_out; ?>. <a href="index.php?route=login/login" class="messagelink"><?php print $text_back; ?></a>
<?php print $text_logged_out; ?>. <a href="login.php" class="messagelink"><?php print $text_back; ?></a>
</p>

View File

@ -101,7 +101,7 @@
</div>
<div id="search2">
<div id="A1"></div>
<div id="A1"><a href="expert.php"><?php print $text_expert_search; ?></a></div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<div id="search">
<div id="search1">
<div id="ss1" style="border: 0px solid red;">
<div id="ss1">
<input type="hidden" name="searchtype" id="searchtype" value="expert" />
@ -13,9 +13,9 @@
</div>
<div id="ss1" style="border: 0px solid blue;">
<div id="ss1">
<div class="row">
<div class="cell1s"><?php print $text_search_terms; ?>: </div>
<div class="cell1s" style="width: 75px;"><?php print $text_search; ?>: </div>
<div class="cell2"><input type="text" id="_search" name="_search" class="advtext" style="width: 100%;" value="<?php if(isset($_search)) { print $_search; } ?>" /></div>
</div>
</div>