View file adm_panel/lic_info.php

File size: 2.98Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_once '../sys/inc/user.php';
user_access('lic_info',null,'index.php?'.SID);
adm_check();
$set['title']='Сведения о лицензии';
include_once '../sys/inc/thead.php';
title();

if (isset($_POST['80']))
{
if (@file_get_contents("http://$set[http_license]/dcms/license.dcms?DCMS_HOST=http://".$_SERVER['HTTP_HOST']))
msg('Лицензия может быть успешно активирована');
else
$err[]='80-й порт закрыт или сайт DCMS.SU недоступен';
}

if (isset($_POST['get_lic']) && !$license)
{
admin_log('Лицензия','Сведения','Обновление сведений о лицензии');
lic_dcms();
if ($license)msg('Лицензия успешно получена');
else $err[]='Сведения о лицензии отсутствуют';
}
err();
aut();

if ($license)
{
$smarty_info = new Smarty_conf();
$posts=array();

$posts[]=array('status'=>'Лицензия: OK');

if (isset($license['url']))
$posts[]=array('Адрес',$license['url']);

if (isset($license['time']) && $license['time'])
$posts[]=array('Дата приобретения',vremja($license['time']));

if (isset($license['last_time']) && $license['last_time'])
$posts[]=array('Обновлено',vremja($license['last_time']));

if (isset($license['id_user']) && $license['id_user'])
$posts[]=array('Плательщик',"<a".(IS_WEB?' target="_blank"':null)." href='http://$set[http_license]/info.php?id=$license[id_user]'>$license[nick]</a>");

if (isset($license['R']) && $license['R'])
$posts[]=array('WebMoney кошелек','R'.$license['R']);

if (isset($license['wmr']) && $license['wmr'])
$posts[]=array('Сумма',$license['wmr'].'р');

if (isset($license['tel']) && $license['tel'])
$posts[]=array('Номер телефона',$license['tel']);


$smarty_info->assign('post',$posts);
$smarty_info->display('body.key-value.tpl');
}
else
{
$smarty = new Smarty_conf();
$smarty->assign('form_title','Лицензия');
$smarty->assign('method','POST');
$smarty->assign('action',"?$passgen");
$elements=array();

$elements[]=array('type'=>'submit', 'br'=>1, 'info'=>array('name'=>'80', 'value'=>'Проверить возможность активации')); // кнопка
$elements[]=array('type'=>'submit', 'br'=>0, 'info'=>array('name'=>'get_lic', 'value'=>'Проверить лицензию')); // кнопка
$smarty->assign('el',$elements);
$smarty->display('input.form.tpl');
}


$smarty = new Smarty_conf();
$smarty->assign('menu_title','Навигация');
$menu=array();
$menu[]=array('.','Админка');
$smarty->assign('menu',$menu);
$smarty->display('links.path.tpl');
include_once '../sys/inc/tfoot.php';
?>