-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.php
49 lines (43 loc) · 1.02 KB
/
docs.php
1
2
3
4
5
6
7
8
9
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
46
47
48
49
<?php
$usedtemplates='docs_main,docs_main_bit,docs_view_main,docs_view_bit';
require ('global.php');
$titleetc='Documentions';
$li['docs']='id="current"';
if(empty($_GET['id']))
{
$query=$DB->query('select * from docs where cid=\'-1\'');
$docs='';
while($doc = $DB->fetch_array($query))
{
if($row=='a')
{
$row='b';
}
else
{
$row='a';
}
$doc['count']=$DB->num_rows($DB->query("select * from docs where cid='$doc[id]'"));
$docs.=$TP->GetTemp('docs_main_bit');
}
$TP->WebTemp('docs_main');
}
else
{
$query=$DB->query('select * from docs where id=\''.$_GET['id'].'\'');
$docs='';
while($d = $DB->fetch_array($query))
{
$qu=$DB->query('select * from docs where cid=\''.$d['id'].'\'');
while($doc = $DB->fetch_array($qu))
{
$lis=$lis.'<li><a href="#'.$doc[id].'">'.$doc[title].'</a>';
$doc['date']=mydate($doc['date'],'last');
$docs.=$TP->GetTemp('docs_view_bit');
}
$TP->WebTemp('docs_view_main');
$titleetc.=' :: '.$d['title'];
}
}
$TP->print_page();
?>