Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/12/2015, 02:23
cilindro
 
Fecha de Ingreso: noviembre-2015
Mensajes: 13
Antigüedad: 8 años, 5 meses
Puntos: 0
Respuesta: Como integrar 2

esta es la continuacion del php

// -- get reseller sub-accounts
$rs_accounts = mysql_query("select account, password, unix_timestamp(expires) as expires, ".
"(select count(*) from transactions t where t.username = a.username and t.account = a.account) as ".
"transaction_count from accounts a where a.username = '$reseller' order by a.account");
?>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<link href="themes/<?php echo($G_theme); ?>/style.css" type="text/css" rel="stylesheet">
<title><?php grse("APP_NAME"); ?></title>
<script type="text/javascript" language="javascript"><!--
function save_expiry( account )
{
root_form = document.forms[0];

if( !confirm('<?php grse("RESELLER_SUBACCOUNT_EXPIRY_DATE_CHANGE_CONFI RM"); ?>.') ) return;

save_expiry_url = 'sr-reseller-subaccounts.php?scrollLeft=' +
escape(root_form.scrollLeft.value) + '&scrollTop=' +
escape(root_form.scrollTop.value) + '&__postback=1&username=<?php echo( $reseller ); ?>' +
'&update=' + account + '&new_expiry=' + root_form.new_expiry.value;

location.href = save_expiry_url;
}

function delete_subaccount( account )
{
root_form = document.forms[0];

if( !confirm('<?php grse("RESELLER_SUBACCOUNT_DELETE_CONFIRM"); ?>.') ) return;

delete_subaccount_url= 'sr-reseller-subaccounts.php?scrollLeft=' +
escape(root_form.scrollLeft.value) + '&scrollTop=' +
escape(root_form.scrollTop.value) + '&__postback=1&username=<?php echo( $reseller ); ?>' +
'&delete=' + account;

location.href = delete_subaccount_url;
}

function add_account()
{
root_form = document.forms[0];

if( root_form.add_username.value != '' && root_form.add_password.value != '' && root_form.add_months.value != '' )
{
if( !confirm('<?php grse("RESELLER_SUBACCOUNT_ADD_CONFIRM"); ?>.') ) return;

add_account_url = 'sr-reseller-subaccounts.php?scrollLeft=' +
escape(root_form.scrollLeft.value) + '&scrollTop=' +
escape(root_form.scrollTop.value) + '&__postback=1&username=<?php echo( $reseller ); ?>' +
'&add=1&add_username=' + escape(root_form.add_username.value) + '&add_password=' +
escape(root_form.add_password.value) + '&add_months=' + escape(root_form.add_months.value);

location.href = add_account_url;
}
else alert('<?php grse("HOME_ADD_OBLIGATORY"); ?>.');
}
// -->
</script>
</head>

<body>
<form name="root" action="sr-reseller-subaccounts.php" method="post">
<input type="hidden" name="username" value="<?php echo($reseller); ?>">
<table border="0" width="100%" id="tblSection_1">
<tr>
<td colspan="7" class="sectionTitle"><?php grse("RESELLER_EDIT_INFO"); ?></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"><?php grse("RESELLER_EDIT_RESELLER") ?>:</td>
<td><?php echo( $reseller ); ?></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"><?php grse("RESELLER_EDIT_NAME"); ?>:</td>
<td><?php echo( $rw_reseller["name"]); ?></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"><?php grse("RESELLER_EDIT_STATUS"); ?>:</td>
<td><?php
switch( $rw_reseller["status"] )
{
case "A":
grse("RESELLER_EDIT_ACTIVE");
break;

case "S":
grse("RESELLER_EDIT_SUSPENDED");
break;

default:
grse("RESELLER_EDIT_UNKNOWN");
break;
}
?></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"><?php grse("RESELLER_EDIT_CREDIT_BALANCE"); ?>:</td>
<td><?php echo( get_credit_balance( $reseller ) ); ?></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"><hr></td>
<td><hr></td>
</tr>
<tr>
<td width="25"></td>
<td class="fieldTitle" width="160"></td>
<td class="errorMessage"><?php if( $status_message <> "" ) echo( $status_message )."."; ?></td>
</tr>
</table>
<br>
<table border="0" width="100%" id="tblSection_2">
<tr>
<td class="sectionTitle"><?php grse("RESELLER_SUBACCOUNT_LIST"); ?></td>
</tr>
<tr>
<td>
<table border="0" width="100%">
<tr class="listHeader">
<td width="30%"><?php grse("HOME_LIST_SUBACCOUNT"); ?></td>
<td width="20%"><?php grse("HOME_LIST_PASSWORD"); ?></td>
<td width="30%"><?php grse("HOME_LIST_EXPIRY_DATE"); ?></td>
<td width="10%"><?php grse("RESELLER_SUBACCOUNT_TRANSACTION_COUNT"); ?></td>
<td width="10%"></td>
</tr>
<?php
if( mysql_num_rows( $rs_accounts ) )
{
while( ($rw_account = mysql_fetch_assoc( $rs_accounts )) )
{
?>
<tr>
<td width="30%"><?php echo( get_effective_account($rw_account["account"], $rw_reseller["accounts_prefix"]) ); ?></td>
<td width="20%"><?php echo($rw_account["password"]); ?></td>
<td width="30%"><?php
if( isset($_REQUEST["update_expiry"]) )
{
if($_REQUEST["update_expiry"] == $rw_account["account"])
$edit_mode = TRUE;
else
$edit_mode = FALSE;
}
else $edit_mode = FALSE;

if( $edit_mode )
{
echo("<input type=\"text\" name=\"new_expiry\" size=\"15\" maxlength=\"10\" value=\""._date_format($rw_account["expires"])."\">");
echo(" [<a href=\"javascript:save_expiry('{$rw_account["account"]}');\">".grs("RESELLER_SUBACCOUNT_EXPIRY_DATE_SAVE ")."</a>]");
}
else
{
echo(_date_format($rw_account["expires"]));
echo(" [<a href=\"sr-reseller-subaccounts.php?username=$reseller&update_expiry={ $rw_account["account"]}\">".grs("RESELLER_SUBACCOUNT_EXPIRY_DATE_CHANGE" )."</a>]");
}
?></td>
<td width="10%"><?php echo($rw_account["transaction_count"]); ?></td>
<td width="10%"><a href="javascript:delete_subaccount('<?php echo($rw_account["account"]); ?> ');"><?php grse("RESELLER_MANAGEMENT_DELETE"); ?></a></td>
</tr>
<?php[/PHP]