mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
242 lines
12 KiB
HTML
242 lines
12 KiB
HTML
<!--#include("./header.html")-->
|
|
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/point/tpl/config/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
</div>
|
|
<form ruleset="insertConfig" action="./" method="post" id="point_module_config_form" class="x_form-horizontal">
|
|
<input type="hidden" name="module" value="point" />
|
|
<input type="hidden" name="act" value="procPointAdminInsertConfig" />
|
|
<input type="hidden" name="xe_validator_id" value="modules/point/tpl/config/1" />
|
|
<section class="section default">
|
|
<h1>{$lang->is_default}</h1>
|
|
<div class="x_control-group module_io">
|
|
<label for="able_module" class="x_control-label">{$lang->point_io}</label>
|
|
<div class="x_controls" style="padding-top:3px">
|
|
<input type="checkbox" name="able_module" id="able_module" value="Y" checked="checked"|cond="!$config->able_module||$config->able_module=='Y'" />
|
|
<span class="x_help-inline">{$lang->about_point_io}</span>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="point_name" class="x_control-label">{$lang->point_name}</label>
|
|
<div class="x_controls">
|
|
<input type="text" value="{$config->point_name}" name="point_name" id="point_name" style="width:50px" />
|
|
<p class="x_help-block">{$lang->about_point_name}</p>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="max_level" class="x_control-label">{$lang->max_level}</label>
|
|
<div class="x_controls">
|
|
<input type="number" min="0" value="{$config->max_level}" name="max_level" id="max_level" />
|
|
<p class="x_help-block">{$lang->about_max_level}</p>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="level_icon" class="x_control-label">{$lang->level_icon}</label>
|
|
<div class="x_controls">
|
|
<select name="level_icon" id="level_icon">
|
|
<!--@foreach($level_icon_list as $key => $val)-->
|
|
<option value="{$val}" selected="selected"|cond="$config->level_icon == $val">{$val}</option>
|
|
<!--@end-->
|
|
</select>
|
|
<span class="x_help-block">{$lang->about_level_icon}</span>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="disable_download" class="x_control-label">{$lang->disable_download}</label>
|
|
<div class="x_controls" style="padding-top:3px">
|
|
<input type="checkbox" name="disable_download" id="disable_download" value="Y" checked="checked"|cond="$config->disable_download=='Y'" />
|
|
{$lang->about_disable_download}
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="disable_read_document" class="x_control-label">{$lang->disable_read_document}</label>
|
|
<div class="x_controls" style="padding-top:3px">
|
|
<input type="checkbox" name="disable_read_document" id="disable_read_document" value="Y" checked="checked"|cond="$config->disable_read_document=='Y'" />
|
|
{$lang->about_disable_read_document}
|
|
<input type="checkbox" name="disable_read_document_except_robots" id="disable_read_document_except_robots" value="Y" checked="checked"|cond="($config->disable_read_document_except_robots ?? 'N') == 'Y'" />
|
|
{$lang->disable_read_document_except_robots}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="x_clearfix">
|
|
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h1>{$lang->give_point}</h1>
|
|
{@ $config_array = get_object_vars($config)}
|
|
{@ $config_array['insert_comment_limit'] = $config_array['insert_comment_limit'] ?? $config_array['no_point_date']}
|
|
{@ $action_types = array(
|
|
'insert_document' => ['time_limit' => 0, 'except_notice' => 0, 'revert_on_delete' => 1],
|
|
'insert_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 1],
|
|
'upload_file' => ['time_limit' => 0, 'except_notice' => 0, 'revert_on_delete' => 1],
|
|
'download_file' => ['time_limit' => 0, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'read_document' => ['time_limit' => 1, 'except_notice' => 1, 'revert_on_delete' => 0],
|
|
'voter' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'blamer' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'voter_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'blamer_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'download_file_author' => ['time_limit' => 0, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'read_document_author' => ['time_limit' => 1, 'except_notice' => 1, 'revert_on_delete' => 0],
|
|
'voted' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'blamed' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'voted_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
'blamed_comment' => ['time_limit' => 1, 'except_notice' => 0, 'revert_on_delete' => 0],
|
|
)}
|
|
|
|
<table class="x_table x_table-striped x_table-hover">
|
|
<tbody>
|
|
<tr>
|
|
<th class="nowr">{$lang->cmd_signup}</td>
|
|
<td class="nowr">
|
|
{strtr($lang->point_given_prefix, ['$'.'point' => $config->point_name])}
|
|
<input type="number" value="{$config->signup_point ?: '0'}" name="signup_point" id="signup_point" />
|
|
{strtr($lang->point_given_suffix, ['$'.'point' => $config->point_name])}
|
|
</td>
|
|
<td class="nowr"></td>
|
|
</tr>
|
|
<tr>
|
|
<th class="nowr">{$lang->cmd_login}</td>
|
|
<td class="nowr">
|
|
{strtr($lang->point_given_prefix, ['$'.'point' => $config->point_name])}
|
|
<input type="number" value="{$config->login_point ?: '0'}" name="login_point" id="login_point" />
|
|
{strtr($lang->point_given_suffix, ['$'.'point' => $config->point_name])}
|
|
</td>
|
|
<td class="nowr"></td>
|
|
</tr>
|
|
<!--@foreach($action_types as $action_type => $action_config)-->
|
|
<tr>
|
|
<th class="nowr">{lang('point_' . $action_type)}</td>
|
|
<td class="nowr">
|
|
{strtr($lang->point_given_prefix, ['$'.'point' => $config->point_name])}
|
|
<input type="number" value="{$config_array[$action_type] ?? '0'}" name="{$action_type}" id="{$action_type}" />
|
|
{strtr($lang->point_given_suffix, ['$'.'point' => $config->point_name])}
|
|
<block cond="$action_config['except_notice']">
|
|
<label class="x_inline" for="{$action_type}_except_notice" style="margin-left:10px">
|
|
<input type="checkbox" value="Y" name="{$action_type}_except_notice" id="{$action_type}_except_notice" checked="checked"|cond="!empty($config_array[$action_type . '_except_notice'])" />
|
|
{$lang->cmd_point_except_notice}
|
|
</label>
|
|
</block>
|
|
<block cond="$action_config['revert_on_delete']">
|
|
<label class="x_inline" for="{$action_type}_revert_on_delete" style="margin-left:10px">
|
|
<input type="checkbox" value="Y" name="{$action_type}_revert_on_delete" id="{$action_type}_revert_on_delete" checked="checked"|cond="($config_array[$action_type . '_revert_on_delete'] ?? false) !== false" />
|
|
{$lang->cmd_point_revert_on_delete}
|
|
</label>
|
|
</block>
|
|
</td>
|
|
<td class="nowr">
|
|
<block cond="$action_config['time_limit']">
|
|
{$lang->point_time_limit_prefix}
|
|
<input type="number" value="{$config_array[$action_type . '_limit'] ?? ''}" name="{$action_type}_limit" id="{$action_type}_limit" />
|
|
{$lang->point_time_limit_suffix}
|
|
</block>
|
|
</td>
|
|
</tr>
|
|
<!--@endforeach-->
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="x_clearfix">
|
|
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h1>{$lang->point_link_group}</h1>
|
|
<p>{$lang->about_point_link_group}</p>
|
|
<div class="x_control-group">
|
|
<label for="group_reset" class="x_control-label">{$lang->point_group_reset_type}</label>
|
|
<div class="x_controls">
|
|
<select name="group_reset" id="group_reset">
|
|
<option value="Y" selected="selected"|cond="$config->group_reset != 'N'" />{$lang->point_group_reset_and_add}</option>
|
|
<option value="N" selected="selected"|cond="$config->group_reset == 'N'" />{$lang->point_group_add_only}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group">
|
|
<label for="group_ratchet" class="x_control-label">{$lang->point_group_ratchet}</label>
|
|
<div class="x_controls">
|
|
<select name="group_ratchet" id="group_ratchet">
|
|
<option value="Y" selected="selected"|cond="$config->group_ratchet == 'Y'" />{$lang->point_group_ratchet_yes}</option>
|
|
<option value="N" selected="selected"|cond="$config->group_ratchet != 'Y'" />{$lang->point_group_ratchet_no}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="x_control-group" loop="$group_list => $key,$val" cond="$val->is_admin != 'Y'">
|
|
<label class="x_control-label" for="point_group_{$key}">{$val->title}</label>
|
|
<div class="x_controls">
|
|
<!--@if($val->is_default != 'Y')-->
|
|
<input type="number" min="0" max="1000" value="{$config->point_group[$key] ?? ''}" name="point_group_{$key}" id="point_group_{$key}" style="width:50px" />
|
|
{$lang->level}
|
|
<!--@end-->
|
|
<span cond="$val->is_default == 'Y'" style="display:inline-block;padding-top:3px">{$lang->default_group}</span>
|
|
</div>
|
|
</div>
|
|
<div class="x_clearfix btnArea">
|
|
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
{@$point_group = @array_flip($config->point_group ?? [])}
|
|
<h1>{$lang->level_point}</h1>
|
|
<div class="x_clearfix">
|
|
<p class="x_pull-left">{$lang->expression}</p>
|
|
<span class="x_pull-right x_input-append">
|
|
<input type="text" value="{$config->expression}" placeholder="Math.pow(i,2) * 90" size="30" class="level_expression" />
|
|
<button type="button" class="x_btn calc_point">{$lang->level_point_calc}</button>
|
|
<button type="button" class="x_btn calc_point _reset">{$lang->cmd_exp_reset}</button>
|
|
</span>
|
|
</div>
|
|
<table class="x_table x_table-striped x_table-hover">
|
|
<tr>
|
|
<th scope="col">{$lang->level}</th>
|
|
<th scope="col">{$lang->level_icon}</th>
|
|
<th scope="col">{$lang->point}</th>
|
|
<th scope="col">{$lang->member_group}</th>
|
|
</tr>
|
|
<tr>
|
|
<td>1</td>
|
|
<td><img src="{getUrl()}modules/point/icons/{$config->level_icon}/1.{$config->level_icon_type ?? 'gif'}" alt="1" /></td>
|
|
<td><label for="level_step_1" style="margin:0"><input type="number" id="level_step_1" class="level_step" value="{$config->level_step[1] ?? ''}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
|
{@$point_group_item = $point_group[1] ?? null}
|
|
{@$title=array()}
|
|
<!--@if($point_group_item)-->
|
|
<!--@if($config->group_reset != 'N')-->
|
|
{@$title[0] = $group_list[$point_group_item.'']->title}
|
|
<!--@else-->
|
|
{@$title[] = $group_list[$point_group_item.'']->title}
|
|
<!--@end-->
|
|
<!--@end-->
|
|
<td>{implode(', ', $title)}</td>
|
|
</tr>
|
|
<!--@for($i=2;$i<=$config->max_level;$i++)-->
|
|
{@$point_group_item = $point_group[$i] ?? null}
|
|
<!--@if($point_group_item)-->
|
|
<!--@if($config->group_reset != 'N')-->
|
|
{@$title[0] = $group_list[$point_group_item.'']->title}
|
|
<!--@else-->
|
|
{@$title[] = $group_list[$point_group_item.'']->title}
|
|
<!--@end-->
|
|
<!--@end-->
|
|
<tr class="row{(($i-1)%2+1)}">
|
|
<td>{$i}</td>
|
|
<td><img src="{getUrl()}modules/point/icons/{$config->level_icon}/{$i}.{$config->level_icon_type ?? 'gif'}" alt="{$i}" /></td>
|
|
<td><label for="level_step_{$i}" style="margin:0"><input type="number" id="level_step_{$i}" class="level_step" value="{$config->level_step[$i]}" style="width:120px;text-align:right" /> {$config->point_name}</label></td>
|
|
<td>{implode(', ', $title)}</td>
|
|
</tr>
|
|
<!--@end-->
|
|
</table>
|
|
<div class="x_clearfix">
|
|
<input id="level_step" name="level_step" type="hidden" value="{implode(',', $config->level_step)}" />
|
|
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="section">
|
|
<h1>{$lang->cmd_point_recal}</h1>
|
|
<p><input class="x_btn x_btn-warning" type="button" value="{$lang->cmd_point_recal}" onclick="doPointRecal()" /></p>
|
|
<p>{$lang->about_cmd_point_recal}</p>
|
|
<p id="pointReCal"></p>
|
|
</section>
|
|
</form>
|