Do not use global $page variable in form_value func

This commit is contained in:
Dmitriy Simushev 2014-01-16 15:22:13 +00:00
parent 9c0348cce3
commit d9530d1590
22 changed files with 95 additions and 89 deletions

View File

@ -15,11 +15,17 @@
* limitations under the License.
*/
function form_value($key)
{
global $page;
if (isset($page) && isset($page["form$key"]))
return htmlspecialchars($page["form$key"]);
/**
* Returns properly prepared value of a form variable.
*
* @param array $page The page array. All form variables are prefixed with
* "form" string.
* @param string $name Form variable name.
* @return string Value of a form variable.
*/
function form_value($page, $name) {
if (!empty($page) && isset($page["form$name"]))
return htmlspecialchars($page["form$name"]);
return "";
}

View File

@ -83,7 +83,7 @@ function expand_var($matches)
}
return $message;
} else if ($prefix == 'form:') {
return form_value($var);
return form_value($page, $var);
} else if ($prefix == 'page:' || $prefix == 'pagejs:') {
$message = isset($flatten_page[$var]) ? $flatten_page[$var] : "";
return ($prefix == 'pagejs:') ? json_encode($message) : $message;

View File

@ -53,7 +53,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="login" class="flabel"><?php echo getlocal('form.field.login') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="login" type="text" name="login" size="40" value="<?php echo form_value('login') ?>" class="formauth"<?php echo $page['canchangelogin'] ? "" : " disabled=\"disabled\"" ?>/>
<input id="login" type="text" name="login" size="40" value="<?php echo form_value($page, 'login') ?>" class="formauth"<?php echo $page['canchangelogin'] ? "" : " disabled=\"disabled\"" ?>/>
</div>
<label for="login" class="fdescr"> &mdash; <?php echo getlocal('form.field.login.description') ?></label>
<br clear="all"/>
@ -62,7 +62,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="email" class="flabel"><?php echo getlocal('form.field.mail') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="email" type="text" name="email" size="40" value="<?php echo form_value('email') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
<input id="email" type="text" name="email" size="40" value="<?php echo form_value($page, 'email') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
</div>
<label for="email" class="fdescr"> &mdash; <?php echo getlocal('form.field.mail.description') ?></label>
<br clear="all"/>
@ -89,7 +89,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="name" class="flabel"><?php echo getlocal('form.field.agent_name') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="name" type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
<input id="name" type="text" name="name" size="40" value="<?php echo form_value($page, 'name') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
</div>
<label for="name" class="fdescr"> &mdash; <?php echo getlocal('form.field.agent_name.description') ?></label>
<br clear="all"/>
@ -98,7 +98,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="commonname" class="flabel"><?php echo getlocal('form.field.agent_commonname') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="commonname" type="text" name="commonname" size="40" value="<?php echo form_value('commonname') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
<input id="commonname" type="text" name="commonname" size="40" value="<?php echo form_value($page, 'commonname') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
</div>
<label for="commonname" class="fdescr"> &mdash; <?php echo getlocal('form.field.agent_commonname.description') ?></label>
<br clear="all"/>
@ -107,7 +107,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="code" class="flabel"><?php echo getlocal('form.field.agent_code') ?></label>
<div class="fvalue">
<input id="code" type="text" name="code" size="40" value="<?php echo form_value('code') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
<input id="code" type="text" name="code" size="40" value="<?php echo form_value($page, 'code') ?>" class="formauth"<?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
</div>
<label for="code" class="fdescr"> &mdash; <?php echo getlocal('form.field.agent_code.description') ?></label>
<br clear="all"/>

View File

@ -41,7 +41,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("page_agents.sort") ?><br/>
<select name="sortby" onchange="this.form.submit();"><?php
foreach($page['availableOrders'] as $k) {
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value("sortby") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value($page, "sortby") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
} ?></select>
</div>
@ -49,7 +49,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("page_agents.sortdirection") ?><br/>
<select name="sortdirection" onchange="this.form.submit();"><?php
foreach($page['availableDirections'] as $k) {
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value("sortdirection") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value($page, "sortdirection") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
} ?></select>
</div>

View File

@ -67,7 +67,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="avatarFile" class="flabel"><?php echo getlocal('form.field.avatar.upload') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="avatarFile" type="file" name="avatarFile" size="40" value="<?php echo form_value('avatarFile') ?>" class="formauth"/>
<input id="avatarFile" type="file" name="avatarFile" size="40" value="<?php echo form_value($page, 'avatarFile') ?>" class="formauth"/>
</div>
<label for="avatarFile" class="fdescr"> &mdash; <?php echo getlocal('form.field.avatar.upload.description') ?></label>
<br clear="all"/>

View File

@ -54,7 +54,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="address" class="flabel"><?php echo getlocal('form.field.address') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="address" type="text" name="address" size="40" value="<?php echo form_value('address') ?>" class="formauth"/>
<input id="address" type="text" name="address" size="40" value="<?php echo form_value($page, 'address') ?>" class="formauth"/>
</div>
<label for="address" class="fdescr"> &mdash; <?php echo getlocal('form.field.address.description') ?></label>
<br clear="all"/>
@ -63,7 +63,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="days" class="flabel"><?php echo getlocal('form.field.ban_days') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="days" type="text" name="days" size="4" value="<?php echo form_value('days') ?>" class="formauth"/>
<input id="days" type="text" name="days" size="4" value="<?php echo form_value($page, 'days') ?>" class="formauth"/>
</div>
<label for="days" class="fdescr"> &mdash; <?php echo getlocal('form.field.ban_days.description') ?></label>
<br clear="all"/>
@ -72,7 +72,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="comment" class="flabel"><?php echo getlocal('form.field.ban_comment') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="comment" type="text" name="comment" size="40" value="<?php echo form_value('comment') ?>" class="formauth"/>
<input id="comment" type="text" name="comment" size="40" value="<?php echo form_value($page, 'comment') ?>" class="formauth"/>
</div>
<label for="comment" class="fdescr"> &mdash; <?php echo getlocal('form.field.ban_comment.description') ?></label>
<br clear="all"/>

View File

@ -35,7 +35,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("canned.locale") ?><br/>
<select name="lang" onchange="this.form.submit();"><?php
foreach($page['locales'] as $k) {
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("lang") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value($page, "lang") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
} ?></select>
</div>
@ -43,7 +43,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("canned.group") ?><br/>
<select name="group" onchange="this.form.submit();"><?php
foreach($page['groups'] as $k) {
echo "<option value=\"".$k["groupid"]."\"".($k["groupid"] == form_value("group") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp', $k['level']*2).$k["vclocalname"]."</option>";
echo "<option value=\"".$k["groupid"]."\"".($k["groupid"] == form_value($page, "group") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp', $k['level']*2).$k["vclocalname"]."</option>";
} ?></select>
</div>
@ -56,8 +56,8 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="tabletool">
<img src="<?php echo MIBEW_WEB_ROOT ?>/styles/pages/default/images/buttons/createban.gif" border="0" alt=""/>
<a href="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>" target="_blank"
onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">
<a href="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value($page, "lang") ?>&amp;group=<?php echo form_value($page, "group")?>" target="_blank"
onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?lang=<?php echo form_value($page, "lang") ?>&amp;group=<?php echo form_value($page, "group")?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">
<?php echo getlocal("canned.add") ?>
</a>
</div>
@ -89,7 +89,7 @@ if( $page['pagination.items'] ) {
<td>
<a href="<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>" target="_blank"
onclick="this.newWindow = window.open('<?php echo MIBEW_WEB_ROOT ?>/operator/cannededit.php?key=<?php echo $localstr['id'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo getlocal("canned.actions.edit") ?></a>,
<a href="<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php?act=delete&amp;key=<?php echo $localstr['id'] ?>&amp;lang=<?php echo form_value("lang") ?>&amp;group=<?php echo form_value("group")?><?php print_csrf_token_in_url() ?>"><?php echo getlocal("canned.actions.del") ?></a>
<a href="<?php echo MIBEW_WEB_ROOT ?>/operator/canned.php?act=delete&amp;key=<?php echo $localstr['id'] ?>&amp;lang=<?php echo form_value($page, "lang") ?>&amp;group=<?php echo form_value($page, "group")?><?php print_csrf_token_in_url() ?>"><?php echo getlocal("canned.actions.del") ?></a>
</td>
</tr>
<?php

View File

@ -50,14 +50,14 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="titlefield" class="flabel"><?php echo getlocal("canned.message_title") ?></label>
<div class="fvaluenodesc">
<input id="titlefield" type="text" name="title" class="wide" maxlength="100" value="<?php echo form_value('title') ?>"/>
<input id="titlefield" type="text" name="title" class="wide" maxlength="100" value="<?php echo form_value($page, 'title') ?>"/>
</div>
</div>
<div class="field">
<label for="message" class="flabel"><?php echo getlocal("cannededit.message") ?></label>
<div class="fvaluenodesc">
<textarea id="message" name="message" cols="20" rows="5" class="wide"><?php echo form_value('message') ?></textarea>
<textarea id="message" name="message" cols="20" rows="5" class="wide"><?php echo form_value($page, 'message') ?></textarea>
</div>
</div>

View File

@ -34,14 +34,14 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fieldinrow">
<label for="lang" class="flabel"><?php echo getlocal("page.gen_button.choose_locale") ?></label>
<div class="fvaluenodesc">
<select id="lang" name="lang" onchange="this.form.submit();"><?php foreach($page['availableLocales'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("lang") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="lang" name="lang" onchange="this.form.submit();"><?php foreach($page['availableLocales'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "lang") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>
<div class="fieldinrow">
<label for="style" class="flabel"><?php echo getlocal("page.gen_button.choose_style") ?></label>
<div class="fvaluenodesc">
<select id="style" name="style" onchange="this.form.submit();"><?php foreach($page['availableChatStyles'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("style") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
<select id="style" name="style" onchange="this.form.submit();"><?php foreach($page['availableChatStyles'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value($page, "style") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div>
</div>
<br clear="all"/>
@ -49,7 +49,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fieldinrow">
<label for="codetype" class="flabel"><?php echo getlocal("page.gen_button.choose_type") ?></label>
<div class="fvaluenodesc">
<select id="codetype" name="codetype" onchange="this.form.submit();"><?php foreach($page['availableCodeTypes'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("codetype") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
<select id="codetype" name="codetype" onchange="this.form.submit();"><?php foreach($page['availableCodeTypes'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value($page, "codetype") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div>
</div>
<br clear="all"/>
@ -58,7 +58,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fieldinrow">
<label for="i" class="flabel"><?php echo getlocal("page.gen_button.choose_image") ?></label>
<div class="fvaluenodesc">
<select id="i" name="i" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="i" name="i" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>
@ -66,7 +66,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fieldinrow">
<label for="invitationstyle" class="flabel"><?php echo getlocal("page.gen_button.choose_invitationstyle") ?></label>
<div class="fvaluenodesc">
<select id="invitationstyle" name="invitationstyle" onchange="this.form.submit();"><?php foreach($page['availableInvitationStyles'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("invitationstyle") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
<select id="invitationstyle" name="invitationstyle" onchange="this.form.submit();"><?php foreach($page['availableInvitationStyles'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value($page, "invitationstyle") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div>
</div>
<?php } ?>
@ -76,7 +76,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fieldinrow">
<label for="group" class="flabel"><?php echo getlocal("page.gen_button.choose_group") ?></label>
<div class="fvaluenodesc">
<select id="group" name="group" onchange="this.form.submit();"><?php foreach($page['groups'] as $k) { echo "<option value=\"".$k['groupid']."\"".($k['groupid'] == form_value("group") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp;', $k['level']*2).$k['vclocalname']."</option>"; } ?></select>
<select id="group" name="group" onchange="this.form.submit();"><?php foreach($page['groups'] as $k) { echo "<option value=\"".$k['groupid']."\"".($k['groupid'] == form_value($page, "group") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp;', $k['level']*2).$k['vclocalname']."</option>"; } ?></select>
</div>
</div>
<br clear="all"/>

View File

@ -54,7 +54,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="name" class="flabel"><?php echo getlocal('form.field.groupname') ?><span class="required">*</span></label>
<div class="fvalue">
<input id="name" type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"/>
<input id="name" type="text" name="name" size="40" value="<?php echo form_value($page, 'name') ?>" class="formauth"/>
</div>
<label for="name" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupname.description') ?></label>
<br clear="all"/>
@ -63,7 +63,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="description" class="flabel"><?php echo getlocal('form.field.groupdesc') ?></label>
<div class="fvalue">
<input id="description" type="text" name="description" size="40" value="<?php echo form_value('description') ?>" class="formauth"/>
<input id="description" type="text" name="description" size="40" value="<?php echo form_value($page, 'description') ?>" class="formauth"/>
</div>
<label for="description" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupdesc.description') ?></label>
<br clear="all"/>
@ -72,7 +72,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="commonname" class="flabel"><?php echo getlocal('form.field.groupcommonname') ?></label>
<div class="fvalue">
<input id="commonname" type="text" name="commonname" size="40" value="<?php echo form_value('commonname') ?>" class="formauth"/>
<input id="commonname" type="text" name="commonname" size="40" value="<?php echo form_value($page, 'commonname') ?>" class="formauth"/>
</div>
<label for="commonname" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupcommonname.description') ?></label>
<br clear="all"/>
@ -81,7 +81,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="commondescription" class="flabel"><?php echo getlocal('form.field.groupcommondesc') ?></label>
<div class="fvalue">
<input id="commondescription" type="text" name="commondescription" size="40" value="<?php echo form_value('commondescription') ?>" class="formauth"/>
<input id="commondescription" type="text" name="commondescription" size="40" value="<?php echo form_value($page, 'commondescription') ?>" class="formauth"/>
</div>
<label for="commondescription" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupcommondesc.description') ?></label>
<br clear="all"/>
@ -90,7 +90,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="email" class="flabel"><?php echo getlocal('form.field.mail') ?></label>
<div class="fvalue">
<input id="email" type="text" name="email" size="40" value="<?php echo form_value('email') ?>" class="formauth"/>
<input id="email" type="text" name="email" size="40" value="<?php echo form_value($page, 'email') ?>" class="formauth"/>
</div>
<label for="email" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupemail.description') ?></label>
<br clear="all"/>
@ -99,7 +99,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="weight" class="flabel"><?php echo getlocal('form.field.groupweight') ?></label>
<div class="fvalue">
<input id="weight" type="text" name="weight" size="40" value="<?php echo form_value('weight') ?>" class="formauth"/>
<input id="weight" type="text" name="weight" size="40" value="<?php echo form_value($page, 'weight') ?>" class="formauth"/>
</div>
<label for="weight" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupweight.description') ?></label>
<br clear="all"/>
@ -108,7 +108,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="parentgroup" class="flabel"><?php echo getlocal('form.field.groupparent') ?></label>
<div class="fvalue">
<select name="parentgroup" id="parentgroup"><?php foreach($page['availableParentGroups'] as $k) { echo "<option value=\"".$k['groupid']."\"".($k['groupid'] == form_value("parentgroup") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp;', $k['level']*2).$k['vclocalname']."</option>"; } ?></select>
<select name="parentgroup" id="parentgroup"><?php foreach($page['availableParentGroups'] as $k) { echo "<option value=\"".$k['groupid']."\"".($k['groupid'] == form_value($page, "parentgroup") ? " selected=\"selected\"" : "").">".str_repeat('&nbsp;', $k['level']*2).$k['vclocalname']."</option>"; } ?></select>
</div>
<label for="parentgroup" class="fdescr"> &mdash; <?php echo getlocal('form.field.groupparent.description') ?></label>
<br clear="all"/>
@ -120,7 +120,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="titlefield" class="flabel"><?php echo getlocal('settings.company.title') ?></label>
<div class="fvalue">
<input id="titlefield" type="text" name="title" size="40" value="<?php echo form_value('title') ?>" class="formauth"/>
<input id="titlefield" type="text" name="title" size="40" value="<?php echo form_value($page, 'title') ?>" class="formauth"/>
</div>
<label for="titlefield" class="fdescr"> &mdash; <?php echo getlocal('settings.company.title.description') ?></label>
<br clear="all"/>
@ -129,7 +129,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="chattitle" class="flabel"><?php echo getlocal('settings.chat.title') ?></label>
<div class="fvalue">
<input id="chattitle" type="text" name="chattitle" size="40" value="<?php echo form_value('chattitle') ?>" class="formauth"/>
<input id="chattitle" type="text" name="chattitle" size="40" value="<?php echo form_value($page, 'chattitle') ?>" class="formauth"/>
</div>
<label for="chattitle" class="fdescr"> &mdash; <?php echo getlocal('settings.chat.title') ?></label>
<br clear="all"/>
@ -138,7 +138,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="logofield" class="flabel"><?php echo getlocal('settings.logo') ?></label>
<div class="fvalue">
<input id="logofield" type="text" name="logo" size="40" value="<?php echo form_value('logo') ?>" class="formauth"/>
<input id="logofield" type="text" name="logo" size="40" value="<?php echo form_value($page, 'logo') ?>" class="formauth"/>
</div>
<label for="logofield" class="fdescr"> &mdash; <?php echo getlocal('settings.logo.description') ?></label>
<br clear="all"/>
@ -147,7 +147,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="hosturl" class="flabel"><?php echo getlocal('settings.host') ?></label>
<div class="fvalue">
<input id="hosturl" type="text" name="hosturl" size="40" value="<?php echo form_value('hosturl') ?>" class="formauth"/>
<input id="hosturl" type="text" name="hosturl" size="40" value="<?php echo form_value($page, 'hosturl') ?>" class="formauth"/>
</div>
<label for="hosturl" class="fdescr"> &mdash; <?php echo getlocal('settings.host.description') ?></label>
<br clear="all"/>

View File

@ -41,7 +41,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("page.groups.sort") ?><br/>
<select name="sortby" onchange="this.form.submit();"><?php
foreach($page['availableOrders'] as $k) {
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value("sortby") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value($page, "sortby") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
} ?></select>
</div>
@ -49,7 +49,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<?php echo getlocal("page.groups.sortdirection") ?><br/>
<select name="sortdirection" onchange="this.form.submit();"><?php
foreach($page['availableDirections'] as $k) {
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value("sortdirection") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
echo "<option value=\"".$k['id']."\"".($k['id'] == form_value($page, "sortdirection") ? " selected=\"selected\"" : "").">".$k['name']."</option>";
} ?></select>
</div>

View File

@ -40,7 +40,7 @@ function tpl_content() { global $page;
<div class="field">
<label for="preview" class="flabel"><?php echo getlocal("page.preview.choose") ?></label>
<div class="fvaluenodesc">
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>
</div>

View File

@ -44,7 +44,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<div class="fleftlabel"><?php echo getlocal("page_login.login") ?></div>
<div class="fvalue">
<input type="text" name="login" size="25" value="<?php echo form_value('login') ?>" class="formauth"/>
<input type="text" name="login" size="25" value="<?php echo form_value($page, 'login') ?>" class="formauth"/>
</div>
<br clear="all"/>
</div>

View File

@ -34,7 +34,7 @@ function tpl_content() { global $page;
<div class="field">
<label for="preview" class="flabel"><?php echo getlocal("page.preview.choose") ?></label>
<div class="fvaluenodesc">
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>
<?php foreach($page['screenshotsList'] as $screenshot) { ?>

View File

@ -41,7 +41,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="onlinetimeout" class="flabel"><?php echo getlocal('settings.onlinetimeout') ?></label>
<div class="fvalue">
<input id="onlinetimeout" type="text" name="onlinetimeout" size="40" value="<?php echo form_value('onlinetimeout') ?>" class="formauth"/>
<input id="onlinetimeout" type="text" name="onlinetimeout" size="40" value="<?php echo form_value($page, 'onlinetimeout') ?>" class="formauth"/>
</div>
<label for="onlinetimeout" class="fdescr"> &mdash; <?php echo getlocal('settings.onlinetimeout.description') ?></label>
<br clear="all"/>
@ -50,7 +50,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="frequencyoperator" class="flabel"><?php echo getlocal('settings.frequencyoperator') ?></label>
<div class="fvalue">
<input id="frequencyoperator" type="text" name="frequencyoperator" size="40" value="<?php echo form_value('frequencyoperator') ?>" class="formauth"/>
<input id="frequencyoperator" type="text" name="frequencyoperator" size="40" value="<?php echo form_value($page, 'frequencyoperator') ?>" class="formauth"/>
</div>
<label for="frequencyoperator" class="fdescr"> &mdash; <?php echo getlocal('settings.frequencyoperator.description') ?></label>
<br clear="all"/>
@ -59,7 +59,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="frequencychat" class="flabel"><?php echo getlocal('settings.frequencychat') ?></label>
<div class="fvalue">
<input id="frequencychat" type="text" name="frequencychat" size="40" value="<?php echo form_value('frequencychat') ?>" class="formauth"/>
<input id="frequencychat" type="text" name="frequencychat" size="40" value="<?php echo form_value($page, 'frequencychat') ?>" class="formauth"/>
</div>
<label for="frequencychat" class="fdescr"> &mdash; <?php echo getlocal('settings.frequencychat.description') ?></label>
<br clear="all"/>
@ -68,7 +68,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="onehostconnections" class="flabel"><?php echo getlocal('settings.onehostconnections') ?></label>
<div class="fvalue">
<input id="onehostconnections" type="text" name="onehostconnections" size="40" value="<?php echo form_value('onehostconnections') ?>" class="formauth"/>
<input id="onehostconnections" type="text" name="onehostconnections" size="40" value="<?php echo form_value($page, 'onehostconnections') ?>" class="formauth"/>
</div>
<label for="onehostconnections" class="fdescr"> &mdash; <?php echo getlocal('settings.onehostconnections.description') ?></label>
<br clear="all"/>
@ -77,7 +77,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="threadlifetime" class="flabel"><?php echo getlocal('settings.threadlifetime') ?></label>
<div class="fvalue">
<input id="threadlifetime" type="text" name="threadlifetime" size="40" value="<?php echo form_value('threadlifetime') ?>" class="formauth"/>
<input id="threadlifetime" type="text" name="threadlifetime" size="40" value="<?php echo form_value($page, 'threadlifetime') ?>" class="formauth"/>
</div>
<label for="threadlifetime" class="fdescr"> &mdash; <?php echo getlocal('settings.threadlifetime.description') ?></label>
<br clear="all"/>
@ -86,7 +86,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="statistics_aggregation_interval" class="flabel"><?php echo getlocal('settings.statistics_aggregation_interval') ?></label>
<div class="fvalue">
<input id="statistics_aggregation_interval" type="text" name="statistics_aggregation_interval" size="40" value="<?php echo form_value('statistics_aggregation_interval') ?>" class="formauth"/>
<input id="statistics_aggregation_interval" type="text" name="statistics_aggregation_interval" size="40" value="<?php echo form_value($page, 'statistics_aggregation_interval') ?>" class="formauth"/>
</div>
<label for="statistics_aggregation_interval" class="fdescr"> &mdash; <?php echo getlocal('settings.statistics_aggregation_interval.description') ?></label>
<br clear="all"/>
@ -96,7 +96,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="frequencytracking" class="flabel"><?php echo getlocal('settings.frequencytracking') ?></label>
<div class="fvalue">
<input id="frequencytracking" type="text" name="frequencytracking" size="40" value="<?php echo form_value('frequencytracking') ?>" class="formauth"/>
<input id="frequencytracking" type="text" name="frequencytracking" size="40" value="<?php echo form_value($page, 'frequencytracking') ?>" class="formauth"/>
</div>
<label for="frequencytracking" class="fdescr"> &mdash; <?php echo getlocal('settings.frequencytracking.description') ?></label>
<br clear="all"/>
@ -105,7 +105,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="visitorslimit" class="flabel"><?php echo getlocal('settings.visitorslimit') ?></label>
<div class="fvalue">
<input id="visitorslimit" type="text" name="visitorslimit" size="40" value="<?php echo form_value('visitorslimit') ?>" class="formauth"/>
<input id="visitorslimit" type="text" name="visitorslimit" size="40" value="<?php echo form_value($page, 'visitorslimit') ?>" class="formauth"/>
</div>
<label for="visitorslimit" class="fdescr"> &mdash; <?php echo getlocal('settings.visitorslimit.description') ?></label>
<br clear="all"/>
@ -114,7 +114,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="invitationlifetime" class="flabel"><?php echo getlocal('settings.invitationlifetime') ?></label>
<div class="fvalue">
<input id="invitationlifetime" type="text" name="invitationlifetime" size="40" value="<?php echo form_value('invitationlifetime') ?>" class="formauth"/>
<input id="invitationlifetime" type="text" name="invitationlifetime" size="40" value="<?php echo form_value($page, 'invitationlifetime') ?>" class="formauth"/>
</div>
<label for="invitationlifetime" class="fdescr"> &mdash; <?php echo getlocal('settings.invitationlifetime.description') ?></label>
<br clear="all"/>
@ -123,7 +123,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="trackinglifetime" class="flabel"><?php echo getlocal('settings.trackinglifetime') ?></label>
<div class="fvalue">
<input id="trackinglifetime" type="text" name="trackinglifetime" size="40" value="<?php echo form_value('trackinglifetime') ?>" class="formauth"/>
<input id="trackinglifetime" type="text" name="trackinglifetime" size="40" value="<?php echo form_value($page, 'trackinglifetime') ?>" class="formauth"/>
</div>
<label for="trackinglifetime" class="fdescr"> &mdash; <?php echo getlocal('settings.trackinglifetime.description') ?></label>
<br clear="all"/>

View File

@ -59,7 +59,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<div class="fleftlabel"><?php echo getlocal("restore.emailorlogin") ?></div>
<div class="fvalue">
<input type="text" name="loginoremail" size="25" value="<?php echo form_value('loginoremail') ?>" class="formauth"/>
<input type="text" name="loginoremail" size="25" value="<?php echo form_value($page, 'loginoremail') ?>" class="formauth"/>
</div>
<br clear="all"/>
</div>

View File

@ -41,7 +41,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="email" class="flabel"><?php echo getlocal('settings.email') ?></label>
<div class="fvalue">
<input id="email" type="text" name="email" size="40" value="<?php echo form_value('email') ?>" class="formauth"/>
<input id="email" type="text" name="email" size="40" value="<?php echo form_value($page, 'email') ?>" class="formauth"/>
</div>
<label for="email" class="fdescr"> &mdash; <?php echo getlocal('settings.email.description') ?></label>
<br clear="all"/>
@ -50,7 +50,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="titlefield" class="flabel"><?php echo getlocal('settings.company.title') ?></label>
<div class="fvalue">
<input id="titlefield" type="text" name="title" size="40" value="<?php echo form_value('title') ?>" class="formauth"/>
<input id="titlefield" type="text" name="title" size="40" value="<?php echo form_value($page, 'title') ?>" class="formauth"/>
</div>
<label for="titlefield" class="fdescr"> &mdash; <?php echo getlocal('settings.company.title.description') ?></label>
<br clear="all"/>
@ -59,7 +59,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="chattitle" class="flabel"><?php echo getlocal('settings.chat.title') ?></label>
<div class="fvalue">
<input id="chattitle" type="text" name="chattitle" size="40" value="<?php echo form_value('chattitle') ?>" class="formauth"/>
<input id="chattitle" type="text" name="chattitle" size="40" value="<?php echo form_value($page, 'chattitle') ?>" class="formauth"/>
</div>
<label for="chattitle" class="fdescr"> &mdash; <?php echo getlocal('settings.chat.title.description') ?></label>
<br clear="all"/>
@ -68,7 +68,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="logofield" class="flabel"><?php echo getlocal('settings.logo') ?></label>
<div class="fvalue">
<input id="logofield" type="text" name="logo" size="40" value="<?php echo form_value('logo') ?>" class="formauth"/>
<input id="logofield" type="text" name="logo" size="40" value="<?php echo form_value($page, 'logo') ?>" class="formauth"/>
</div>
<label for="logofield" class="fdescr"> &mdash; <?php echo getlocal('settings.logo.description') ?></label>
<br clear="all"/>
@ -77,7 +77,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="hosturl" class="flabel"><?php echo getlocal('settings.host') ?></label>
<div class="fvalue">
<input id="hosturl" type="text" name="hosturl" size="40" value="<?php echo form_value('hosturl') ?>" class="formauth"/>
<input id="hosturl" type="text" name="hosturl" size="40" value="<?php echo form_value($page, 'hosturl') ?>" class="formauth"/>
</div>
<label for="hosturl" class="fdescr"> &mdash; <?php echo getlocal('settings.host.description') ?></label>
<br clear="all"/>
@ -86,7 +86,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="geolink" class="flabel"><?php echo getlocal('settings.geolink') ?></label>
<div class="fvalue">
<input id="geolink" type="text" name="geolink" size="40" value="<?php echo form_value('geolink') ?>" class="formauth"/>
<input id="geolink" type="text" name="geolink" size="40" value="<?php echo form_value($page, 'geolink') ?>" class="formauth"/>
</div>
<label for="geolink" class="fdescr"> &mdash; <?php echo getlocal('settings.geolink.description') ?></label>
<br clear="all"/>
@ -95,7 +95,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="geolinkparams" class="flabel"><?php echo getlocal('settings.geolinkparams') ?></label>
<div class="fvalue">
<input id="geolinkparams" type="text" name="geolinkparams" size="40" value="<?php echo form_value('geolinkparams') ?>" class="formauth"/>
<input id="geolinkparams" type="text" name="geolinkparams" size="40" value="<?php echo form_value($page, 'geolinkparams') ?>" class="formauth"/>
</div>
<label for="geolinkparams" class="fdescr"> &mdash; <?php echo getlocal('settings.geolinkparams.description') ?></label>
<br clear="all"/>
@ -104,7 +104,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="usernamepattern" class="flabel"><?php echo getlocal('settings.usernamepattern') ?></label>
<div class="fvalue">
<input id="usernamepattern" type="text" name="usernamepattern" size="40" value="<?php echo form_value('usernamepattern') ?>" class="formauth"/>
<input id="usernamepattern" type="text" name="usernamepattern" size="40" value="<?php echo form_value($page, 'usernamepattern') ?>" class="formauth"/>
</div>
<label for="usernamepattern" class="fdescr"> &mdash; <?php echo getlocal('settings.usernamepattern.description') ?></label>
<br clear="all"/>
@ -113,7 +113,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="cronkey" class="flabel"><?php echo getlocal('settings.cronkey') ?></label>
<div class="fvalue">
<input id="cronkey" type="text" name="cronkey" size="40" value="<?php echo form_value('cronkey') ?>" class="formauth"/>
<input id="cronkey" type="text" name="cronkey" size="40" value="<?php echo form_value($page, 'cronkey') ?>" class="formauth"/>
</div>
<label for="cronkey" class="fdescr"> &mdash; <?php echo getlocal2('settings.cronkey.description', array($page['cron_path'])) ?></label>
<br clear="all"/>
@ -122,7 +122,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="page_style" class="flabel"><?php echo getlocal('settings.page_style') ?></label>
<div class="fvalue">
<select id="pages_style" name="page_style" ><?php foreach($page['availablePageStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("pagestyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="pages_style" name="page_style" ><?php foreach($page['availablePageStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "pagestyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
<label for="page_style" class="fdescr"> &mdash; <?php echo getlocal('settings.page_style.description') ?></label>
<br clear="all"/>
@ -131,7 +131,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="chat_style" class="flabel"><?php echo getlocal('settings.chatstyle') ?></label>
<div class="fvalue">
<select id="chat_style" name="chat_style" ><?php foreach($page['availableChatStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("chatstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="chat_style" name="chat_style" ><?php foreach($page['availableChatStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "chatstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
<label for="chat_style" class="fdescr"> &mdash; <?php echo getlocal('settings.chatstyle.description') ?></label>
<br clear="all"/>
@ -140,7 +140,7 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="invitation_style" class="flabel"><?php echo getlocal('settings.invitationstyle') ?></label>
<div class="fvalue">
<select id="invitation_style" name="invitation_style" ><?php foreach($page['availableInvitationStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("invitationstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="invitation_style" name="invitation_style" ><?php foreach($page['availableInvitationStyles'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "invitationstyle") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
<label for="invitation_style" class="fdescr"> &mdash; <?php echo getlocal('settings.invitationstyle.description') ?></label>
<br clear="all"/>
@ -149,8 +149,8 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<div class="flabel"><?php echo getlocal('settings.sendmessagekey') ?></div>
<div class="fvaluenodesc">
<input id="sendmessagekeyenter" type="radio" name="sendmessagekey" value="enter" <?php echo form_value("sendmessagekey") == "enter" ? " checked=\"checked\"" : ""?>/><label for="sendmessagekeyenter">Enter</label>
<input id="sendmessagekeycenter" type="radio" name="sendmessagekey" value="center" <?php echo form_value("sendmessagekey") == "center" ? " checked=\"checked\"" : ""?>/><label for="sendmessagekeycenter">Ctrl-Enter</label>
<input id="sendmessagekeyenter" type="radio" name="sendmessagekey" value="enter" <?php echo form_value($page, "sendmessagekey") == "enter" ? " checked=\"checked\"" : ""?>/><label for="sendmessagekeyenter">Enter</label>
<input id="sendmessagekeycenter" type="radio" name="sendmessagekey" value="center" <?php echo form_value($page, "sendmessagekey") == "center" ? " checked=\"checked\"" : ""?>/><label for="sendmessagekeycenter">Ctrl-Enter</label>
</div>
</div>

View File

@ -41,15 +41,15 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="fvaluenodesc">
<div class="searchctrl">
<label for="startday"><?php echo getlocal("statistics.from") ?></label>
<select id="startday" name="startday"><?php foreach($page['availableDays'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("startday") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="startday" name="startday"><?php foreach($page['availableDays'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "startday") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select name="startmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("startmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
<select name="startmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value($page, "startmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div>
<div class="searchctrl">
<label for="endday"><?php echo getlocal("statistics.till") ?></label>
<select id="endday" name="endday"><?php foreach($page['availableDays'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("endday") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="endday" name="endday"><?php foreach($page['availableDays'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "endday") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select name="endmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value("endmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
<select name="endmonth"><?php foreach($page['availableMonth'] as $k => $v) { echo "<option value=\"".$k."\"".($k == form_value($page, "endmonth") ? " selected=\"selected\"" : "").">".$v."</option>"; } ?></select>
</div>
<div id="searchbutton">
<input type="image" name="search" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/>

View File

@ -34,7 +34,7 @@ function tpl_content() { global $page;
<div class="field">
<label for="preview" class="flabel"><?php echo getlocal("page.preview.choose") ?></label>
<div class="fvaluenodesc">
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
<select id="preview" name="preview" onchange="this.form.submit();"><?php foreach($page['availablePreviews'] as $k) { echo "<option value=\"".$k."\"".($k == form_value($page, "preview") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
</div>
</div>
<?php foreach($page['screenshotsList'] as $screenshot) { ?>

View File

@ -32,22 +32,22 @@ function tpl_content() { global $page;
<label for="q" class="flabel"><?php echo getlocal("page_analysis.full.text.search") ?></label>
<div class="fvaluenodesc">
<div id="searchtext">
<input id="q" type="text" name="q" size="60" value="<?php echo form_value('q') ?>" class="formauth"/>
<input id="q" type="text" name="q" size="60" value="<?php echo form_value($page, 'q') ?>" class="formauth"/>
</div>
<div class="searchctrl">
<label for="type"><?php echo getlocal("page_search.type.title") ?></label>
<select id="type" name="type" onchange="if (this.value == 'all' || this.value == 'message') {document.getElementById('inSystemMessages').style.display='inline'} else {document.getElementById('inSystemMessages').style.display='none'}; ">
<option value="all" <?php echo (form_value('type') == 'all')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.all") ?></option>
<option value="message" <?php echo (form_value('type') == 'message')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.message") ?></option>
<option value="operator" <?php echo (form_value('type') == 'operator')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.operator") ?></option>
<option value="visitor" <?php echo (form_value('type') == 'visitor')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.visitor") ?></option>
<option value="all" <?php echo (form_value($page, 'type') == 'all')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.all") ?></option>
<option value="message" <?php echo (form_value($page, 'type') == 'message')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.message") ?></option>
<option value="operator" <?php echo (form_value($page, 'type') == 'operator')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.operator") ?></option>
<option value="visitor" <?php echo (form_value($page, 'type') == 'visitor')?'selected="selected"':'' ?>><?php echo getlocal("page_search.type.visitor") ?></option>
</select>
</div>
<div id="searchbutton">
<input type="image" name="search" src='<?php echo MIBEW_WEB_ROOT . getlocal("image.button.search") ?>' alt='<?php echo getlocal("button.search") ?>'/>
</div><br clear="all"/>
<div class="searchctrl" id="inSystemMessages"<?php echo ((form_value('type') != 'all' && form_value('type') != 'message')?' style="display: none;"':'')?>>
<input id="insystemmessagesfield" type="checkbox" name="insystemmessages" <?php echo (form_value('insystemmessages')?'checked="checked"':'') ?>/> <label for="insystemmessagesfield"><?php echo getlocal("page_search.search.type.in_system_messages") ?></label>
<div class="searchctrl" id="inSystemMessages"<?php echo ((form_value($page, 'type') != 'all' && form_value($page, 'type') != 'message')?' style="display: none;"':'')?>>
<input id="insystemmessagesfield" type="checkbox" name="insystemmessages" <?php echo (form_value($page, 'insystemmessages')?'checked="checked"':'') ?>/> <label for="insystemmessagesfield"><?php echo getlocal("page_search.search.type.in_system_messages") ?></label>
</div>
</div>
<br clear="all"/>

View File

@ -47,14 +47,14 @@ require_once(dirname(__FILE__).'/inc_errors.php');
<div class="field">
<label for="original" class="flabel"><?php echo $page['title1'] ?></label>
<div class="fvaluenodesc">
<textarea id="original" name="original" disabled="disabled" cols="20" rows="5" class="wide"><?php echo form_value('original') ?></textarea>
<textarea id="original" name="original" disabled="disabled" cols="20" rows="5" class="wide"><?php echo form_value($page, 'original') ?></textarea>
</div>
</div>
<div class="field">
<label for="translation" class="flabel"><?php echo $page['title2'] ?></label>
<div class="fvaluenodesc">
<textarea id="translation" name="translation" cols="20" rows="5" class="wide"><?php echo form_value('translation') ?></textarea>
<textarea id="translation" name="translation" cols="20" rows="5" class="wide"><?php echo form_value($page, 'translation') ?></textarea>
</div>
</div>

View File

@ -32,12 +32,12 @@ function tpl_content() { global $page;
<?php echo getlocal("translate.direction") ?><br/>
<select name="source" onchange="this.form.submit();"><?php
foreach($page['availableLocales'] as $k) {
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("source") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value($page, "source") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
} ?></select>
=&gt;
<select name="target" onchange="this.form.submit();"><?php
foreach($page['availableLocales'] as $k) {
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("target") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value($page, "target") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
} ?></select>
</div>
@ -45,7 +45,7 @@ function tpl_content() { global $page;
<?php echo getlocal("translate.sort") ?><br/>
<select name="sort" onchange="this.form.submit();"><?php
foreach($page['availableOrders'] as $k) {
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("sort") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value($page, "sort") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
} ?></select>
</div>
@ -53,7 +53,7 @@ function tpl_content() { global $page;
<?php echo getlocal("translate.show") ?><br/>
<select name="show" onchange="this.form.submit();"><?php
foreach($page['showOptions'] as $k) {
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value("show") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
echo "<option value=\"".$k["id"]."\"".($k["id"] == form_value($page, "show") ? " selected=\"selected\"" : "").">".$k["name"]."</option>";
} ?></select>
</div>