Файл: modules/tasks/index.php
Строк: 27
<?php
if($act=='add'):
$Templater = new Templater;
$Templater->vars = array();
$Templater->Module = 'tasks';
$Templater->GetTmpl('add');
$Templater->Exec();
elseif($act=='show' && is_numeric($_GET['tid'])):
$Templater = new Templater;
$Task = Tasks::GetTask($_GET['tid']);
if($Task['uid']!=0){
$Creator = Core::GetUser($Task['uid']);
} else {
$Creator = array('id'=>'0','name'=>'Оплаченный заказ','photo'=>'/img/av.jpg');
}
$Templater->vars = array(
'task:id'=>$Task['id'],
'task:url'=>$Task['url'],
'task:count'=>$Task['count']+$Task['done'],
'task:done'=>$Task['done'],
'task:procent'=>round(($Task['done']*100)/($Task['count']+$Task['done'])),
'task:num'=>$Task['count'],
'task:pay'=>$Task['pay'],
'task:date'=>$Task['date'],
'creator:photo'=>$Creator['photo'],
'creator:id'=>$Creator['id'],
'creator:name'=>$Creator['name'].' '.$Creator['lastname'],
'task:isdone'=>$Task['isdone']
);
//print_r($Templater->vars);
$Templater->Module = 'tasks';
$Templater->GetTmpl('show');
$Templater->Exec();
elseif($act=='edit'):
$Templater = new Templater;
$Templater->vars = array();
$Templater->Module = 'tasks';
$Templater->GetTmpl('edit');
$Templater->Exec();
elseif($act=='all'):
$Templater = new Templater;
$Templater->vars = array();
$Templater->Module = 'tasks';
$Templater->GetTmpl('all');
$Templater->Exec();
else:
$Templater = new Templater;
$Templater->vars = array();
$Templater->Module = 'tasks';
$Templater->GetTmpl('list');
$Templater->Exec();
endif;