session_start(); include 'connect.php'; include 'functions.php'; include 'config.php'; include 'check_login_access.php'; if(isset($_POST['update'])) { $sql = "DELETE FROM `docs_".$_POST['tid']."` WHERE id <> '1';"; mysql_query($sql); foreach($_POST['cell'] as $k => $v) { $t_sql = ""; $ins = false; for( $j = 1 ; $j < $_POST['num_cols'] ; $j++) { if(1) { $t_sql.= ", '".$_POST['cell'][$k][$j]."'"; if($_POST['cell'][$k][$j]!="") $ins = true; } } if($ins) { $sql = "INSERT INTO `docs_".$_POST['tid']."` VALUES ( NULL ".$t_sql.");"; mysql_query($sql); } } header("Location: docs.php?t=".$_POST['tid'].""); exit(); } #************************* # # Подключаем шапочку include 'inc_top.php'; # #************************* ?>
|
if($users[$_SESSION['login']][$_module_name]['access']['C'])
echo ' '; if(!isset($_GET['t'])) { $sql = "SELECT * FROM docs ORDER BY name_ru"; $res = mysql_query($sql); while($row = mysql_fetch_array($res)) { echo ""; } } else { echo ' |