- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
<?php
error_reporting(E_ALL);
require_once('project.php');
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader,
array(
'cache' => 'compilation_cache',
'debug' => true
)
);
$twig->addExtension(new Twig_Extension_Debug());
$data='';
$data .= summ('summa','zvit');
$payments =getPayments();//tableM(getPayments());
if (array_key_exists('go', $_REQUEST))
{
$go=$_REQUEST['go'];
}
else
{
$go='';
}
switch ($go) {
case '':
echo $twig->render('index.html',array('payments' => $payments)); ); //
break;
case 'addData':
$form = showForm();
echo "$form";
break;
case 'add':
$data=$_POST['data'];
$summa=$_POST['summa'];
addDate($data,$summa);
redirect('index.php');
break;
case 'delete':
$id = $_GET['id'];
delete($id);
redirect('index.php');
break;
}
Fike 14.03.2015 09:34 # +1
парсер бы упал вообще-то с синатксической ошибкой.
vityapro 15.03.2015 18:08 # 0
Fike 15.03.2015 22:51 # +1
http://screencloud.net/v/qirM
MEJlOMAH 25.08.2021 21:13 # 0