29 lines
980 B
PHP
Executable File
29 lines
980 B
PHP
Executable File
<?php
|
|
|
|
/* ----------------------------------------------------------------------
|
|
10.10.2022
|
|
Добавляем нужные поля
|
|
---------------------------------------------------------------------- */
|
|
|
|
|
|
$db->free_sql2('CREATE TABLE IF NOT EXISTS `tasks` (
|
|
`id` INTEGER PRIMARY KEY NOT NULL,
|
|
`user_id` INTEGER,
|
|
`isp_id` INTEGER,
|
|
`mod` TEXT,
|
|
`task` TEXT,
|
|
`t` TEXT,
|
|
`srok` TEXT,
|
|
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
|
|
FOREIGN KEY (`isp_id`) REFERENCES `users` (`id`)
|
|
)');
|
|
$db->free_sql2('ALTER TABLE `tasks` ADD `status` INTEGER');
|
|
|
|
|
|
if ($_SESSION['dostup']!=='a' && $_SESSION['dostup']!=='e')header( 'Location: /403/' );
|
|
unset($a);
|
|
$a['user_id']=$_SESSION['user_id'];
|
|
$db->free_sql2("CREATE TABLE IF NOT EXISTS zametka (user_id INTEGER NOT NULL, txt text, FOREIGN KEY (user_id) REFERENCES users (id))");
|
|
$txt=$db->get_val('zametka', $a, 'txt');
|
|
$smarty -> assign( 'txt', $txt );
|
|
?>
|