/[pliva-si]/back/menu/global.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /back/menu/global.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Mon Jan 7 14:29:44 2002 UTC (22 years, 3 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
fix delete query

1 <?
2
3 $phormationdir = "../phormation";
4 $DB = "pgsql";
5
6 //-------------------------------------------------------------------
7
8 $table="menu";
9
10 $params["query"] = "select section,level,item,url,file,num,visible from menu";
11 $params["defaultsort"] = "section,num,level";
12 $params["key"] = "num";
13 $params["delquery"] = "delete from $table where ".$params["key"]." = ";
14
15 //-------------------------------------------------------------------
16
17 $fields[] = "visible"; $names[] = "Visible";
18 $types[]="type=boolean&default=1";
19
20 $fields[] = "section"; $names[] = "Section";
21 $types[]="type=select&map[domov]=Home&map[o_nas]=O nas&map[izdelki]=Izdelki&map[nasveti]=Nasveti&map[sladkorna]=Sladkorna Stran&map[za_zdravnike]=Za zdravnike&map[novosti]=Novosti&map[otroci]=Otroci&selecttype=dropdown";
22
23 $fields[] = "level"; $names[] = "Level";
24 $types[]="type=select&map[1]=Main (with line)&map[2]=Sub (heading of bullets)&map[3]=SubSub (bullets)&map[4]=Otroci (blue dot)&selecttype=dropdown";
25
26 $fields[] = "item"; $names[] = "Description";
27 $types[]="type=text&length=50&required=1";
28
29 $fields[] = "url"; $names[] = "URL";
30 $types[]="type=text&length=50";
31
32 $fields[] = "file"; $names[] = "GIF image";
33 $types[]="type=showpic&dir=../../m/&length=1";
34
35 $fields[] = "num"; $names[] = "Ordinal number";
36 $types[]="type=text&length=3&required=1&default=999";
37
38 //-------------------------------------------------------------------
39
40 $conn = pg_connect( "dbname=plivasi user=dpavlin" );
41 if( !$conn ) {
42 echo "Couldn't connect to database!<BR>";
43 } else {
44 $result=pg_Exec($conn,"set datestyle = 'german'");
45 }
46
47 //-------------------------------------------------------------------
48
49 ?>

  ViewVC Help
Powered by ViewVC 1.1.26