433 lines
12 KiB
Smarty
433 lines
12 KiB
Smarty
{include file='admin_header.tpl'}
|
|
|
|
<script>
|
|
var lang_dlg_title1 = "{lang_print id=100014230}";
|
|
var lang_dlg_text1 = "{lang_print id=100014231}";
|
|
|
|
var lang_dlg_title2 = "{lang_print id=100014232}";
|
|
var lang_dlg_text2 = "{lang_print id=100014233}";
|
|
|
|
</script>
|
|
|
|
{literal}
|
|
<script type="text/javascript" src="../include/js/semods.js"></script>
|
|
<script type="text/javascript" src="../include/js/semods.controls.dialog.js"></script>
|
|
|
|
<link rel="stylesheet" href="../templates/styles_subscriber.css" title="stylesheet" type="text/css">
|
|
|
|
|
|
<style>
|
|
|
|
table.tabs {
|
|
margin-bottom: 12px;
|
|
}
|
|
td.tab {
|
|
background: #FFFFFF;
|
|
padding-left: 1px;
|
|
border-bottom: 1px solid #CCCCCC;
|
|
}
|
|
td.tab0 {
|
|
font-size: 1pt;
|
|
padding-left: 7px;
|
|
border-bottom: 1px solid #CCCCCC;
|
|
}
|
|
td.tab1 {
|
|
border: 1px solid #CCCCCC;
|
|
border-top: 3px solid #AAAAAA;
|
|
border-bottom: none;
|
|
font-weight: bold;
|
|
padding: 6px 8px 6px 8px;
|
|
}
|
|
td.tab2 {
|
|
background: #F8F8F8;
|
|
border: 1px solid #CCCCCC;
|
|
border-top: 3px solid #CCCCCC;
|
|
font-weight: bold;
|
|
padding: 6px 8px 6px 8px;
|
|
}
|
|
td.tab3 {
|
|
background: #FFFFFF;
|
|
border-bottom: 1px solid #CCCCCC;
|
|
padding-right: 12px;
|
|
width: 100%;
|
|
text-align: right;
|
|
vertical-align: middle;
|
|
}
|
|
.tabs A {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.tabs A:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
td.form1 {
|
|
font-weight:bold;
|
|
padding:12px 0px 5px 10px;
|
|
text-align:right;
|
|
vertical-align:top;
|
|
}
|
|
|
|
td.form2 {
|
|
padding:12px 0px 5px 10px;
|
|
}
|
|
|
|
div.divbutton {
|
|
background:#FFFFFF none repeat scroll 0%;
|
|
border-color:#DDDDDD;
|
|
border-style:solid;
|
|
border-width:1px 1px 1px 5px;
|
|
font-weight:bold;
|
|
padding:7px 8px 7px 6px;
|
|
text-align:left;
|
|
|
|
float: right;
|
|
}
|
|
|
|
div.divbutton A {
|
|
text-decoration: none;
|
|
}
|
|
|
|
td.result {
|
|
font-weight: bold;
|
|
text-align: center;
|
|
border: 1px dashed #CCCCCC;
|
|
background: #FFFFFF;
|
|
padding: 7px 8px 7px 7px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
var semods_plan_id = 0;
|
|
|
|
function plan_cancel(plan_id) {
|
|
semods_plan_id = plan_id;
|
|
new SEMods.Controls.Dialog( { title : lang_dlg_title1, text : lang_dlg_text1, width : "300px", height : "130px", onYes : plan_cancel_confirmed } );
|
|
}
|
|
|
|
function plan_delete(plan_id) {
|
|
semods_plan_id = plan_id;
|
|
new SEMods.Controls.Dialog( { title : lang_dlg_title2, text : lang_dlg_text2, width : "300px", height : "180px", onYes : plan_delete_confirmed } );
|
|
}
|
|
|
|
function plan_cancel_confirmed() {
|
|
//semods_plan_id
|
|
|
|
var asyncform = document.getElementById('asyncform');
|
|
document.getElementById('asyncform_task').value = "cancelplan";
|
|
document.getElementById('asyncform_plan_id').value = semods_plan_id;
|
|
|
|
asyncform.submit();
|
|
}
|
|
|
|
function plan_delete_confirmed() {
|
|
//semods_plan_id
|
|
|
|
var asyncform = document.getElementById("asyncform");
|
|
document.getElementById('asyncform_task').value = "deleteplan";
|
|
document.getElementById('asyncform_plan_id').value = semods_plan_id;
|
|
|
|
asyncform.submit();
|
|
}
|
|
|
|
function plan_renew(plan_id) {
|
|
|
|
}
|
|
|
|
|
|
function show_plan_selector() {
|
|
document.getElementById("plan_selector_button").style['display'] = "none";
|
|
document.getElementById("plan_selector_div").style['display'] = "block";
|
|
}
|
|
|
|
function edit_plan_date() {
|
|
SEMods.B.show("edit_exp_date");
|
|
SEMods.B.hide("no_exp_date");
|
|
|
|
SEMods.B.ge("plan_never_expire").value = 0;
|
|
}
|
|
|
|
function unexpire_plan_date() {
|
|
SEMods.B.hide("edit_exp_date");
|
|
SEMods.B.show("no_exp_date");
|
|
|
|
SEMods.B.ge("plan_never_expire").value = 1;
|
|
}
|
|
|
|
</script>
|
|
|
|
{/literal}
|
|
|
|
|
|
|
|
<h2>{lang_print id=100014222} {$user_username}</h2>
|
|
{lang_print id=100014223}
|
|
|
|
<br><br>
|
|
<table class='tabs' cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td class='tab0'> </td>
|
|
<td class='tab1' NOWRAP><a href='admin_subscriber_edituser.php?user_id={$user_id}'>{lang_print id=100014224}</a></td>
|
|
<td class='tab'> </td>
|
|
<td class='tab2' NOWRAP><a href='admin_subscriber_userhistory.php?user_id={$user_id}'>{lang_print id=100014225}</a></td>
|
|
<td class='tab'> </td>
|
|
<td class='tab2' NOWRAP><a href='admin_subscriber_usermessages.php?user_id={$user_id}'>{lang_print id=100014260}</a></td>
|
|
<td class='tab'> </td>
|
|
<td class='tab3'> <a href='admin_subscriber_viewusers.php'>« {lang_print id=100014226}</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
{if $error_message != ""}
|
|
<div class='error'><img src='../images/error.gif' border='0' class='icon'> {lang_print id=$error_message}</div>
|
|
{/if}
|
|
|
|
{if $result != ""}
|
|
<div class='success'><img src='../images/success.gif' border='0' class='icon'> {lang_print id=$result}</div>
|
|
{/if}
|
|
|
|
<form action='admin_subscriber_edituser.php' method='POST'>
|
|
|
|
<div style="padding:5px">
|
|
|
|
{if $userplans|@count > 0 }
|
|
|
|
{foreach from=$userplans item=userplan}
|
|
|
|
{if $userplan->userplan_info.userplan_handler != 0}
|
|
{lang_print id=100014252} <br><br>
|
|
{/if}
|
|
|
|
|
|
<div style="width:100%">
|
|
|
|
{* Can delete only cancelled,expired ? *}
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
<div class="divbutton">
|
|
<a href="javascript:plan_delete({$userplan->userplan_info.userplan_id})">
|
|
<img border="0" class="icon" src="../images/icons/action_delete1.gif"/> {lang_print id=100014256}
|
|
</a>
|
|
</div>
|
|
{/if}
|
|
|
|
{if ($userplan->userplan_info.userplan_handler != 0) && (($userplan->userplan_info.userplan_state == 0) OR ($userplan->userplan_info.userplan_state == 1)OR ($userplan->userplan_info.userplan_state == 4)OR ($userplan->userplan_info.userplan_state == 7 ))}
|
|
<div class="divbutton" style="clear: both; margin-top: 10px;">
|
|
<a href="javascript:plan_cancel({$userplan->userplan_info.userplan_id})">
|
|
<img border="0" class="icon" src="../images/icons/action_delete1.gif"/> {lang_print id=100014257}
|
|
</a>
|
|
</div>
|
|
{/if}
|
|
|
|
|
|
<table cellspacing='0' cellpadding='0'>
|
|
|
|
{* PLAN *}
|
|
<tr>
|
|
<td class='form1'>{lang_print id=100014234}</td>
|
|
<td class='form2'>
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
|
|
<select name=userplan_plan>
|
|
{foreach from=$plans item=plan}
|
|
<option value='{$plan.plan_id}'{if $plan.plan_id == $userplan->userplan_info.plan_id}SELECTED{/if}>{$plan.plan_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
{else}
|
|
|
|
{$userplan->userplan_info.plan_name}
|
|
|
|
{/if}
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
{* STATUS / STATE *}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014235} </td>
|
|
<td class='form2'>
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
|
|
<select name=userplan_state>
|
|
{foreach from=$userplan_states item=userplan_state key=userplan_state_key}
|
|
<option value='{$userplan_state_key}'{if $userplan_state_key == $userplan->userplan_info.userplan_state}SELECTED{/if}>{lang_print id=$userplan_state}</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
{else}
|
|
{lang_print id=$userplan->userplan_info.userplan_statetext}
|
|
{/if}
|
|
<!--
|
|
{$userplan->userplan_info.userplan_statetext}
|
|
{if ($userplan->userplan_info.userplan_expiredate != 0) AND (($userplan->userplan_info.userplan_state == 0) OR ($userplan->userplan_info.userplan_state == 1))}
|
|
(<a href="javascript:plan_cancel({$userplan->userplan_info.userplan_id})">{lang_print id=100014242}</a>)
|
|
{elseif ($userplan->userplan_info.userplan_state == 2) OR ($userplan->userplan_info.userplan_state == 3)}
|
|
(<a href="user_plan_renew.php?from_plan={$userplan->userplan_info.userplan_id}">{lang_print id=100014243}</a>)
|
|
{/if}
|
|
-->
|
|
</td>
|
|
</tr>
|
|
|
|
{* START DATE *}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014237} </td>
|
|
<td class='form2'>
|
|
{assign var=userplan_startdate value=$datetime->timezone($userplan->userplan_info.userplan_startdate, $global_timezone)}
|
|
{$datetime->cdate("`$setting.setting_dateformat` `$setting.setting_timeformat`", $userplan_startdate)}
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
{* EXPIRATION DATE *}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014244} </td>
|
|
<td class='form2'>
|
|
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
<input type="hidden" name="plan_never_expire" id="plan_never_expire" value="{if $userplan->userplan_info.userplan_expiredate == 0}1{else}0{/if}">
|
|
|
|
<div id="no_exp_date"{if $userplan->userplan_info.userplan_expiredate != 0}style="display:none"{/if}>
|
|
{lang_print id=100014371} <a href="javascript:edit_plan_date()">{lang_print id=100014372}</a>
|
|
</div>
|
|
|
|
<div id="edit_exp_date"{if $userplan->userplan_info.userplan_expiredate == 0}style="display:none"{/if}>
|
|
|
|
<select name=expdate_month id=expdate_month>
|
|
<option value='0'>[{lang_print id=100014248}]</option>
|
|
{foreach from=$userplan->expdate_month item=expdate_month_item}
|
|
<option value='{$expdate_month_item.value}'{$expdate_month_item.selected}>{$expdate_month_item.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
<select name=expdate_day id=expdate_day>
|
|
<option value='0'>[{lang_print id=100014249}]</option>
|
|
{foreach from=$userplan->expdate_day item=expdate_day_item}
|
|
<option value='{$expdate_day_item.value}'{$expdate_day_item.selected}>{$expdate_day_item.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
<select name=expdate_year id=expdate_year>
|
|
<option value='0'>[{lang_print id=100014250}]</option>
|
|
{foreach from=$userplan->expdate_year item=expdate_year_item}
|
|
<option value='{$expdate_year_item.value}'{$expdate_year_item.selected}>{$expdate_year_item.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
or <a href="javascript:unexpire_plan_date()">{lang_print id=100014373}</a>
|
|
</div>
|
|
|
|
{else}
|
|
{assign var=userplan_expiredate value=$datetime->timezone($userplan->userplan_info.userplan_expiredate , $global_timezone)}
|
|
{$datetime->cdate("`$setting.setting_dateformat` `$setting.setting_timeformat`", $userplan_expiredate)} <br>
|
|
{/if}
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
{* NEXT PAYMENT DATE *}
|
|
|
|
{*
|
|
|
|
{if $userplan->userplan_info.userplan_expiredate != 0}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014238} </td>
|
|
<td class='form2'>
|
|
{lang_print id=100014238}
|
|
</td>
|
|
</tr>
|
|
{/if}
|
|
|
|
*}
|
|
|
|
{* last payment - how to know? *}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014245} </td>
|
|
<td class='form2'>
|
|
|
|
(<a href="admin_subscriber_userhistory.php?user_id={$user_id}">{lang_print id=100014246}</a>)
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
{* MANAGED BY *}
|
|
<tr>
|
|
<td class='form1'> {lang_print id=100014247} </td>
|
|
<td class='form2'>
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
{lang_print id=100014251}
|
|
{else}
|
|
{assign var=userplan_handler value=$userplan->userplan_info.userplan_handler}
|
|
{$payment_gateways[$userplan_handler].paymentgateway_name}
|
|
{/if}
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
|
|
|
<br><br>
|
|
|
|
{if $userplan->userplan_info.userplan_handler == 0}
|
|
|
|
<table cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td>
|
|
<input type='hidden' name='task' value='dosave'>
|
|
<input type='hidden' name='user_id' value='{$user_id}'>
|
|
<input type='submit' class='button' value='{lang_print id=100014253}'> </td>
|
|
</form>
|
|
<form action='admin_subscriber_viewusers.php' method='GET'>
|
|
<td><input type='submit' class='button' value='{lang_print id=100014254}'></td>
|
|
</tr>
|
|
</table>
|
|
|
|
{/if}
|
|
|
|
</form>
|
|
|
|
{else}
|
|
|
|
<table cellpadding='0' cellspacing='0' align='center'><tr>
|
|
<td class='result'><img src='../images/icons/bulb16.gif' border='0' class='icon'>{lang_print id=100014229}</td>
|
|
</tr></table>
|
|
|
|
<input type='button' class='button' id="plan_selector_button" value='{lang_print id=100014258}' onclick="show_plan_selector()">
|
|
|
|
<div id="plan_selector_div" style="display:none">
|
|
<form action='admin_subscriber_edituser.php' method='post' name='items'>
|
|
{lang_print id=100014259}
|
|
<select class='text' name='plan_id'><option></option>
|
|
{section name=plan_loop loop=$plans}<option value='{$plans[plan_loop].plan_id}'>{$plans[plan_loop].plan_name}</option>{/section}</select>
|
|
<input type='submit' class='button' value='{lang_print id=100014258}'>
|
|
<input type='hidden' name='task' value='subscribeplan'>
|
|
<input type='hidden' name='user_id' value='{$user_id}'>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
</div>
|
|
|
|
<form method="POST" id="asyncform" name="asyncform" action="admin_subscriber_edituser.php">
|
|
<input type="hidden" id="asyncform_task" name="task">
|
|
<input type="hidden" id="asyncform_plan_id" name="plan_id">
|
|
<input type="hidden" id="user_id" name="user_id" value="{$user_id}">
|
|
</form>
|
|
|
|
{include file='admin_footer.tpl'} |