PhpLabWare version 0.3 
/dd/ -> 0_0026_inc.php

1  <?php
2 
3  // 0_0026_inc.php - redraws the tableoftables to new display format
4  // 0_0026_inc.php - author: Ethan Garner
5 
6    /***************************************************************************
7    * Copyright (c) 2001 by Ethan Garner *
8    * ------------------------------------------------------------------------ *
9    * Creates redraws the tableoftables to new display format *
10    * *
11    * *
12    * *
13    * This program is free software; you can redistribute it and/or modify it *
14    * under the terms of the GNU General Public License as published by the *
15    * Free Software Foundation; either version 2 of the License, or (at your *
16    * option) any later version. *
17    \**************************************************************************/
18 
19 
20  // Change table of tables to be the new display format
21  $db->Execute("ALTER TABLE tableoftables ADD display CHAR(1)");
22  $db->Execute("ALTER TABLE tableoftables ADD permission text");
23  $db->Execute("ALTER TABLE tableoftables ADD custom text");
24  $db->Execute("UPDATE tableoftables SET Custom='antibodies.php' where tablename = 'antibodies'");
25  $db->Execute("UPDATE tableoftables SET Custom='pdfs.php' where tablename = 'pdfs'");
26  $db->Execute("UPDATE tableoftables SET Custom='protocols.php' where tablename = 'protocols'");
27  $db->Execute("UPDATE tableoftables SET Custom='pdbs.php' where tablename = 'pdbs'");
28  //$db->Execute("ALTER TABLE tableoftables modify id int UNSIGNED NOT NULL AUTO_INCREMENT");
29 
30  // Import existing tables into the updated navbar display funtion.
31  $db->Execute("UPDATE tableoftables SET permission='Users' where sortkey > 1");
32  $db->Execute("UPDATE tableoftables SET display='Y' where sortkey > 1");
33 
34  // Create the linkbar table and associated entries
35  $db->Execute("Create table linkbar (
36          id int PRIMARY KEY,
37          label text,
38          linkurl text,
39          sortkey int,
40          display varchar(1),
41          target varchar(1))");
42  // Avoid clashes between user generated and 'system' tables
43  // ids up to 9999 are reserved for system tables
44  $id=$db->GenID("tableoftables_gen_id_seq",10000);
45  $db->Execute("INSERT INTO tableoftables (id,sortkey,tablename,shortname,Display,Permission,Custom) VALUES($id,'0','linkbar','li','0','System','System')");
46  ?>


Generated: Sun Oct 5 21:17:35 2003 SourceForge Logo Generated by PHPXref 0.2